1 { pkgs, config, hostName, ... }:
4 ../../nixos/profiles/hardware/T480.nix
5 ../../nixos/profiles/zfs.nix
6 ../../nixos/profiles/zramSwap.nix
9 # Setting the machine-id avoids to reencrypt all credentials
10 # when reinstalling NixOS on a new drive.
11 # Manually generated with : uuidgen | tr -d -
12 environment.etc.machine-id.source = ./machine-id.clear;
14 # The 32-bit host id of the host, formatted as 8 hexadecimal characters.
15 # You should try to make this id unique among your hosts.
16 # Manually generated with : uuidgen | head -c8
17 networking.hostId = "e6eba6c4";
19 boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
23 canTouchEfiVariables = true;
24 efiSysMountPoint = "/boot/efi";
29 # Roughly 25MiB (initrd) + 9MiB (kernel) per configuration
30 configurationLimit = 6;
31 memtest86.enable = true;
33 extraInstallCommands = ''
35 cp -r /efiboot/efi1 /efiboot/efi2
38 # FIXME: needs https://github.com/NixOS/nixpkgs/pull/246897
42 #generationsDir.copyKernels = true;
45 hardware.enableRedistributableFirmware = true;
47 fileSystems."/boot/efi" =
49 device = "/dev/disk/by-partlabel/${hostName}_ssd_efi";
51 options = [ "rw" "noexec" "nodev" "nofail" "X-mount.mkdir" "iocharset=iso8859-1" ];
55 device = "/dev/disk/by-partlabel/${hostName}_ssd_swap";
58 cipher = "aes-xts-plain64";
59 source = "/dev/urandom";
64 boot.supportedFilesystems = [ "ntfs" "vfat" ];
68 device = "${hostName}/root";
70 options = [ "zfsutil" ];
74 device = "${hostName}/root/nix";
76 options = [ "X-mount.mkdir" "zfsutil" ];
80 device = "${hostName}/root/var";
82 options = [ "X-mount.mkdir" "zfsutil" ];
85 services.pipewire.jack.enable = true;