File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ {
2+ disko . devices = {
3+ disk = {
4+ main = {
5+ type = "disk" ;
6+ # TODO: set to actual device, e.g. "/dev/nvme0n1"
7+ device = "/dev/nvme0n1" ;
8+ content = {
9+ type = "gpt" ;
10+ partitions = {
11+ ESP = {
12+ size = "4G" ;
13+ type = "EF00" ;
14+ content = {
15+ type = "filesystem" ;
16+ format = "vfat" ;
17+ mountpoint = "/boot" ;
18+ mountOptions = [ "defaults" ] ;
19+ } ;
20+ } ;
21+ luks = {
22+ size = "100%" ;
23+ content = {
24+ type = "luks" ;
25+ name = "crypted" ;
26+ settings = {
27+ allowDiscards = true ;
28+ } ;
29+ content = {
30+ type = "lvm_pv" ;
31+ vg = "pool" ;
32+ } ;
33+ } ;
34+ } ;
35+ } ;
36+ } ;
37+ } ;
38+ } ;
39+ lvm_vg = {
40+ pool = {
41+ type = "lvm_vg" ;
42+ lvs = {
43+ root = {
44+ size = "100%FREE" ;
45+ content = {
46+ type = "filesystem" ;
47+ format = "btrfs" ;
48+ mountpoint = "/" ;
49+ mountOptions = [ "defaults" ] ;
50+ } ;
51+ } ;
52+ swap = {
53+ size = "32G" ;
54+ content = {
55+ type = "swap" ;
56+ } ;
57+ } ;
58+ } ;
59+ } ;
60+ } ;
61+ } ;
62+ }
Original file line number Diff line number Diff line change 1- # Generated by 'nixos-generate-config'. Replace with actual hardware config.
2- { modulesPath , ... } :
1+ { inputs , modulesPath , ... } :
32
43{
5- imports =
6- [ ( modulesPath + "/installer/scan/not-detected.nix" )
7- ] ;
4+ imports = [
5+ ( modulesPath + "/installer/scan/not-detected.nix" )
6+ inputs . disko . nixosModules . disko
7+ ./disko-aenderer.nix
8+ ] ;
89
910 # Use the systemd-boot EFI boot loader.
1011 boot . loader . systemd-boot . enable = true ;
1112 boot . loader . efi . canTouchEfiVariables = true ;
1213
13- boot . initrd . availableKernelModules = [ "nvme" "xhci_pci" ] ;
14+ boot . initrd . availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "usbhid" ] ;
1415 boot . initrd . kernelModules = [ ] ;
1516 boot . kernelModules = [ ] ;
1617 boot . extraModulePackages = [ ] ;
1718
18- # TODO: replace with actual disk UUIDs after installation
19- # boot.initrd.luks.devices = { };
20- # fileSystems."/" = { };
21- # fileSystems."/boot" = { };
22- # swapDevices = [ ];
19+ boot . kernel . sysctl = {
20+ "kernel.sysrq" = 64 ; # permit term e, kill i, oom-kill f
21+ } ;
22+
23+ # replace oomd and earlyoom with zswap:
24+ boot . kernelParams = [
25+ "zswap.enabled=1"
26+ "zswap.compressor=lz4"
27+ "zswap.max_pool_percent=20"
28+ "zswap.shrinker_enabled=1"
29+ ] ;
2330}
You can’t perform that action at this time.
0 commit comments