83 lines
1.6 KiB
Nix
83 lines
1.6 KiB
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
{
|
|
imports = [ <nixpkgs/nixos/modules/installer/scan/not-detected.nix> ];
|
|
|
|
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" ];
|
|
kernelPackages = pkgs.linuxPackages_latest;
|
|
};
|
|
|
|
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 = {
|
|
hostId = substring 0 8 (fileContents /etc/machine-id);
|
|
|
|
macvlans = {
|
|
intif0 = {
|
|
interface = "enp1s0";
|
|
mode = "bridge";
|
|
};
|
|
};
|
|
|
|
interfaces = {
|
|
intif0 = {
|
|
# output of: echo plato-intif0|md5sum|sed 's/^\(..\)\(..\)\(..\)\(..\)\(..\).*$/02:\1:\2:\3:\4:\5/'
|
|
macAddress = "02:25:b7:67:c4:c2";
|
|
};
|
|
};
|
|
};
|
|
}
|