]> Git — Sourcephile - julm/julm-nix.git/blob - hosts/aubergine/hardware.nix
+user/perf(zswap): use zswap instead zramSwap
[julm/julm-nix.git] / hosts / aubergine / hardware.nix
1 {
2 pkgs,
3 lib,
4 hostName,
5 ...
6 }:
7 {
8 imports = [
9 ../../nixos/profiles/hardware/apu6b4.nix
10 ../../nixos/profiles/hardware/ME909u-521.nix
11 ../../nixos/profiles/serial.nix
12 ../../nixos/profiles/zfs.nix
13 ../../nixos/profiles/pipewire.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 = "408a404a";
25
26 /*
27 boot.loader.efi = {
28 canTouchEfiVariables = true;
29 efiSysMountPoint = "/boot/efi";
30 };
31 */
32 boot.loader.grub = {
33 enable = true;
34 devices = [
35 #"/dev/disk/by-id/mmc-SU08G_0xb0320f0f"
36 #"/dev/disk/by-id/usb-Generic-_Multi-Card_20071114173400000-0:0"
37 "/dev/disk/by-id/ata-YMTC_JGS_2201060101833"
38 ];
39 configurationLimit = 9;
40
41 #zfsSupport = true;
42 #efiSupport = true;
43 #enableCryptodisk = true;
44 };
45
46 boot.supportedFilesystems = [
47 # "ntfs"
48 "vfat"
49 ];
50 boot.extraModulePackages = [
51 #config.boot.kernelPackages.exfat-nofuse
52 ];
53 boot.zfs.requestEncryptionCredentials = [ hostName ];
54
55 hardware.enableRedistributableFirmware = true;
56
57 powerManagement.powertop.enable = true;
58
59 #services.fprintd.enable = true;
60
61 fileSystems."/" = {
62 device = "${hostName}/root";
63 fsType = "zfs";
64 };
65 fileSystems."/boot" = {
66 device = "/dev/disk/by-partlabel/${hostName}_ssd_boot";
67 fsType = "ext4";
68 };
69 fileSystems."/boot/efi" = {
70 device = "/dev/disk/by-partlabel/${hostName}_ssd_efi";
71 fsType = "vfat";
72 };
73 fileSystems."/nix" = {
74 device = "${hostName}/nix";
75 fsType = "zfs";
76 };
77 fileSystems."/var" = {
78 device = "${hostName}/var";
79 fsType = "zfs";
80 };
81 fileSystems."/home" = {
82 device = "${hostName}/home";
83 fsType = "zfs";
84 };
85 swapDevices = [
86 {
87 device = "/dev/disk/by-partlabel/${hostName}_ssd_swap";
88 randomEncryption = {
89 enable = true;
90 cipher = "aes-xts-plain64";
91 source = "/dev/urandom";
92 };
93 }
94 ];
95
96 }