113 lines
2.2 KiB
Nix
113 lines
2.2 KiB
Nix
|
{ config, lib, pkgs, ... }:
|
||
|
|
||
|
with lib;
|
||
|
{
|
||
|
imports = [ <nixpkgs/nixos/modules/installer/scan/not-detected.nix> ];
|
||
|
|
||
|
boot = {
|
||
|
initrd = {
|
||
|
availableKernelModules =
|
||
|
[ "ahci" "xhci_pci" "ehci_pci" "usbhid" "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/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/swap"; }];
|
||
|
|
||
|
nix.maxJobs = lib.mkDefault 4;
|
||
|
|
||
|
hardware.bluetooth.enable = false;
|
||
|
|
||
|
networking = {
|
||
|
hostId = substring 0 8 (fileContents /state/etc/machine-id);
|
||
|
|
||
|
macvlans = {
|
||
|
extif0 = {
|
||
|
interface = "enp1s0";
|
||
|
mode = "bridge";
|
||
|
};
|
||
|
intif0 = {
|
||
|
interface = "enp2s0";
|
||
|
mode = "bridge";
|
||
|
};
|
||
|
intif1 = {
|
||
|
interface = "enp3s0";
|
||
|
mode = "bridge";
|
||
|
};
|
||
|
intif2 = {
|
||
|
interface = "enp4s0";
|
||
|
mode = "bridge";
|
||
|
};
|
||
|
};
|
||
|
|
||
|
interfaces = {
|
||
|
enp1s0.useDHCP = false;
|
||
|
enp2s0.useDHCP = false;
|
||
|
enp3s0.useDHCP = false;
|
||
|
enp4s0.useDHCP = false;
|
||
|
|
||
|
# output of: echo limina-${if}|md5sum|sed 's/^\(..\)\(..\)\(..\)\(..\)\(..\).*$/02:\1:\2:\3:\4:\5/'
|
||
|
extif0 = {
|
||
|
macAddress = "02:fd:79:94:a2:a8";
|
||
|
useDHCP = true;
|
||
|
};
|
||
|
|
||
|
intif0 = {
|
||
|
macAddress = "02:dc:59:b4:a7:8c";
|
||
|
};
|
||
|
|
||
|
intif1 = {
|
||
|
macAddress = "02:df:43:1d:8a:63";
|
||
|
};
|
||
|
|
||
|
intif2 = {
|
||
|
macAddress = "02:55:d9:05:23:36";
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
}
|