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
|
||||
|
||||
* `deploy.nix`: Configuration for deployment with
|
||||
[krops](https://cgit.krebsco.de/krops/about/)
|
||||
* `machines`: Machine-specific configuration
|
||||
+ `README.md`: Short overview of the hardware and usage of the machine
|
||||
+ `configuration.nix`: Main configuration
|
||||
|
@ -25,6 +23,9 @@
|
|||
|
||||
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
|
||||
|
||||
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:
|
||||
|
||||
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
|
||||
|
||||
Mount the file systems and activate swap:
|
||||
|
@ -82,22 +83,21 @@ this machine):
|
|||
|
||||
nixos-generate-config --root /mnt/
|
||||
|
||||
Modify the hardware configuration as needed. Fill in the fields that have
|
||||
comments in `machines/installation/configuration.nix` and copy it to
|
||||
`/mnt/etc/nixos/configuration.nix`.
|
||||
Modify the hardware configuration as needed and add it to the machine
|
||||
configuration in this repository. If necessary, create the machine
|
||||
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
|
||||
nixos-install --impure --flake /path/to/repository#hostname
|
||||
|
||||
Add the krops sentinel file:
|
||||
|
||||
mkdir -p /mnt/var/src
|
||||
touch /mnt/var/src/.populate
|
||||
|
||||
After the successful instalation, reboot use `deploy HOSTNAME` on another
|
||||
system to deploy the new system using krops, after adding the
|
||||
`configuration.nix` and entry in `machines/default.nix` for the machine.
|
||||
Reboot.
|
||||
|
||||
## 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