[docs] WIP add host creation using disko
All checks were successful
Evaluate Hydra Jobs / eval-hydra-jobs (push) Successful in 6m16s
All checks were successful
Evaluate Hydra Jobs / eval-hydra-jobs (push) Successful in 6m16s
This commit is contained in:
@@ -12,6 +12,7 @@
|
|||||||
- [musik](./projekte/musik.md)
|
- [musik](./projekte/musik.md)
|
||||||
- [TODO](./todo.md)
|
- [TODO](./todo.md)
|
||||||
- [How-to]()
|
- [How-to]()
|
||||||
|
- [Create New Host](./anleitung/create.md)
|
||||||
- [Sops](./anleitung/sops.md)
|
- [Sops](./anleitung/sops.md)
|
||||||
- [Updates](./anleitung/updates.md)
|
- [Updates](./anleitung/updates.md)
|
||||||
- [Rollbacks](./anleitung/rollback.md)
|
- [Rollbacks](./anleitung/rollback.md)
|
||||||
|
|||||||
47
doc/src/anleitung/create.md
Normal file
47
doc/src/anleitung/create.md
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
# Create host with disko-install
|
||||||
|
How to use disko-install is described here: https://github.com/nix-community/disko/blob/master/docs/disko-install.md
|
||||||
|
---
|
||||||
|
Here are the exact steps to get bakunin running:
|
||||||
|
First create machines/hostname/configuration.nix
|
||||||
|
Add hosts nixosConfiguration in machines/configurations.nix
|
||||||
|
Boot nixos installer on the Machine.
|
||||||
|
``` bash
|
||||||
|
# establish network connection
|
||||||
|
wpa_passphrase "network" "password" > wpa.conf
|
||||||
|
wpa_supplicant -B -i wlp3s0 -c wpa.conf
|
||||||
|
ping 8.8.8.8
|
||||||
|
# if that works continue
|
||||||
|
|
||||||
|
# generate a base hardware config
|
||||||
|
nixos-generate-config --root /tmp/config --no-filesystems
|
||||||
|
|
||||||
|
# get the infra repo
|
||||||
|
nix-shell -p git
|
||||||
|
git clone https://git.dynamicdiscord.de/kalipso/infrastructure
|
||||||
|
cd infrastructure
|
||||||
|
|
||||||
|
# add the new generated hardware config (and import in hosts configuration.nix)
|
||||||
|
cp /tmp/config/etc/nixos/hardware-configuration.nix machines/bakunin/
|
||||||
|
|
||||||
|
# check which harddrive we want to install the system on
|
||||||
|
lsblk #choose harddrive, in this case /dev/sda
|
||||||
|
|
||||||
|
# run nixos-install on that harddrive
|
||||||
|
sudo nix --extra-experimental-features flakes --extra-experimental-features nix-command run 'github:nix-community/disko/latest#disko-install' -- --flake .#bakunin --disk main /dev/sda
|
||||||
|
|
||||||
|
# this failed with out of memory
|
||||||
|
# running again showed: no disk left on device
|
||||||
|
# it seems the usb stick i used for flashing is way to small
|
||||||
|
# it is only
|
||||||
|
# with a bigger one (more than 8 gig i guess) it should work
|
||||||
|
# instead the disko-install tool i try the old method - first partitioning using disko and then installing the system
|
||||||
|
# for that i needed to adjust ./machines/modules/disko/btrfs-laptop.nix and set the disk to "/dev/sda"
|
||||||
|
|
||||||
|
sudo nix --extra-experimental-features "flakes nix-command" run 'github:nix-community/disko/latest' -- --mode format --flake .#bakunin
|
||||||
|
|
||||||
|
# failed with no space left on device.
|
||||||
|
# problem is lots of data is written to the local /nix/store which is mounted on tmpfs in ram
|
||||||
|
# it seems that a workaround could be modifying the bootable stick to contain a swap partition to extend tmpfs storage
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user