2024-09-06 20:26:11 -05:00
|
|
|
# Do not modify this file! It was generated by 'nixos-generate-config'
|
2024-07-13 03:13:00 -05:00
|
|
|
# and may be overwritten by future invocations. Please make changes
|
|
|
|
# to /etc/nixos/configuration.nix instead.
|
2024-07-14 06:02:32 -05:00
|
|
|
{ config, lib, modulesPath, inputs, ... }:
|
2024-07-26 15:23:35 -05:00
|
|
|
let
|
2024-07-13 08:57:32 -05:00
|
|
|
sanoidConfig = import ./config/sanoid.nix { };
|
2024-09-06 20:26:11 -05:00
|
|
|
disks = import ./config/disks.nix;
|
|
|
|
smartdDevices = map (device: { inherit device; }) disks;
|
|
|
|
|
2024-07-13 08:57:32 -05:00
|
|
|
in
|
2024-07-13 03:13:00 -05:00
|
|
|
{
|
|
|
|
imports =
|
|
|
|
[
|
|
|
|
(modulesPath + "/installer/scan/not-detected.nix")
|
2024-07-14 06:02:32 -05:00
|
|
|
inputs.disko.nixosModules.disko
|
2024-07-14 06:10:45 -05:00
|
|
|
(import ../../profiles/disko-nixos.nix { disks = [ "/dev/sda" ]; })
|
2024-07-13 03:13:00 -05:00
|
|
|
];
|
|
|
|
|
|
|
|
boot = {
|
2024-07-13 05:04:49 -05:00
|
|
|
initrd = {
|
|
|
|
availableKernelModules = [ "ehci_pci" "ahci" "mpt3sas" "isci" "usbhid" "usb_storage" "sd_mod" ];
|
|
|
|
kernelModules = [ "nfs" ];
|
|
|
|
supportedFilesystems = [ "nfs" ];
|
|
|
|
};
|
|
|
|
|
2024-07-13 03:13:00 -05:00
|
|
|
kernelModules = [ "kvm-intel" "vfio" "vfio_iommu_type1" "vfio_pci" "vfio_virqfd" ];
|
|
|
|
extraModulePackages = [ ];
|
2024-07-13 05:04:49 -05:00
|
|
|
kernelParams = [ "iommu=pt" "intel_iommu=on" "zfs.zfs_arc_max=107374182400" ]; # 100GB
|
2024-07-13 03:13:00 -05:00
|
|
|
};
|
2024-07-13 05:04:49 -05:00
|
|
|
|
2024-07-14 07:36:54 -05:00
|
|
|
users.users.root.openssh.authorizedKeys.keys = [
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAGSFTSVPt43PBpSMSF1dGTzN2JbxztDZUml7g4+PnWe CSI-Driver@talos"
|
2024-07-22 06:58:38 -05:00
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBROTzSefJGJeCNUgNLbE5l4sHHg2fHUO4sCwqvP+zAd root@Gollum"
|
2024-07-14 07:36:54 -05:00
|
|
|
];
|
|
|
|
|
2024-09-01 16:39:07 -05:00
|
|
|
# VSCode Compatibility Settings
|
|
|
|
programs.nix-ld.enable = true;
|
|
|
|
services.vscode-server = {
|
|
|
|
enable = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
# Home Manager
|
|
|
|
home-manager.users.jahanson = {
|
|
|
|
# Git settings
|
|
|
|
# TODO: Move to config module.
|
|
|
|
programs.git = {
|
|
|
|
enable = true;
|
|
|
|
userName = "Joseph Hanson";
|
|
|
|
userEmail = "joe@veri.dev";
|
|
|
|
|
|
|
|
extraConfig = {
|
|
|
|
core.autocrlf = "input";
|
|
|
|
init.defaultBranch = "main";
|
|
|
|
pull.rebase = true;
|
|
|
|
rebase.autoStash = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-07-13 03:13:00 -05:00
|
|
|
# Network settings
|
|
|
|
networking = {
|
2024-07-13 05:04:49 -05:00
|
|
|
hostName = "gandalf";
|
2024-07-13 03:13:00 -05:00
|
|
|
hostId = "e2fc95cd";
|
|
|
|
useDHCP = false; # needed for bridge
|
|
|
|
networkmanager.enable = true;
|
|
|
|
# TODO: Add ports specifically.
|
2024-07-26 21:56:54 -05:00
|
|
|
firewall.enable = false;
|
2024-09-06 15:34:57 -05:00
|
|
|
nftables.enable = false;
|
2024-07-13 03:13:00 -05:00
|
|
|
interfaces = {
|
|
|
|
"enp130s0f0".useDHCP = true;
|
|
|
|
"enp130s0f1".useDHCP = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
swapDevices = [ ];
|
|
|
|
|
|
|
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
|
|
|
2024-07-13 08:57:32 -05:00
|
|
|
sops = {
|
|
|
|
secrets = {
|
|
|
|
"lego/dnsimple/token" = {
|
|
|
|
mode = "0444";
|
|
|
|
sopsFile = ./secrets.sops.yaml;
|
|
|
|
};
|
2024-07-26 23:01:01 -05:00
|
|
|
"borg/repository/passphrase" = {
|
2024-07-26 21:52:12 -05:00
|
|
|
sopsFile = ./secrets.sops.yaml;
|
|
|
|
};
|
2024-07-13 08:57:32 -05:00
|
|
|
};
|
|
|
|
};
|
2024-07-26 15:23:35 -05:00
|
|
|
|
2024-08-07 07:21:58 -05:00
|
|
|
services = {
|
2024-09-06 20:26:11 -05:00
|
|
|
smartd = {
|
|
|
|
devices = smartdDevices;
|
2024-08-07 07:21:58 -05:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-07-13 03:13:00 -05:00
|
|
|
# System settings and services.
|
|
|
|
mySystem = {
|
|
|
|
purpose = "Production";
|
2024-07-13 05:04:49 -05:00
|
|
|
system = {
|
|
|
|
motd.networkInterfaces = [ "enp130s0f0" "enp130s0f1" ];
|
2024-09-01 16:39:07 -05:00
|
|
|
# Incus
|
|
|
|
incus = {
|
|
|
|
enable = true;
|
2024-09-04 16:36:43 -05:00
|
|
|
preseed = import ./config/incus-preseed.nix { };
|
|
|
|
webuiport = 8445;
|
2024-09-01 16:39:07 -05:00
|
|
|
};
|
2024-07-13 05:04:49 -05:00
|
|
|
# ZFS
|
|
|
|
zfs.enable = true;
|
2024-09-12 13:33:08 -05:00
|
|
|
zfs.mountPoolsAtBoot = [ "eru" ];
|
2024-07-13 05:04:49 -05:00
|
|
|
# NFS
|
|
|
|
nfs.enable = true;
|
|
|
|
# Samba
|
2024-07-30 18:47:59 -05:00
|
|
|
samba = {
|
|
|
|
enable = true;
|
|
|
|
shares = import ./config/samba-shares.nix { };
|
|
|
|
extraConfig = import ./config/samba-config.nix { };
|
|
|
|
};
|
|
|
|
resticBackup = {
|
|
|
|
local.enable = false;
|
|
|
|
remote.enable = false;
|
|
|
|
local.noWarning = true;
|
|
|
|
remote.noWarning = true;
|
|
|
|
};
|
2024-07-26 22:25:10 -05:00
|
|
|
};
|
|
|
|
services = {
|
2024-09-16 23:00:44 -05:00
|
|
|
glances.enable = true;
|
2024-07-26 22:25:10 -05:00
|
|
|
libvirt-qemu.enable = true;
|
2024-09-16 23:00:44 -05:00
|
|
|
podman.enable = true;
|
2024-07-13 08:57:32 -05:00
|
|
|
|
2024-09-06 20:26:11 -05:00
|
|
|
# Scrutiny
|
|
|
|
scrutiny = {
|
|
|
|
enable = true;
|
|
|
|
devices = disks;
|
|
|
|
extraCapabilities = [ "SYS_RAWIO" ];
|
|
|
|
containerVolumeLocation = "/eru/containers/volumes/scrutiny";
|
2024-09-06 20:59:41 -05:00
|
|
|
port = 8585;
|
2024-09-06 20:26:11 -05:00
|
|
|
};
|
|
|
|
|
2024-07-26 22:25:10 -05:00
|
|
|
# Sanoid
|
|
|
|
sanoid = {
|
|
|
|
enable = true;
|
|
|
|
inherit (sanoidConfig.outputs) templates datasets;
|
|
|
|
};
|
2024-07-26 15:23:35 -05:00
|
|
|
|
2024-09-06 20:26:11 -05:00
|
|
|
# Lego-Auto for SSL Certificates
|
2024-07-26 22:25:10 -05:00
|
|
|
lego-auto = {
|
|
|
|
enable = true;
|
|
|
|
dnsimpleTokenPath = "${config.sops.secrets."lego/dnsimple/token".path}";
|
|
|
|
domains = "gandalf.jahanson.tech";
|
|
|
|
email = "joe@veri.dev";
|
|
|
|
provider = "dnsimple";
|
2024-07-13 08:57:32 -05:00
|
|
|
};
|
|
|
|
};
|
2024-07-26 22:25:10 -05:00
|
|
|
};
|
|
|
|
}
|