1 { pkgs, hostName, ... }:
 
   4     ../../nixos/profiles/hardware/X201.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 = "ce53d0c3";
 
  21     canTouchEfiVariables = true;
 
  22     efiSysMountPoint = "/boot/efi";
 
  27     memtest86.enable = true;
 
  29       "/dev/disk/by-id/ata-Samsung_SSD_850_PRO_128GB_S1SMNSAFC36436X"
 
  31     configurationLimit = 16;
 
  35     #enableCryptodisk = true;
 
  37   boot.zfs.requestEncryptionCredentials = [ hostName ];
 
  39   hardware.enableRedistributableFirmware = true;
 
  41   # Note that gobi_loader -2000 has to be rerun if the SIM is hot swapped
 
  42   services.udev.extraRules = ''
 
  43     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"
 
  46   fileSystems."/boot" = {
 
  47     device = "/dev/disk/by-partlabel/${hostName}_ssd_boot";
 
  50   fileSystems."/boot/efi" = {
 
  51     device = "/dev/disk/by-partlabel/${hostName}_ssd_efi";
 
  56       device = "/dev/disk/by-partlabel/${hostName}_ssd_swap";
 
  59         cipher = "aes-xts-plain64";
 
  60         source = "/dev/urandom";
 
  65   boot.supportedFilesystems = [
 
  71     device = "${hostName}/root";
 
  74   fileSystems."/nix" = {
 
  75     device = "${hostName}/nix";
 
  78   fileSystems."/var" = {
 
  79     device = "${hostName}/var";
 
  83   services.pipewire.jack.enable = true;
 
  86     # Suspending not work well on this old computer.
 
  87     lidEventCommands = "";