• Moves Caddy configuration from optional to dedicated host config file • Relocates container configs for authentik and Komodo under new host config path • Updates default host config to import the new structure • Bumps system stateVersion to 25.05
69 lines
1.5 KiB
Nix
69 lines
1.5 KiB
Nix
###############################################################
|
|
#
|
|
# Komodo - LXC Container
|
|
# NixOS container, Ryzen 5 5600G (12 Cores), 30GB/2GB RAM/SWAP
|
|
#
|
|
###############################################################
|
|
|
|
{
|
|
lib,
|
|
config,
|
|
pkgs,
|
|
...
|
|
}:
|
|
let
|
|
username = "toph";
|
|
user = config.secretsSpec.users.${username};
|
|
firewall = config.secretsSpec.firewall.komodo;
|
|
in
|
|
{
|
|
imports = lib.flatten [
|
|
## Komodo Only ##
|
|
./config
|
|
|
|
## Hardware ##
|
|
./hardware.nix
|
|
|
|
(map lib.custom.relativeToRoot [
|
|
## Required Configs ##
|
|
"hosts/common/core"
|
|
|
|
## Optional Configs ##
|
|
"hosts/common/optional/acme"
|
|
"hosts/common/optional/docker.nix"
|
|
|
|
## Host User ##
|
|
"hosts/users/${username}" # # Not the best solution but I always have one user so ¯\_(ツ)_/¯
|
|
])
|
|
];
|
|
|
|
## Host Specifications ##
|
|
hostSpec = {
|
|
hostName = "komodo";
|
|
username = username;
|
|
hashedPassword = user.hashedPassword;
|
|
email = user.email;
|
|
handle = user.handle;
|
|
userFullName = user.fullName;
|
|
isServer = true;
|
|
};
|
|
|
|
networking = {
|
|
enableIPv6 = false;
|
|
firewall = {
|
|
allowedTCPPorts = firewall.allowedTCPPorts;
|
|
allowedTCPPortRanges = firewall.allowedTCPPortRanges;
|
|
allowedUDPPorts = firewall.allowedUDPPorts;
|
|
};
|
|
};
|
|
|
|
## System-wide packages ##
|
|
programs.nix-ld.enable = true;
|
|
environment.systemPackages = with pkgs; [
|
|
lazydocker
|
|
compose2nix
|
|
];
|
|
|
|
# https://wiki.nixos.org/wiki/FAQ/When_do_I_update_stateVersion
|
|
system.stateVersion = "25.05";
|
|
}
|