nixos-config/config/hardware/nutboy3.nix

97 lines
2.0 KiB
Nix
Raw Normal View History

2021-11-13 10:30:58 -08:00
{ config, lib, pkgs, ... }:
with lib; {
boot = {
initrd = {
2022-08-22 11:30:18 -07:00
availableKernelModules =
[ "ehci_pci" "ahci" "isci" "usbhid" "usb_storage" "sd_mod" ];
2021-11-13 10:30:58 -08:00
kernelModules = [ "dm-snapshot" ];
};
2021-11-13 11:13:38 -08:00
kernelModules = [ "kvm-intel" ];
2021-11-13 10:30:58 -08:00
extraModulePackages = [ ];
loader.grub = {
enable = true;
device = "/dev/sda";
};
supportedFilesystems = [ "btrfs" ];
};
2022-08-22 11:30:18 -07:00
system.stateVersion = "21.11";
2021-11-13 10:30:58 -08:00
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/data";
fsType = "btrfs";
options = [ "subvol=@nix" "compress=zstd" "noatime" "nodiratime" ];
};
"/var/log" = {
device = "/dev/disk/by-label/data";
fsType = "btrfs";
2022-08-22 11:30:18 -07:00
options =
[ "subvol=@logs" "compress=zstd" "noatime" "nodiratime" "noexec" ];
2021-11-13 10:30:58 -08:00
neededForBoot = true;
};
"/state" = {
device = "/dev/disk/by-label/data";
fsType = "btrfs";
2022-08-22 11:30:18 -07:00
options =
[ "subvol=@state" "compress=zstd" "noatime" "nodiratime" "noexec" ];
2021-11-13 10:30:58 -08:00
};
2022-03-16 09:49:35 -07:00
"/var/lib/acme" = {
device = "/dev/disk/by-label/data";
fsType = "btrfs";
2022-08-22 11:30:18 -07:00
options =
[ "subvol=@acme" "compress=zstd" "noatime" "nodiratime" "noexec" ];
2022-03-16 09:49:35 -07:00
};
"/var/lib/prometheus" = {
device = "/dev/disk/by-label/data";
fsType = "btrfs";
2022-08-22 11:30:18 -07:00
options = [
"subvol=@prometheus"
"compress=zstd"
"noatime"
"nodiratime"
"noexec"
];
2022-03-16 09:49:35 -07:00
};
2021-11-13 10:30:58 -08:00
};
swapDevices = [{ device = "/dev/disk/by-label/swap"; }];
networking = {
macvlans = {
extif0 = {
interface = "eno1";
mode = "bridge";
};
};
useDHCP = false;
interfaces = {
extif0 = {
macAddress =
2022-08-22 11:30:18 -07:00
pkgs.lib.network.generate-mac-address config.instance.hostname
"extif0";
2021-11-13 10:30:58 -08:00
};
};
};
}