]> Git — Sourcephile - sourcephile-nix.git/blob - bootstrap/mermet/etc/nixos/hardware-configuration.nix
nix: improve bootstrap/mermet/ upto ssh root@
[sourcephile-nix.git] / bootstrap / mermet / etc / nixos / hardware-configuration.nix
1 # Do not modify this file! It was generated by ‘nixos-generate-config’
2 # and may be overwritten by future invocations. Please make changes
3 # to /etc/nixos/configuration.nix instead.
4 { config, lib, pkgs, ... }:
5
6 {
7 imports =
8 [ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
9 ];
10
11 boot.loader = {
12 grub = {
13 enable = true;
14 version = 2;
15 copyKernels = true;
16 # efiSupport = true;
17 devices = [
18 "/dev/disk/by-id/ata-Samsung_SSD_840_EVO_250GB_S1DBNSAF340110R"
19 ];
20 /*
21 mirroredBoots = [
22 { devices = [ "${disk_id}" ];
23 path = "/boot${bootnum}";
24 }
25 ];
26 */
27 };
28 /*
29 efi = {
30 canTouchEfiVariables = true;
31 efiSysMountPoint = "/boot/efi";
32 efiInstallAsRemovable = false;
33 };
34 */
35 };
36
37 boot.initrd = {
38 availableKernelModules = [
39 "ehci_pci" "ahci" "uas" "sd_mod"
40 # Made the AES modules available at initrd,
41 # to speedup the deciphering of the root.
42 "aes_x86_64"
43 "aesni_intel"
44 "cryptd"
45 ];
46 kernelModules = [ ];
47 };
48 boot.kernelModules = [ ];
49 boot.extraModulePackages = [ ];
50 boot.kernelParams = [
51 "gfxpayload=text"
52 "console=tty0"
53 "console=ttyS0,115200n8"
54 # DEBUG: "boot.shell_on_fail"
55 ];
56 boot.kernel = {
57 sysctl = {
58 "vm.swappiness" = 10;
59 "vm.vfs_cache_pressure" = 50;
60 };
61 };
62
63 # Clean /tmp automatically on boot.
64 boot.cleanTmpDir = true;
65
66 fileSystems."/" =
67 { device = "rpool/root";
68 fsType = "zfs";
69 };
70
71 fileSystems."/boot" =
72 { device = "/dev/disk/by-uuid/dc3c5387-17d2-43b3-bfa2-bf73afacca07";
73 fsType = "ext2";
74 };
75 /*
76 { device = "bpool/boot";
77 fsType = "zfs";
78 };
79 */
80
81 fileSystems."/boot/efi" =
82 { device = "/dev/disk/by-uuid/62E6-E65F";
83 fsType = "vfat";
84 };
85
86 fileSystems."/home" =
87 { device = "rpool/home";
88 fsType = "zfs";
89 };
90
91 fileSystems."/nix" =
92 { device = "rpool/nix";
93 fsType = "zfs";
94 };
95
96 fileSystems."/nix/var" =
97 { device = "rpool/nix/var";
98 fsType = "zfs";
99 };
100
101 fileSystems."/var" =
102 { device = "rpool/var";
103 fsType = "zfs";
104 };
105
106 fileSystems."/var/cache" =
107 { device = "rpool/var/cache";
108 fsType = "zfs";
109 };
110
111 fileSystems."/var/log" =
112 { device = "rpool/var/log";
113 fsType = "zfs";
114 };
115
116 fileSystems."/var/mail" =
117 { device = "rpool/var/mail";
118 fsType = "zfs";
119 };
120
121 fileSystems."/var/tmp" =
122 { device = "rpool/var/tmp";
123 fsType = "zfs";
124 };
125
126 fileSystems."/var/www" =
127 { device = "rpool/var/www";
128 fsType = "zfs";
129 };
130
131 swapDevices =
132 [ { device = "/dev/disk/by-partuuid/6b1eaa35-776b-4e60-b21e-7bcee535dd8b";
133 randomEncryption = {
134 enable = true;
135 cipher = "aes-xts-plain64";
136 source = "/dev/urandom";
137 };
138 }
139 ];
140
141 nix.maxJobs = lib.mkDefault 4;
142 powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
143 }