mochi/nixos/hosts/shadowfax/default.nix

150 lines
3.4 KiB
Nix
Raw Normal View History

2024-09-03 20:56:49 -05:00
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, inputs, ... }:
2024-09-03 21:46:29 -05:00
let
sanoidConfig = import ./config/sanoid.nix { };
2024-09-07 05:40:58 -05:00
disks = import ./config/disks.nix;
smartdDevices = map (device: { inherit device; }) disks;
2024-09-03 21:46:29 -05:00
in
2024-09-03 20:56:49 -05:00
{
imports =
[
inputs.disko.nixosModules.disko
2024-09-03 22:33:45 -05:00
(import ../../profiles/disko-nixos.nix { disks = [ "/dev/sda|/dev/disk/by-id/nvme-Samsung_SSD_970_EVO_Plus_500GB_S58SNM0W406409E" ]; })
2024-09-03 20:56:49 -05:00
];
2024-09-03 23:02:37 -05:00
# Debug
2024-09-04 14:14:51 -05:00
# boot.zfs.forceImportRoot = lib.mkForce true;
2024-09-03 23:02:37 -05:00
2024-09-03 20:56:49 -05:00
boot = {
initrd = {
kernelModules = [ "nfs" ];
supportedFilesystems = [ "nfs" ];
};
2024-09-04 22:09:43 -05:00
kernelModules = [ "vfio" "vfio_iommu_type1" "vfio_pci" "vfio_virqfd" ];
2024-09-03 20:56:49 -05:00
extraModulePackages = [ ];
2024-09-04 22:09:43 -05:00
kernelParams = [ "zfs.zfs_arc_max=107374182400" ]; # 100GB
2024-09-03 20:56:49 -05:00
};
users.users.root.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAGSFTSVPt43PBpSMSF1dGTzN2JbxztDZUml7g4+PnWe CSI-Driver@talos"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBROTzSefJGJeCNUgNLbE5l4sHHg2fHUO4sCwqvP+zAd root@Gollum"
];
2024-09-13 14:10:17 -05:00
programs = {
_1password.enable = true;
2024-09-13 14:11:44 -05:00
# VSCode Compatibility Settings
2024-09-13 14:10:17 -05:00
nix-ld.enable = true;
};
2024-09-14 18:43:15 -05:00
services = {
# Soft Serve
soft-serve = {
enable = true;
settings = import ./config/soft-serve.nix { };
};
# VSCode Compatibility Settings
vscode-server = {
enable = true;
};
2024-09-03 20:56:49 -05:00
};
# 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;
};
};
};
# Network settings
networking = {
2024-09-03 21:46:29 -05:00
hostName = "shadowfax";
hostId = "a885fabe";
2024-09-03 20:56:49 -05:00
useDHCP = false; # needed for bridge
networkmanager.enable = true;
firewall.enable = false;
interfaces = {
2024-09-03 21:46:29 -05:00
"enp36s0f0".useDHCP = true;
"enp36s0f1".useDHCP = true;
2024-09-03 20:56:49 -05:00
};
};
swapDevices = [ ];
2024-09-03 21:46:29 -05:00
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
2024-09-03 20:56:49 -05:00
sops = {
2024-09-03 21:46:29 -05:00
secrets = { };
2024-09-03 20:56:49 -05:00
};
services = {
2024-09-07 06:14:26 -05:00
smartd = {
devices = smartdDevices;
2024-09-03 20:56:49 -05:00
};
};
# System settings and services.
mySystem = {
purpose = "Production";
system = {
2024-09-12 12:21:05 -05:00
motd.networkInterfaces = [ "enp36s0f0" ];
2024-09-03 20:56:49 -05:00
# Incus
incus = {
enable = true;
preseed = import ./config/incus-preseed.nix { };
2024-09-03 20:56:49 -05:00
};
2024-09-03 21:46:29 -05:00
2024-09-03 20:56:49 -05:00
# ZFS
zfs.enable = true;
zfs.mountPoolsAtBoot = [
"nahar"
"moria"
];
2024-09-03 21:46:29 -05:00
2024-09-03 20:56:49 -05:00
# NFS
nfs.enable = true;
2024-09-03 21:46:29 -05:00
2024-09-03 20:56:49 -05:00
resticBackup = {
local.enable = false;
remote.enable = false;
local.noWarning = true;
remote.noWarning = true;
};
};
2024-09-03 21:46:29 -05:00
2024-09-03 20:56:49 -05:00
services = {
podman.enable = true;
libvirt-qemu.enable = true;
2024-09-07 05:40:58 -05:00
# Scrutiny
scrutiny = {
enable = true;
devices = disks;
extraCapabilities = [ "SYS_RAWIO" ];
containerVolumeLocation = "/nahar/containers/volumes/scrutiny";
port = 8585;
};
2024-09-03 20:56:49 -05:00
# Sanoid
sanoid = {
enable = true;
inherit (sanoidConfig.outputs) templates datasets;
};
};
};
}