Configuration of my nixos systems
Valentin Brandl
21680b0b18
Flake lock file updates: • Updated input 'flake-utils': 'github:numtide/flake-utils/d465f4819400de7c8d874d50b982301f28a84605' (2024-02-28) → 'github:numtide/flake-utils/b1d9ab70662946ef0850d488da1c9019f3a9752a' (2024-03-11) • Updated input 'nixpkgs': 'github:nixos/nixpkgs/880992dcc006a5e00dd0591446fdf723e6a51a64' (2024-03-05) → 'github:nixos/nixpkgs/8ac30a39abc5ea67037dfbf090d6e89f187c6e50' (2024-03-16) • Updated input 'nixpkgs-unstable': 'github:nixos/nixpkgs/9df3e30ce24fd28c7b3e2de0d986769db5d6225d' (2024-03-06) → 'github:nixos/nixpkgs/c75037bbf9093a2acb617804ee46320d6d1fea5a' (2024-03-16) |
||
---|---|---|
hardware | ||
home | ||
machines | ||
roles | ||
users | ||
configuration.nix | ||
flake.lock | ||
flake.nix | ||
hardware-configuration-current.nix | ||
README.md | ||
renovate.json | ||
role-current.nix |
NixOS Configuration
Now using Flakes \o/
Updating Channels/the Lockfile
nix flake lock
nix flake update
Installing/Updating the System
sudo nixos-rebuild switch --flake <path-to-repo>#<hostname>
sudo nixos-rebuild switch --flake .#w1n5t0n
Mail Setup
secret-tool store --label 'foo@example.com' email 'foo@example.com'
Encrypted Btrfs Setup
- cryptsetup luksFormat --format=luks1 /...
- cryptsetup luksOpen /... system
- mkfs.btrfs /dev/mapper/system
- mount /dev/mapper/system /mnt
- btrfs subvolume create /mnt/root
- btrfs subvolume create /mnt/home
- btrfs subvolume create /mnt/nix
- btrfs subvolume create /mnt/swap
subvolume | mount options |
---|---|
home |
compress=zstd |
swap |
compress=zstd,noatime |
root |
compress=zstd |
nix |
compress=zstd,noatime |
/boot/efi
as vfat TODO: partitioning command- TODO: create swap
- mount subvolumes
- `nixos-generate-config --root /mnt
- add mount options in
hardware-configuration.nix
/ create matching configuration in./machines
- TODO: config for luks, bootloader, ...
- For
snapper
: create.snapshots
subvolume in each subvolume to be backed up