]> Git — Sourcephile - sourcephile-nix.git/blob - bootstrap/sévy/hardware.nix
nixops: add mermet
[sourcephile-nix.git] / bootstrap / sévy / hardware.nix
1 { config, lib, pkgs, ... }: {
2 imports =
3 [ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
4 ];
5
6 # https://bugzilla.kernel.org/show_bug.cgi?id=110941
7 boot.kernelParams = [ "intel_pstate=no_hwp" ];
8 boot.kernelModules = [ "kvm-intel" ];
9 boot.extraModulePackages = [
10 config.boot.kernelPackages.exfat-nofuse
11 ];
12 boot.extraModprobeConfig = ''
13 options thinkpad_acpi fan_control=1
14 '';
15
16 boot.loader.grub = {
17 enable = true;
18 version = 2;
19 device = "/dev/disk/by-id/ata-Samsung_SSD_860_EVO_250GB_S3YJNX0K863141Y";
20 #enableCryptodisk = true;
21 };
22
23 boot.initrd.availableKernelModules = [
24 "aes_x86_64"
25 "aesni_intel"
26 "ahci"
27 "cryptd"
28 "dm_crypt"
29 "dm_mod"
30 "drbg"
31 "ehci_pci"
32 "gf128mul"
33 "hmac"
34 "sd_mod"
35 "sha256_generic"
36 "uas"
37 "xts"
38 ];
39 boot.initrd.luks.cryptoModules = ["aes_x86_64" "sha256" "sha1" "xts"];
40 boot.initrd.luks.devices = [
41 {
42 name = "crypted";
43 device = "/dev/disk/by-id/ata-Samsung_SSD_860_EVO_250GB_S3YJNX0K863141Y-part2";
44 allowDiscards = true;
45 #preLVM = false;
46 }
47 ];
48
49 boot.kernel.sysctl = {
50 "vm.swappiness" = 10;
51 "vm.vfs_cache_pressure" = 50;
52 };
53
54 fileSystems."/boot" =
55 { device = "/dev/disk/by-uuid/8f84431f-f646-4da9-9f34-af0f7d9bb914";
56 fsType = "ext4";
57 };
58
59 fileSystems."/" =
60 {
61 device = "/dev/disk/by-uuid/30c38c75-4fc7-4185-a7db-b5e2c989e853";
62 fsType = "ext4";
63 options = [ "noatime" "nodiratime" "discard" ];
64 };
65 fileSystems."/home" =
66 { device = "/dev/disk/by-uuid/62ca342a-9c6e-47bf-9eac-bc8c28b491bb";
67 fsType = "ext4";
68 options = [ "noatime" "nodiratime" "discard" ];
69 };
70 swapDevices =
71 [ { device = "/dev/disk/by-uuid/27af6bf3-5884-49aa-aa5b-dae43c2fd634"; }
72 ];
73
74 nix.maxJobs = lib.mkDefault 4;
75 powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
76 }