/
hardware-configuration.nix
76 lines (66 loc) · 1.81 KB
/
hardware-configuration.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# Do not modify this file! It was generated by ‘nixos-generate-config’
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, ... }:
{
imports = [ <nixpkgs/nixos/modules/installer/scan/not-detected.nix> ];
boot.initrd.availableKernelModules = [
"ahci"
"firewire_ohci"
"usb_storage"
"usbhid"
"usb_uhci"
"usb_ohci"
"sdhci_pci"
];
boot.supportedFilesystems = [ "zfs" ];
boot.kernelModules = [ "kvm-intel" ];
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.systemd-boot.enable = true;
hardware.opengl.extraPackages = with pkgs; [ vaapiIntel ];
boot.tmpOnTmpfs = true;
services.zfs.autoScrub.enable = true;
services.zfs.trim.enable = true;
boot.zfs.enableUnstable = true;
services.zfs.autoSnapshot = {
enable = true;
frequent = 4; # keep the latest eight 15-minute snapshots (instead of four)
monthly = 12; # keep only one monthly snapshot (instead of twelve)
};
zramSwap = {
enable = true;
algorithm = "zstd";
swapDevices = 1;
};
fileSystems."/" = {
device = "system/root";
fsType = "zfs";
};
fileSystems."/nix" = {
device = "system/nix";
fsType = "zfs";
};
fileSystems."/etc/nixos" = {
device = "system/root/nixos";
fsType = "zfs";
};
fileSystems."/home" = {
device = "system/home";
fsType = "zfs";
};
fileSystems."/LocalDiskF" = {
device = "shit/shit";
fsType = "zfs";
};
fileSystems."/cache" = {
device = "system/cache";
fsType = "zfs";
};
fileSystems."/boot" = {
device = "/dev/disk/by-id/ata-GOODRAM_A45A0775118600020829-part1";
fsType = "vfat";
};
swapDevices =
[{ device = "/dev/disk/by-id/ata-GOODRAM_A45A0775118600020829-part2"; }];
nix.maxJobs = lib.mkDefault 2;
}