Configuration of my nixos systems
Go to file
Valentin Brandl 36c88cb1ce flake.lock: Update
Flake lock file updates:

• Updated input 'home-manager':
    'github:nix-community/home-manager/87d55517f6f36aa1afbd7a4a064869d5a1d405b8' (2022-11-05)
  → 'github:nix-community/home-manager/6639e3a837fc5deb6f99554072789724997bc8e5' (2022-11-08)
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/f09ad462c5a121d0239fde645aacb2221553a217' (2022-11-05)
  → 'github:nixos/nixpkgs/fa842715565307b7e05cdb187b08c05f16ed08f1' (2022-11-09)
2022-11-11 00:26:07 +01:00
hardware Sync config 2021-12-29 13:06:12 +01:00
home Use alacritty terminal 2022-11-09 20:17:18 +01:00
machines Use podman instead of docker 2022-11-10 11:10:47 +01:00
roles Use IDEA ultimate over community 2022-02-15 13:33:28 +01:00
users Restructure to use flakes 2022-02-15 15:44:40 +01:00
configuration.nix Restructure to use flakes 2022-02-15 15:45:24 +01:00
flake.lock flake.lock: Update 2022-11-11 00:26:07 +01:00
flake.nix Add configuration for Thinkpad E14 2022-11-09 19:59:49 +01:00
hardware-configuration-current.nix Initial commit 2020-05-30 14:07:02 +02:00
README.md Start documenting BTRFS setup 2022-11-10 11:11:00 +01:00
role-current.nix Initial commit 2020-05-30 14:07:02 +02:00

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

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