Dedicated file for hosts definition

This commit is contained in:
= 2025-01-14 12:31:35 +01:00
parent d036dfb270
commit 8b954340fb
2 changed files with 196 additions and 93 deletions

187
flake.nix
View file

@ -59,6 +59,7 @@
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
lib = nixpkgs.lib;
hosts = import hosts/hosts.nix { inherit inputs; };
in
{
@ -67,110 +68,110 @@
nixosConfigurations = (import ./hosts inputs);
colmena =
lib.recursiveUpdate
(builtins.mapAttrs (k: v: { imports = v._module.args.modules; }) self.nixosConfigurations)
{
meta = {
nixpkgs = import nixpkgs {
system = "x86_64-linux";
overlays = [ ];
};
nodeNixpkgs = builtins.mapAttrs (_: v: v.pkgs) self.nixosConfigurations;
nodeSpecialArgs = builtins.mapAttrs (_: v: v._module.specialArgs) self.nixosConfigurations;
};
colmena = lib.recursiveUpdate (builtins.mapAttrs (k: v: {
imports = v._module.args.modules;
}) self.nixosConfigurations) hosts;
# {
# meta = {
# nixpkgs = import nixpkgs {
# system = "x86_64-linux";
# overlays = [ ];
# };
# nodeNixpkgs = builtins.mapAttrs (_: v: v.pkgs) self.nixosConfigurations;
# nodeSpecialArgs = builtins.mapAttrs (_: v: v._module.specialArgs) self.nixosConfigurations;
# };
arr.deployment = {
targetHost = "192.168.1.189";
tags = [
"lxc"
"bacco"
"arr"
];
};
# arr.deployment = {
# targetHost = "192.168.1.189";
# tags = [
# "lxc"
# "bacco"
# "arr"
# ];
# };
caddy.deployment = {
targetHost = "192.168.1.150";
tags = [
"lxc"
"bacco"
"arr"
"auth"
"metrics"
"nextcloud"
"portainer"
"vaultwarden"
];
};
# caddy.deployment = {
# targetHost = "192.168.1.150";
# tags = [
# "lxc"
# "bacco"
# "arr"
# "auth"
# "metrics"
# "nextcloud"
# "portainer"
# "vaultwarden"
# ];
# };
metrics.deployment = {
targetHost = "192.168.1.152";
tags = [
"lxc"
"bacco"
"metrics"
];
};
# metrics.deployment = {
# targetHost = "192.168.1.152";
# tags = [
# "lxc"
# "bacco"
# "metrics"
# ];
# };
nextcloud.deployment = {
targetHost = "192.168.1.103";
tags = [
"lxc"
"bacco"
"nextcloud"
];
};
# nextcloud.deployment = {
# targetHost = "192.168.1.103";
# tags = [
# "lxc"
# "bacco"
# "nextcloud"
# ];
# };
vaultwarden.deployment = {
targetHost = "192.168.1.154";
tags = [
"lxc"
"bacco"
"vaultwarden"
];
};
# vaultwarden.deployment = {
# targetHost = "192.168.1.154";
# tags = [
# "lxc"
# "bacco"
# "vaultwarden"
# ];
# };
plex.deployment = {
targetHost = "192.168.1.155";
tags = [
"lxc"
"node"
];
};
# plex.deployment = {
# targetHost = "192.168.1.155";
# tags = [
# "lxc"
# "node"
# ];
# };
portainer.deployment = {
targetHost = "192.168.1.156";
tags = [
"lxc"
"node"
"portainer"
];
};
# portainer.deployment = {
# targetHost = "192.168.1.156";
# tags = [
# "lxc"
# "node"
# "portainer"
# ];
# };
authentik.deployment = {
targetHost = "192.168.1.157";
tags = [
"lxc"
"node"
"auth"
];
};
# authentik.deployment = {
# targetHost = "192.168.1.157";
# tags = [
# "lxc"
# "node"
# "auth"
# ];
# };
colmena.deployment = {
targetHost = "192.168.1.158";
tags = [
"lxc"
"node"
];
};
# colmena.deployment = {
# targetHost = "192.168.1.158";
# tags = [
# "lxc"
# "node"
# ];
# };
deadbeef.deployment = {
allowLocalDeployment = true;
targetHost = null;
tags = [ "local" ];
};
# deadbeef.deployment = {
# allowLocalDeployment = true;
# targetHost = null;
# tags = [ "local" ];
# };
};
# };
devShells.${system}.default = pkgs.mkShell {
buildInputs = with pkgs; [