95 lines
2.2 KiB
Nix
95 lines
2.2 KiB
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib; {
|
|
system.stateVersion = "20.09";
|
|
|
|
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;
|
|
};
|
|
};
|
|
|
|
fileSystems = {
|
|
"/" = {
|
|
device = "limina-root";
|
|
fsType = "tmpfs";
|
|
options = [ "mode=755" "noexec" ];
|
|
};
|
|
|
|
"/boot" = {
|
|
device = "/dev/disk/by-label/LIM-BOOT";
|
|
fsType = "vfat";
|
|
options = [ "noexec" "noatime" "nodiratime" ];
|
|
};
|
|
|
|
"/nix" = {
|
|
device = "/dev/disk/by-label/limina-data";
|
|
fsType = "btrfs";
|
|
options = [ "subvol=@nix" "noatime" "nodiratime" ];
|
|
};
|
|
|
|
"/var/log" = {
|
|
device = "/dev/disk/by-label/limina-data";
|
|
fsType = "btrfs";
|
|
options = [ "subvol=@log" "noexec" "noatime" "nodiratime" ];
|
|
neededForBoot = true;
|
|
};
|
|
|
|
"/state" = {
|
|
device = "/dev/disk/by-label/limina-data";
|
|
fsType = "btrfs";
|
|
options = [ "subvol=@state" "noexec" "noatime" "nodiratime" ];
|
|
neededForBoot = true;
|
|
};
|
|
|
|
"/var/lib/private" = {
|
|
device = "/dev/disk/by-label/limina-data";
|
|
fsType = "btrfs";
|
|
options = [ "subvol=@var-private" "noexec" "noatime" "nodiratime" ];
|
|
neededForBoot = true;
|
|
};
|
|
};
|
|
|
|
swapDevices = [{ device = "/dev/disk/by-label/limina-swap"; }];
|
|
|
|
nix.settings.max-jobs = lib.mkDefault 4;
|
|
|
|
hardware.bluetooth.enable = false;
|
|
|
|
networking = {
|
|
macvlans = {
|
|
intif0 = {
|
|
interface = "enp2s0";
|
|
mode = "bridge";
|
|
};
|
|
intif1 = {
|
|
interface = "enp3s0";
|
|
mode = "bridge";
|
|
};
|
|
intif2 = {
|
|
interface = "enp4s0";
|
|
mode = "bridge";
|
|
};
|
|
};
|
|
|
|
interfaces = {
|
|
enp2s0.useDHCP = false;
|
|
enp3s0.useDHCP = false;
|
|
enp4s0.useDHCP = false;
|
|
|
|
# output of: echo limina-${if}|md5sum|sed 's/^\(..\)\(..\)\(..\)\(..\)\(..\).*$/02:\1:\2:\3:\4:\5/'
|
|
intif0 = { macAddress = "02:dc:59:b4:a7:8c"; };
|
|
intif1 = { macAddress = "02:df:43:1d:8a:63"; };
|
|
intif2 = { macAddress = "02:55:d9:05:23:36"; };
|
|
};
|
|
};
|
|
}
|