[docs] update create
All checks were successful
Check flake syntax / flake-check (push) Successful in 4m34s
All checks were successful
Check flake syntax / flake-check (push) Successful in 4m34s
This commit is contained in:
@@ -1,47 +1,19 @@
|
|||||||
# Create host with disko-install
|
# Create host with nixos-anywhere
|
||||||
How to use disko-install is described here: https://github.com/nix-community/disko/blob/master/docs/disko-install.md
|
We use a nixos-anywhere wrapper script to deploy new hosts.
|
||||||
---
|
The wrapper script takes care of copying persistent host keys before calling nixos-anywhere.
|
||||||
Here are the exact steps to get bakunin running:
|
|
||||||
First create machines/hostname/configuration.nix
|
To accomplish that boot the host from a nixos image and setup a root password.
|
||||||
Add hosts nixosConfiguration in machines/configurations.nix
|
|
||||||
Boot nixos installer on the Machine.
|
|
||||||
``` bash
|
``` bash
|
||||||
# establish network connection
|
sudo su
|
||||||
wpa_passphrase "network" "password" > wpa.conf
|
passwd
|
||||||
wpa_supplicant -B -i wlp3s0 -c wpa.conf
|
```
|
||||||
ping 8.8.8.8
|
|
||||||
# if that works continue
|
|
||||||
|
|
||||||
# generate a base hardware config
|
After that get the hosts ip using `ip a` and start deployment from your own machine:
|
||||||
nixos-generate-config --root /tmp/config --no-filesystems
|
|
||||||
|
|
||||||
# get the infra repo
|
``` bash
|
||||||
nix-shell -p git
|
# from infrastrucutre repository root dir:
|
||||||
git clone https://git.dynamicdiscord.de/kalipso/infrastructure
|
nix develop .#
|
||||||
cd infrastructure
|
remote-install hostname 10.0.42.23
|
||||||
|
|
||||||
# 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
|
|
||||||
```
|
```
|
||||||
|
|
||||||
# Testing Disko
|
# Testing Disko
|
||||||
|
|||||||
Reference in New Issue
Block a user