]> Git — Sourcephile - julm/julm-nix.git/blob - hosts/blackberry/hardware.nix
home-manager: update
[julm/julm-nix.git] / hosts / blackberry / hardware.nix
1 { pkgs, hostName, ... }:
2 {
3 imports = [
4 ../../nixos/profiles/hardware/E5500.nix
5 ../../nixos/profiles/zfs.nix
6 ../../nixos/profiles/zramSwap.nix
7 ];
8
9 boot.kernelParams = [
10 # Avoids huge slow downs, especially with nix.
11 "zfs.zfs_arc_max=${toString (1024 * 1024 * 1024)}" # bytes
12 ];
13
14 # Setting the machine-id avoids to reencrypt all credentials
15 # when reinstalling NixOS on a new drive.
16 # Manually generated with : uuidgen | tr -d -
17 environment.etc.machine-id.source = ./machine-id.clear;
18
19 # The 32-bit host id of the host, formatted as 8 hexadecimal characters.
20 # You should try to make this id unique among your hosts.
21 # Manually generated with : uuidgen | head -c8
22 networking.hostId = "e53001b7";
23
24 boot.loader = {
25 grub = {
26 enable = true;
27 memtest86.enable = true;
28 mirroredBoots = [
29 {
30 path = "/boot1";
31 devices = [ "/dev/disk/by-id/ata-CT250MX500SSD1_2004E2849DD5" ];
32 }
33 ];
34 # Roughly 25MiB (initrd) + 9MiB (kernel) per configuration
35 configurationLimit = 6;
36
37 #zfsSupport = true;
38 #efiSupport = true;
39 #enableCryptodisk = true;
40 };
41 };
42 boot.zfs.requestEncryptionCredentials = [ "${hostName}/root" ];
43
44 hardware.enableRedistributableFirmware = true;
45
46 fileSystems."/boot1" = {
47 device = "/dev/disk/by-partlabel/${hostName}_ssd1_boot";
48 fsType = "vfat";
49 options = [
50 "rw"
51 "noexec"
52 "nodev"
53 "nofail"
54 "X-mount.mkdir"
55 "iocharset=iso8859-1"
56 ];
57 };
58 swapDevices = [
59 {
60 device = "/dev/disk/by-partlabel/${hostName}_ssd1_swap";
61 randomEncryption = {
62 enable = true;
63 cipher = "aes-xts-plain64";
64 source = "/dev/urandom";
65 };
66 }
67 ];
68
69 boot.supportedFilesystems = [
70 "ntfs"
71 "vfat"
72 ];
73
74 fileSystems."/" = {
75 device = "${hostName}/root";
76 fsType = "zfs";
77 options = [ "zfsutil" ];
78 };
79 fileSystems."/nix" = {
80 device = "${hostName}/root/nix";
81 fsType = "zfs";
82 options = [
83 "X-mount.mkdir"
84 "zfsutil"
85 ];
86 };
87 fileSystems."/var" = {
88 device = "${hostName}/root/var";
89 fsType = "zfs";
90 options = [
91 "X-mount.mkdir"
92 "zfsutil"
93 ];
94 };
95
96 services.pipewire.jack.enable = true;
97 }