]> Git — Sourcephile - julm/julm-nix.git/blob - hosts/patate/hardware.nix
acpi: set powersave on boot
[julm/julm-nix.git] / hosts / patate / hardware.nix
1 { config, lib, pkgs, hostName, ... }:
2 {
3 imports = [
4 ../../nixos/profiles/acpid.nix
5 ../../nixos/profiles/hardware/thinkpad.nix
6 ../../nixos/profiles/zfs.nix
7 ../../nixos/profiles/zramSwap.nix
8 ];
9
10 boot.loader.grub = {
11 enable = true;
12 version = 2;
13 device = "/dev/disk/by-id/ata-CT250MX500SSD1_2004E2849DD1";
14 configurationLimit = 3;
15 };
16
17 fileSystems."/boot" =
18 { device = "/dev/disk/by-partlabel/${hostName}_ssd_boot";
19 fsType = "ext2";
20 };
21 fileSystems."/boot/efi" =
22 { device = "/dev/disk/by-partlabel/${hostName}_ssd_efi";
23 fsType = "vfat";
24 };
25 swapDevices = [
26 { device = "/dev/disk/by-partlabel/${hostName}_ssd_swap";
27 randomEncryption = {
28 enable = true;
29 cipher = "aes-xts-plain64";
30 source = "/dev/urandom";
31 };
32 }
33 ];
34
35 # The 32-bit host id of the host, formatted as 8 hexadecimal characters.
36 # You should try to make this id unique among your hosts.
37 # Manually generated with : head -c4 /dev/urandom | od -A none -t x4 | cut -d ' ' -f 2
38 networking.hostId = "ec2adb40";
39
40 boot.supportedFilesystems = [ "ntfs" "vfat" ];
41 boot.extraModulePackages = [
42 #config.boot.kernelPackages.exfat-nofuse
43 ];
44
45 powerManagement.powertop.enable = true;
46
47 fileSystems."/" =
48 { device = "${hostName}/root";
49 fsType = "zfs";
50 };
51 fileSystems."/nix" =
52 { device = "${hostName}/nix";
53 fsType = "zfs";
54 };
55 fileSystems."/home/sevy" =
56 { device = "${hostName}/home";
57 fsType = "zfs";
58 };
59 fileSystems."/home/sevy/Documents" =
60 { device = "${hostName}/home/Documents";
61 fsType = "zfs";
62 };
63 fileSystems."/home/sevy/Images" =
64 { device = "${hostName}/home/Images";
65 fsType = "zfs";
66 };
67 fileSystems."/home/sevy/Téléchargements" =
68 { device = "${hostName}/home/Downloads";
69 fsType = "zfs";
70 };
71 fileSystems."/home/sevy/.thunderbird" =
72 { device = "${hostName}/home/Mails";
73 fsType = "zfs";
74 };
75 fileSystems."/home/sevy/Vidéos" =
76 { device = "${hostName}/home/Videos";
77 fsType = "zfs";
78 };
79 fileSystems."/var" =
80 { device = "${hostName}/var";
81 fsType = "zfs";
82 };
83 fileSystems."/var/cache" =
84 { device = "${hostName}/var/cache";
85 fsType = "zfs";
86 };
87 fileSystems."/var/log" =
88 { device = "${hostName}/var/log";
89 fsType = "zfs";
90 };
91 fileSystems."/var/tmp" =
92 { device = "${hostName}/var/tmp";
93 fsType = "zfs";
94 };
95
96 }