1 { pkgs, hostName, ... }:
4 ../../nixos/profiles/hardware/X201.nix
5 ../../nixos/profiles/zfs.nix
8 # Setting the machine-id avoids to reencrypt all credentials
9 # when reinstalling NixOS on a new drive.
10 # Manually generated with : uuidgen | tr -d -
11 environment.etc.machine-id.source = ./machine-id.clear;
13 # The 32-bit host id of the host, formatted as 8 hexadecimal characters.
14 # You should try to make this id unique among your hosts.
15 # Manually generated with : uuidgen | head -c8
16 networking.hostId = "ce53d0c3";
20 canTouchEfiVariables = true;
21 efiSysMountPoint = "/boot/efi";
26 memtest86.enable = true;
28 "/dev/disk/by-id/ata-Samsung_SSD_850_PRO_128GB_S1SMNSAFC36436X"
30 configurationLimit = 16;
34 #enableCryptodisk = true;
36 boot.zfs.requestEncryptionCredentials = [ hostName ];
38 hardware.enableRedistributableFirmware = true;
40 # Note that gobi_loader -2000 has to be rerun if the SIM is hot swapped
41 services.udev.extraRules = ''
42 ACTION=="add", SUBSYSTEM=="tty", KERNEL=="ttyUSB*", ATTRS{idVendor}=="05c6", ATTRS{idProduct}=="9204", RUN+="${pkgs.gobi_loader}/lib/udev/gobi_loader -2000 $env{DEVNAME} /home/julm/files/thinkpad-x201/gobi"
45 fileSystems."/boot" = {
46 device = "/dev/disk/by-partlabel/${hostName}_ssd_boot";
49 fileSystems."/boot/efi" = {
50 device = "/dev/disk/by-partlabel/${hostName}_ssd_efi";
55 device = "/dev/disk/by-partlabel/${hostName}_ssd_swap";
58 cipher = "aes-xts-plain64";
59 source = "/dev/urandom";
64 boot.supportedFilesystems = [
70 device = "${hostName}/root";
73 fileSystems."/nix" = {
74 device = "${hostName}/nix";
77 fileSystems."/var" = {
78 device = "${hostName}/var";
82 services.pipewire.jack.enable = true;
85 # Suspending not work well on this old computer.
86 lidEventCommands = "";