]> Git — Sourcephile - julm/julm-nix.git/blob - hosts/pumpkin/hardware.nix
pumpkin: steam-run: install
[julm/julm-nix.git] / hosts / pumpkin / hardware.nix
1 {
2 pkgs,
3 config,
4 hostName,
5 inputs,
6 ...
7 }:
8 {
9 imports = [
10 ../../nixos/profiles/hardware/T14sAMDGen1.nix
11 ../../nixos/profiles/zfs.nix
12 #../../nixos/profiles/zramSwap.nix
13 ./lanzaboote.nix
14 ];
15
16 # Setting the machine-id avoids to reencrypt all credentials
17 # when reinstalling NixOS on a new drive.
18 # Manually generated with : uuidgen | tr -d -
19 environment.etc.machine-id.source = ./machine-id.clear;
20
21 # The 32-bit host id of the host, formatted as 8 hexadecimal characters.
22 # You should try to make this id unique among your hosts.
23 # Manually generated with : uuidgen | head -c8
24 networking.hostId = "d70732b9";
25
26 boot.kernelParams = [
27 #"boot.trace"
28 "boot.shell_on_fail"
29 #"boot.debug1"
30 ];
31
32 # Deprecated in nixos-24.11
33 #boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
34 boot.loader = {
35 efi = {
36 canTouchEfiVariables = true;
37 efiSysMountPoint = "/boot1";
38 };
39 systemd-boot = {
40 enable = true;
41 #editor = false;
42 # Roughly 25MiB (initrd) + 9MiB (kernel) per configuration
43 configurationLimit = 6;
44 memtest86.enable = true;
45 /*
46 extraInstallCommands = ''
47 rm -rf /efiboot/efi2
48 cp -r /efiboot/efi1 /efiboot/efi2
49 '';
50 */
51 # FIXME: needs https://github.com/NixOS/nixpkgs/pull/246897
52 #mirroredBoots = [ ];
53 };
54 };
55 boot.zfs.requestEncryptionCredentials = [ "${hostName}/root" ];
56
57 #console.keyMap = lib.mkForce "de";
58
59 hardware.enableRedistributableFirmware = true;
60
61 fileSystems."/boot1" = {
62 device = "/dev/disk/by-partlabel/${hostName}_nvme1_boot";
63 fsType = "vfat";
64 options = [
65 "rw"
66 "noexec"
67 "nodev"
68 "nofail"
69 "X-mount.mkdir"
70 "iocharset=iso8859-1"
71 ];
72 };
73 swapDevices = [
74 {
75 device = "/dev/disk/by-partlabel/${hostName}_nvme1_swap";
76 randomEncryption = {
77 enable = true;
78 cipher = "aes-xts-plain64";
79 source = "/dev/urandom";
80 };
81 }
82 ];
83
84 boot.supportedFilesystems = [
85 "ntfs"
86 "vfat"
87 ];
88
89 fileSystems."/" = {
90 device = "${hostName}/root";
91 fsType = "zfs";
92 options = [ "zfsutil" ];
93 };
94 fileSystems."/nix" = {
95 device = "${hostName}/root/nix";
96 fsType = "zfs";
97 options = [
98 "X-mount.mkdir"
99 "zfsutil"
100 ];
101 };
102 fileSystems."/var" = {
103 device = "${hostName}/root/var";
104 fsType = "zfs";
105 options = [
106 "X-mount.mkdir"
107 "zfsutil"
108 ];
109 };
110
111 services.pipewire.jack.enable = true;
112
113 services.acpid = {
114 # Suspending not work well on this old computer.
115 #lidEventCommands = "";
116 };
117
118 }