76 lines
1.6 KiB
Nix
76 lines
1.6 KiB
Nix
|
{ config, lib, pkgs, ... }:
|
||
|
|
||
|
with lib; {
|
||
|
boot = {
|
||
|
initrd = {
|
||
|
availableKernelModules = [
|
||
|
"ahci"
|
||
|
"usbhid"
|
||
|
];
|
||
|
kernelModules = [ "dm-snapshot" ];
|
||
|
};
|
||
|
kernelModules = [ ];
|
||
|
extraModulePackages = [ ];
|
||
|
loader.grub = {
|
||
|
enable = true;
|
||
|
version = 2;
|
||
|
device = "/dev/sda";
|
||
|
};
|
||
|
|
||
|
supportedFilesystems = [ "btrfs" ];
|
||
|
};
|
||
|
|
||
|
fileSystems = {
|
||
|
"/" = {
|
||
|
device = "root-tmpfs";
|
||
|
fsType = "tmpfs";
|
||
|
options = [ "mode=755" "noexec" ];
|
||
|
};
|
||
|
|
||
|
"/boot" = {
|
||
|
device = "/dev/disk/by-label/boot";
|
||
|
fsType = "ext4";
|
||
|
options = [ "noexec" "noatime" "nodiratime" ];
|
||
|
};
|
||
|
|
||
|
"/nix" = {
|
||
|
device = "/dev/disk/by-label/system";
|
||
|
fsType = "btrfs";
|
||
|
options = [ "subvol=@nix" "compress=zstd" "noatime" "nodiratime" ];
|
||
|
};
|
||
|
|
||
|
"/var/log" = {
|
||
|
device = "/dev/disk/by-label/system";
|
||
|
fsType = "btrfs";
|
||
|
options = [ "subvol=@logs" "compress=zstd" "noatime" "nodiratime" "noexec" ];
|
||
|
neededForBoot = true;
|
||
|
};
|
||
|
|
||
|
"/state" = {
|
||
|
device = "/dev/disk/by-label/system";
|
||
|
fsType = "btrfs";
|
||
|
options = [ "subvol=@state" "compress=zstd" "noatime" "nodiratime" "noexec" ];
|
||
|
};
|
||
|
};
|
||
|
|
||
|
swapDevices = [{ device = "/dev/disk/by-label/swap"; }];
|
||
|
|
||
|
networking = {
|
||
|
macvlans = {
|
||
|
extif0 = {
|
||
|
interface = "eno2";
|
||
|
mode = "bridge";
|
||
|
};
|
||
|
};
|
||
|
|
||
|
useDHCP = false;
|
||
|
|
||
|
interfaces = {
|
||
|
extif0 = {
|
||
|
# output of: echo legatus-extif0|md5sum|sed 's/^\(..\)\(..\)\(..\)\(..\)\(..\).*$/02:\1:\2:\3:\4:\5/'
|
||
|
macAddress = pkgs.lib.fudo.network.generate-mac-address "legatus" "extif0";
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
}
|