switched to flakes and built out modularity

This commit is contained in:
2026-02-11 13:45:21 -05:00
parent 5f6a53c15f
commit c5a99c5b75
15 changed files with 489 additions and 151 deletions

63
hosts/nixos/default.nix Normal file
View File

@@ -0,0 +1,63 @@
{ lib, ... }:
let
hardwarePath = ./hardware-configuration.nix;
in
{
imports = [
../../profiles/server-base.nix
../../modules/control.nix
../../modules/services/homeassistant.nix
../../modules/services/jellyfin.nix
../../modules/services/gitea.nix
../../modules/services/navidrome.nix
../../modules/services/vaultwarden.nix
../../modules/services/nextcloud.nix
../../modules/services/k3s.nix
] ++ lib.optionals (builtins.pathExists hardwarePath) [ hardwarePath ];
networking.hostName = "nixos";
# Bootloader defaults; adjust per host.
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/sda";
boot.loader.grub.useOSProber = true;
# Central service switchboard.
control = {
homeassistant.enable = true;
jellyfin.enable = false;
gitea.enable = false;
navidrome = {
enable = false;
musicFolder = "/mnt/seagate8tb/navidrome/music";
dataFolder = "/mnt/seagate8tb/navidrome/data";
port = 4533;
openFirewall = true;
};
vaultwarden = {
enable = false;
domain = "http://vaultwarden.local";
port = 8222;
openFirewall = true;
};
nextcloud = {
enable = false;
hostName = "nextcloud.local";
adminPassFile = null;
openFirewall = true;
};
k3s = {
enable = true;
role = "server";
clusterInit = true;
tokenFile = null;
serverAddr = null;
openFirewall = true;
};
};
}