]> Git — Sourcephile - julm/julm-nix.git/blob - hosts/blackberry/hardware.nix
aubergine: wireshark: enable
[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 { path = "/boot1"; devices = [ "/dev/disk/by-id/ata-CT250MX500SSD1_2004E2849DD5" ]; }
30 ];
31 # Roughly 25MiB (initrd) + 9MiB (kernel) per configuration
32 configurationLimit = 6;
33
34 #zfsSupport = true;
35 #efiSupport = true;
36 #enableCryptodisk = true;
37 };
38 };
39 boot.zfs.requestEncryptionCredentials = [ "${hostName}/root" ];
40
41 hardware.enableRedistributableFirmware = true;
42
43 fileSystems."/boot1" =
44 {
45 device = "/dev/disk/by-partlabel/${hostName}_ssd1_boot";
46 fsType = "vfat";
47 options = [ "rw" "noexec" "nodev" "nofail" "X-mount.mkdir" "iocharset=iso8859-1" ];
48 };
49 swapDevices = [
50 {
51 device = "/dev/disk/by-partlabel/${hostName}_ssd1_swap";
52 randomEncryption = {
53 enable = true;
54 cipher = "aes-xts-plain64";
55 source = "/dev/urandom";
56 };
57 }
58 ];
59
60 boot.supportedFilesystems = [ "ntfs" "vfat" ];
61
62 fileSystems."/" =
63 {
64 device = "${hostName}/root";
65 fsType = "zfs";
66 options = [ "zfsutil" ];
67 };
68 fileSystems."/nix" =
69 {
70 device = "${hostName}/root/nix";
71 fsType = "zfs";
72 options = [ "X-mount.mkdir" "zfsutil" ];
73 };
74 fileSystems."/var" =
75 {
76 device = "${hostName}/root/var";
77 fsType = "zfs";
78 options = [ "X-mount.mkdir" "zfsutil" ];
79 };
80
81 services.pipewire.jack.enable = true;
82
83 }