{ config, lib, pkgs, ... }: { config = { boot = { initrd = { luks.devices.plato-unlocked = { device = "/dev/plato/plato-locked"; preLVM = false; allowDiscards = true; }; availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" "r8169" ]; kernelModules = [ "dm-snapshot" ]; }; loader = { grub = { enable = true; version = 2; device = "/dev/sda"; }; }; kernelModules = [ ]; extraModulePackages = [ ]; }; fileSystems = { "/" = { device = "plato-root"; fsType = "tmpfs"; options = [ "mode=755" "size=12G" ]; }; "/boot" = { device = "/dev/disk/by-label/plato-boot"; fsType = "ext4"; options = [ "noatime" "nodiratime" "noexec" ]; }; "/nix" = { device = "/dev/disk/by-label/plato-data"; fsType = "btrfs"; options = [ "subvol=@nix" "compress=zstd" "noatime" "nodiratime" ]; }; "/var/log" = { device = "/dev/disk/by-label/plato-data"; fsType = "btrfs"; options = [ "subvol=@log" "compress=zstd" "noatime" "nodiratime" "noexec" ]; neededForBoot = true; }; "/state" = { device = "/dev/disk/by-label/plato-data"; fsType = "btrfs"; options = [ "subvol=@state" "compress=zstd" "noatime" "nodiratime" "noexec" ]; }; "/home" = { device = "/dev/disk/by-label/plato-data"; fsType = "btrfs"; options = [ "subvol=@home" "compress=zstd" "noatime" "nodiratime" "noexec" ]; }; }; swapDevices = [{ device = "/dev/plato/plato-swap"; randomEncryption.enable = true; }]; networking = { macvlans = { intif0 = { interface = "enp1s0"; mode = "bridge"; }; }; interfaces = { enp1s0.useDHCP = false; intif0 = { macAddress = "02:25:b7:67:c4:c2"; }; }; }; }; } { config, lib, pkgs, ... }: with lib; { boot = { initrd = { availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "sd_mod" ]; kernelModules = [ ]; }; kernelModules = [ "kvm-intel" ]; extraModulePackages = [ ]; loader = { systemd-boot.enable = true; efi.canTouchEfiVariables = true; }; supportedFilesystems = [ "zfs" ]; }; fileSystems = { "/boot" = { device = "/dev/disk/by-label/PLATO-BOOT"; fsType = "vfat"; }; "/" = { device = "zroot/transient/root"; fsType = "zfs"; }; "/nix" = { device = "zroot/transient/nix"; fsType = "zfs"; }; "/var/log" = { device = "zroot/transient/logs"; fsType = "zfs"; neededForBoot = true; }; "/home" = { device = "zroot/persistent/home"; fsType = "zfs"; }; "/state" = { device = "zroot/persistent/state"; fsType = "zfs"; }; }; services.zfs.autoScrub.enable = true; swapDevices = [{ device = "/dev/disk/by-label/plato-swap"; }]; nix.maxJobs = lib.mkDefault 4; hardware.bluetooth.enable = false; networking = { macvlans = { intif0 = { interface = "enp1s0"; mode = "bridge"; }; }; interfaces = { enp1s0.useDHCP = false; intif0 = { macAddress = pkgs.lib.network.generate-mac-address config.instance.hostname "intif0"; }; }; }; }