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