Commit to move
This commit is contained in:
+82
-69
@@ -1,85 +1,98 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
let generateMac = pkgs.lib.network.generate-mac-address;
|
||||
|
||||
in {
|
||||
system.stateVersion = "21.05";
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot = {
|
||||
initrd = {
|
||||
availableKernelModules = [
|
||||
"uhci_hcd"
|
||||
"ehci_pci"
|
||||
"ata_piix"
|
||||
"hpsa"
|
||||
"usb_storage"
|
||||
"usbhid"
|
||||
"sd_mod"
|
||||
"sr_mod"
|
||||
];
|
||||
kernelModules = [ ];
|
||||
};
|
||||
config = {
|
||||
|
||||
kernelModules = [ "kvm-intel" ];
|
||||
supportedFilesystems = [ "zfs" ];
|
||||
system.stateVersion = "22.05";
|
||||
|
||||
loader.grub = {
|
||||
enable = true;
|
||||
version = 2;
|
||||
device = "/dev/disk/by-id/wwn-0x600508b1001cecf6b880f591f9b18b29";
|
||||
};
|
||||
};
|
||||
boot = {
|
||||
initrd = {
|
||||
luks.devices.lambda-unlocked = {
|
||||
device = "/dev/disk/by-uuid/e90c9dda-4e4c-4ca1-8897-39fcebc03479";
|
||||
allowDiscards = true;
|
||||
};
|
||||
|
||||
fileSystems = {
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-label/lambda-boot";
|
||||
fsType = "ext4";
|
||||
options = [ "noexec" "noatime" "nodiratime" ];
|
||||
};
|
||||
availableKernelModules = [
|
||||
"uhci_hcd"
|
||||
"ehci_pci"
|
||||
"ata_piix"
|
||||
"hpsa"
|
||||
"usb_storage"
|
||||
"usbhid"
|
||||
"sd_mod"
|
||||
"sr_mod"
|
||||
];
|
||||
kernelModules = [ "dm-snapshot" ];
|
||||
};
|
||||
|
||||
"/" = {
|
||||
device = "none";
|
||||
fsType = "tmpfs";
|
||||
options = [ "noexec" "mode=755" ];
|
||||
};
|
||||
kernelModules = [ "kvm-intel" ];
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
"/nix" = {
|
||||
device = "lambda/transient/nix";
|
||||
fsType = "zfs";
|
||||
options = [ "noatime" "nodiratime" ];
|
||||
};
|
||||
|
||||
"/var/log" = {
|
||||
device = "lambda/transient/logs";
|
||||
fsType = "zfs";
|
||||
neededForBoot = true;
|
||||
options = [ "noexec" "noatime" "nodiratime" ];
|
||||
};
|
||||
|
||||
"/state" = {
|
||||
device = "lambda/persistent/state";
|
||||
fsType = "zfs";
|
||||
options = [ "noexec" "noatime" "nodiratime" ];
|
||||
};
|
||||
};
|
||||
|
||||
swapDevices = [{ device = "/dev/disk/by-label/lambda-swap"; }];
|
||||
|
||||
nix.settings.max-jobs = lib.mkDefault 12;
|
||||
|
||||
networking = {
|
||||
macvlans = {
|
||||
intif0 = {
|
||||
interface = "enp3s0f1";
|
||||
mode = "bridge";
|
||||
loader.grub = {
|
||||
enable = true;
|
||||
version = 2;
|
||||
device = "/dev/disk/by-id/scsi-3600508b1001c3be9174b4bdb31935121";
|
||||
};
|
||||
};
|
||||
|
||||
interfaces = {
|
||||
intif0 = {
|
||||
# output of: echo lambda-intif0|md5sum|sed 's/^\(..\)\(..\)\(..\)\(..\)\(..\).*$/02:\1:\2:\3:\4:\5/'
|
||||
macAddress = "02:f5:fe:8c:22:fe";
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "lambda-root";
|
||||
fsType = "tmpfs";
|
||||
options = [ "mode=755" "size=32G" "noexec" ];
|
||||
};
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-label/lambda-boot";
|
||||
fsType = "ext4";
|
||||
options = [ "noatime" "noexec" ];
|
||||
};
|
||||
"/state" = {
|
||||
device = "/dev/mapper/lambda-unlocked";
|
||||
fsType = "btrfs";
|
||||
options = [ "noatime" "compress=zstd" "noexec" "subvol=@state" ];
|
||||
};
|
||||
"/nix" = {
|
||||
device = "/dev/mapper/lambda-unlocked";
|
||||
fsType = "btrfs";
|
||||
options = [ "noatime" "compress=zstd" "subvol=@nix" ];
|
||||
};
|
||||
"/home" = {
|
||||
device = "/dev/mapper/lambda-unlocked";
|
||||
fsType = "btrfs";
|
||||
options = [ "noatime" "compress=zstd" "noexec" "subvol=@home" ];
|
||||
};
|
||||
"/var/log" = {
|
||||
device = "/dev/mapper/lambda-unlocked";
|
||||
fsType = "btrfs";
|
||||
options = [ "noatime" "compress=zstd" "noexec" "subvol=@log" ];
|
||||
};
|
||||
};
|
||||
|
||||
swapDevices = [{
|
||||
device = "/dev/disk/by-id/scsi-3600508b1001c3be9174b4bdb31935121-part2";
|
||||
randomEncryption.enable = true;
|
||||
}];
|
||||
|
||||
nix.settings.max-jobs = lib.mkDefault 24;
|
||||
|
||||
networking = {
|
||||
useDHCP = false;
|
||||
macvlans = {
|
||||
intif0 = {
|
||||
interface = "enp4s0f1";
|
||||
mode = "bridge";
|
||||
};
|
||||
};
|
||||
|
||||
interfaces = {
|
||||
intif0 = {
|
||||
macAddress = generateMac config.instance.hostname "intif0";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user