Adapt documentation to current configuration
This commit is contained in:
parent
bb487bd528
commit
c3a3d8a12a
24
README.md
24
README.md
|
@ -2,8 +2,6 @@
|
||||||
|
|
||||||
## Structure
|
## Structure
|
||||||
|
|
||||||
* `deploy.nix`: Configuration for deployment with
|
|
||||||
[krops](https://cgit.krebsco.de/krops/about/)
|
|
||||||
* `machines`: Machine-specific configuration
|
* `machines`: Machine-specific configuration
|
||||||
+ `README.md`: Short overview of the hardware and usage of the machine
|
+ `README.md`: Short overview of the hardware and usage of the machine
|
||||||
+ `configuration.nix`: Main configuration
|
+ `configuration.nix`: Main configuration
|
||||||
|
@ -25,6 +23,9 @@
|
||||||
|
|
||||||
Secrets are managed with [sops-nix](https://github.com/Mic92/sops-nix).
|
Secrets are managed with [sops-nix](https://github.com/Mic92/sops-nix).
|
||||||
|
|
||||||
|
Machines can be deployed with `nix run .#deploy/hostname`, LUKS encrypted
|
||||||
|
systems can be unlocked over network with `nix run .#unlock/hostname`.
|
||||||
|
|
||||||
## How to install
|
## How to install
|
||||||
|
|
||||||
This guide describes how to install this configuration with GPT and BIOS boot.
|
This guide describes how to install this configuration with GPT and BIOS boot.
|
||||||
|
@ -66,7 +67,7 @@ the following after opening the luks partition: `vgchange -ay`.
|
||||||
Create filesystems:
|
Create filesystems:
|
||||||
|
|
||||||
mkfs.ext2 /dev/sdX2
|
mkfs.ext2 /dev/sdX2
|
||||||
mkfs.ext4 -L root /dev/HOSTNAME-vg/root
|
mkfs.btrfs -L root /dev/HOSTNAME-vg/root
|
||||||
mkswap -L swap /dev/HOSTNAME-vg/swap
|
mkswap -L swap /dev/HOSTNAME-vg/swap
|
||||||
|
|
||||||
Mount the file systems and activate swap:
|
Mount the file systems and activate swap:
|
||||||
|
@ -82,22 +83,21 @@ this machine):
|
||||||
|
|
||||||
nixos-generate-config --root /mnt/
|
nixos-generate-config --root /mnt/
|
||||||
|
|
||||||
Modify the hardware configuration as needed. Fill in the fields that have
|
Modify the hardware configuration as needed and add it to the machine
|
||||||
comments in `machines/installation/configuration.nix` and copy it to
|
configuration in this repository. If necessary, create the machine
|
||||||
`/mnt/etc/nixos/configuration.nix`.
|
configuration first by basing it on an already existing configuration and
|
||||||
|
adding an entry to `machines/default.nix`. Then copy this repository to the
|
||||||
|
target machine and run (`--impure` is needed since `/mnt/nix/store` is not in
|
||||||
|
`/nix/store`):
|
||||||
|
|
||||||
Install NixOS:
|
nixos-install --impure --flake /path/to/repository#hostname
|
||||||
|
|
||||||
nixos-install
|
|
||||||
|
|
||||||
Add the krops sentinel file:
|
Add the krops sentinel file:
|
||||||
|
|
||||||
mkdir -p /mnt/var/src
|
mkdir -p /mnt/var/src
|
||||||
touch /mnt/var/src/.populate
|
touch /mnt/var/src/.populate
|
||||||
|
|
||||||
After the successful instalation, reboot use `deploy HOSTNAME` on another
|
Reboot.
|
||||||
system to deploy the new system using krops, after adding the
|
|
||||||
`configuration.nix` and entry in `machines/default.nix` for the machine.
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|
|
@ -1,23 +0,0 @@
|
||||||
{ config, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./hardware-configuration.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
networking.useDHCP = false;
|
|
||||||
# replace with actual network interface
|
|
||||||
networking.interfaces.eno1.useDHCP = true;
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
git # required by krops
|
|
||||||
];
|
|
||||||
|
|
||||||
services.openssh.enable = true;
|
|
||||||
|
|
||||||
users.users.root.openssh.authorizedKeys.keys = [
|
|
||||||
# add ssh keys required for initial deployment with krops
|
|
||||||
];
|
|
||||||
|
|
||||||
console.keyMap = "de";
|
|
||||||
}
|
|
Loading…
Reference in a new issue