2023-05-16 22:40:08 -07:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
system.stateVersion = "22.05";
|
|
|
|
|
|
|
|
boot = {
|
|
|
|
loader = {
|
|
|
|
systemd-boot.enable = true;
|
|
|
|
efi.canTouchEfiVariables = true;
|
|
|
|
};
|
|
|
|
initrd = {
|
|
|
|
availableKernelModules =
|
|
|
|
[ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
|
|
|
kernelModules = [ ];
|
|
|
|
};
|
|
|
|
kernelModules = [ "kvm-amd" ];
|
|
|
|
extraModulePackages = [ ];
|
|
|
|
};
|
|
|
|
|
|
|
|
fileSystems = {
|
|
|
|
"/" = {
|
|
|
|
device = "toothless-root";
|
|
|
|
fsType = "tmpfs";
|
|
|
|
options = [ "mode=755" "noexec" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
"/boot" = {
|
|
|
|
device = "/dev/disk/by-label/TOOTH-BOOT";
|
|
|
|
fsType = "vfat";
|
|
|
|
options = [ "noatime" "noexec" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
"/nix" = {
|
|
|
|
device = "/dev/disk/by-label/toothless-data";
|
|
|
|
fsType = "btrfs";
|
|
|
|
options = [ "subvol=@nix" "noatime" "compress=zstd" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
"/state" = {
|
|
|
|
device = "/dev/disk/by-label/toothless-data";
|
|
|
|
fsType = "btrfs";
|
|
|
|
options = [ "subvol=@state" "noatime" "compress=zstd" "noexec" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
"/home" = {
|
|
|
|
device = "/dev/disk/by-label/toothless-data";
|
|
|
|
fsType = "btrfs";
|
|
|
|
options = [ "subvol=@home" "noatime" "compress=zstd" "noexec" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
"/var/log" = {
|
|
|
|
device = "/dev/disk/by-label/toothless-data";
|
|
|
|
fsType = "btrfs";
|
|
|
|
options = [ "subvol=@log" "noatime" "compress=zstd" "noexec" ];
|
|
|
|
};
|
2024-05-21 23:16:02 -07:00
|
|
|
|
|
|
|
"/var/lib/tailscale" = {
|
|
|
|
device = "/dev/disk/by-label/toothless-data";
|
|
|
|
fsType = "btrfs";
|
|
|
|
options = [ "noatime" "compress=zstd" "noexec" "subvol=@tailscale" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
"/var/lib/containers" = {
|
|
|
|
device = "/dev/disk/by-label/toothless-data";
|
|
|
|
fsType = "btrfs";
|
|
|
|
options = [ "noatime" "compress=zstd" "noexec" "subvol=@containers" ];
|
|
|
|
};
|
2023-05-16 22:40:08 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
swapDevices = [{ device = "/dev/disk/by-label/toothless-swap"; }];
|
|
|
|
|
|
|
|
hardware = {
|
|
|
|
enableAllFirmware = true;
|
|
|
|
cpu.amd.updateMicrocode = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
networking = {
|
|
|
|
useDHCP = false;
|
|
|
|
macvlans = {
|
|
|
|
intif0 = {
|
2024-05-21 23:16:02 -07:00
|
|
|
interface = "enp6s0";
|
2023-05-16 22:40:08 -07:00
|
|
|
mode = "bridge";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
interfaces.intif0.macAddress = "02:ee:76:17:99:ed";
|
|
|
|
};
|
|
|
|
}
|