kore / nixos / hosts / peony.nix76 lines · 1811B · raw
1{ inputs, modulesPath, ... }:
2
3{
4 imports = [
5 inputs.disko.nixosModules.disko
6
7 ( modulesPath + "/installer/scan/not-detected.nix" )
8 ];
9
10 boot = {
11 kernelModules = [ "kvm-intel" ];
12
13 loader = {
14 systemd-boot.enable = true;
15 efi.canTouchEfiVariables = true;
16 };
17
18 initrd = {
19 systemd.enable = true;
20 availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
21 };
22 };
23
24 hardware = {
25 graphics.enable = true;
26 cpu.intel.updateMicrocode = true;
27 };
28
29 disko.devices.disk.main = {
30 type = "disk";
31 device = "/dev/disk/by-id/ata-OCPC_SSD_2.5__SATA_III_240GB_LITE_2507220200324";
32 content = {
33 type = "gpt";
34 partitions = {
35 ESP = {
36 size = "1G";
37 type = "EF00";
38 content = {
39 type = "filesystem";
40 format = "vfat";
41 mountpoint = "/boot";
42 mountOptions = [ "umask=0077" ];
43 };
44 };
45 luks = {
46 size = "100%";
47 content = {
48 type = "luks";
49 name = "crypted";
50 settings.allowDiscards = true;
51 content = {
52 type = "btrfs";
53 extraArgs = [ "-f" ];
54 subvolumes = let
55 options = [ "compress=zstd" "noatime" "ssd" "discard=async" ];
56 in {
57 "/@" = {
58 mountpoint = "/";
59 mountOptions = options;
60 };
61 "/@nix" = {
62 mountpoint = "/nix";
63 mountOptions = options;
64 };
65 "/@persist" = {
66 mountpoint = "/persist";
67 mountOptions = options;
68 };
69 };
70 };
71 };
72 };
73 };
74 };
75 };
76}