]> Git — Sourcephile - julm/julm-nix.git/blob - hosts/aubergine/hardware.nix
nix: format with nixfmt-rfc-style
[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/zramSwap.nix
14 ../../nixos/profiles/pipewire.nix
15 ];
16
17 # Setting the machine-id avoids to reencrypt all credentials
18 # when reinstalling NixOS on a new drive.
19 # Manually generated with : uuidgen | tr -d -
20 environment.etc.machine-id.source = ./machine-id.clear;
21
22 # The 32-bit host id of the host, formatted as 8 hexadecimal characters.
23 # You should try to make this id unique among your hosts.
24 # Manually generated with : uuidgen | head -c8
25 networking.hostId = "408a404a";
26
27 /*
28 boot.loader.efi = {
29 canTouchEfiVariables = true;
30 efiSysMountPoint = "/boot/efi";
31 };
32 */
33 boot.loader.grub = {
34 enable = true;
35 devices = [
36 #"/dev/disk/by-id/mmc-SU08G_0xb0320f0f"
37 #"/dev/disk/by-id/usb-Generic-_Multi-Card_20071114173400000-0:0"
38 "/dev/disk/by-id/ata-YMTC_JGS_2201060101833"
39 ];
40 configurationLimit = 9;
41
42 #zfsSupport = true;
43 #efiSupport = true;
44 #enableCryptodisk = true;
45 };
46
47 boot.supportedFilesystems = [
48 # "ntfs"
49 "vfat"
50 ];
51 boot.extraModulePackages = [
52 #config.boot.kernelPackages.exfat-nofuse
53 ];
54 boot.zfs.requestEncryptionCredentials = [ hostName ];
55
56 hardware.enableRedistributableFirmware = true;
57
58 powerManagement.powertop.enable = true;
59
60 #services.fprintd.enable = true;
61
62 fileSystems."/" = {
63 device = "${hostName}/root";
64 fsType = "zfs";
65 };
66 fileSystems."/boot" = {
67 device = "/dev/disk/by-partlabel/${hostName}_ssd_boot";
68 fsType = "ext4";
69 };
70 fileSystems."/boot/efi" = {
71 device = "/dev/disk/by-partlabel/${hostName}_ssd_efi";
72 fsType = "vfat";
73 };
74 fileSystems."/nix" = {
75 device = "${hostName}/nix";
76 fsType = "zfs";
77 };
78 fileSystems."/var" = {
79 device = "${hostName}/var";
80 fsType = "zfs";
81 };
82 fileSystems."/home" = {
83 device = "${hostName}/home";
84 fsType = "zfs";
85 };
86 swapDevices = [
87 {
88 device = "/dev/disk/by-partlabel/${hostName}_ssd_swap";
89 randomEncryption = {
90 enable = true;
91 cipher = "aes-xts-plain64";
92 source = "/dev/urandom";
93 };
94 }
95 ];
96
97 }