Merge hosts and deployments with a simpler and clearer hosts definition
This commit is contained in:
parent
f244d787be
commit
b6b2774414
4 changed files with 233 additions and 219 deletions
|
|
@ -12,10 +12,7 @@
|
|||
let
|
||||
agenixOverlay = final: prev: { agenix = agenix.packages.${prev.system}.default; };
|
||||
|
||||
customOverlays = (
|
||||
final: prev: {
|
||||
}
|
||||
);
|
||||
customOverlays = (final: prev: { });
|
||||
|
||||
mkPkgs =
|
||||
nixpkgsSrc: system:
|
||||
|
|
@ -61,8 +58,29 @@ let
|
|||
inherit specialArgs;
|
||||
};
|
||||
|
||||
# Import the unified host definitions
|
||||
hostDefs = import ./hosts.nix;
|
||||
|
||||
# Generate nixosConfigurations from host definitions
|
||||
lxcHosts = nixpkgs.lib.mapAttrs (
|
||||
name: cfg:
|
||||
mkLXC {
|
||||
hostModule = cfg.module;
|
||||
unstable = cfg.unstable or false;
|
||||
extraModules = cfg.extraModules or [ ];
|
||||
specialArgs = cfg.specialArgs or { };
|
||||
}
|
||||
) hostDefs;
|
||||
|
||||
in
|
||||
{
|
||||
lxcHosts
|
||||
// {
|
||||
# Special hosts that don't use mkLXC pattern
|
||||
baseLXC = mkLXC {
|
||||
hostModule = ./base-lxc.nix;
|
||||
specialArgs = { inherit self; };
|
||||
};
|
||||
|
||||
# deadbeef = nixpkgs.lib.nixosSystem {
|
||||
# pkgs = mkPkgs nixpkgs "x86_64-linux";
|
||||
# modules = [
|
||||
|
|
@ -72,41 +90,4 @@ in
|
|||
# agenix.nixosModules.default
|
||||
# ];
|
||||
# };
|
||||
|
||||
baseLXC = mkLXC {
|
||||
hostModule = ./base-lxc.nix;
|
||||
specialArgs = { inherit self; };
|
||||
};
|
||||
|
||||
arr = mkLXC { hostModule = ./arr; };
|
||||
caddy = mkLXC { hostModule = ./caddy; };
|
||||
colmena = mkLXC { hostModule = ./colmena; };
|
||||
dns01 = mkLXC { hostModule = ./dns/dns-01.nix; };
|
||||
dns02 = mkLXC { hostModule = ./dns/dns-02.nix; };
|
||||
firefly-iii = mkLXC { hostModule = ./firefly-iii; };
|
||||
forgejo = mkLXC { hostModule = ./forgejo; };
|
||||
immich = mkLXC { hostModule = ./immich; };
|
||||
metrics = mkLXC { hostModule = ./metrics; };
|
||||
n8n = mkLXC { hostModule = ./n8n; };
|
||||
nextcloud = mkLXC { hostModule = ./nextcloud; };
|
||||
plex = mkLXC { hostModule = ./plex; };
|
||||
portainer = mkLXC { hostModule = ./portainer; };
|
||||
shadowsocks = mkLXC { hostModule = ./shadowsocks; };
|
||||
vaultwarden = mkLXC { hostModule = ./vaultwarden; };
|
||||
|
||||
# Hosts requiring nixpkgs-unstable
|
||||
authentik = mkLXC {
|
||||
hostModule = ./authentik;
|
||||
unstable = true;
|
||||
};
|
||||
|
||||
paperless = mkLXC {
|
||||
hostModule = ./paperless;
|
||||
unstable = true;
|
||||
};
|
||||
|
||||
zigbee2mqtt = mkLXC {
|
||||
hostModule = ./zigbee2mqtt;
|
||||
unstable = true;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue