New file only for host declaration
Easier reference between nodes
This commit is contained in:
parent
0495e100fe
commit
398d3dfeca
3 changed files with 116 additions and 102 deletions
|
|
@ -59,7 +59,7 @@
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
pkgs = import nixpkgs { inherit system; };
|
pkgs = import nixpkgs { inherit system; };
|
||||||
lib = nixpkgs.lib;
|
lib = nixpkgs.lib;
|
||||||
hosts = import hosts/hosts.nix { inherit inputs; };
|
hosts = import hosts/deployments.nix { inherit inputs; };
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
||||||
106
hosts/deployments.nix
Normal file
106
hosts/deployments.nix
Normal file
|
|
@ -0,0 +1,106 @@
|
||||||
|
{ inputs, ... }:
|
||||||
|
let
|
||||||
|
hosts = import ./hosts.nix;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
meta = {
|
||||||
|
nixpkgs = import inputs.nixpkgs {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
overlays = [ ];
|
||||||
|
};
|
||||||
|
nodeNixpkgs = builtins.mapAttrs (_: v: v.pkgs) inputs.self.nixosConfigurations;
|
||||||
|
nodeSpecialArgs = builtins.mapAttrs (_: v: v._module.specialArgs) inputs.self.nixosConfigurations;
|
||||||
|
};
|
||||||
|
|
||||||
|
arr.deployment = {
|
||||||
|
targetHost = hosts.arr;
|
||||||
|
tags = [
|
||||||
|
"lxc"
|
||||||
|
"bacco"
|
||||||
|
"arr"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
caddy.deployment = {
|
||||||
|
targetHost = hosts.caddy;
|
||||||
|
tags = [
|
||||||
|
"lxc"
|
||||||
|
"bacco"
|
||||||
|
"arr"
|
||||||
|
"auth"
|
||||||
|
"metrics"
|
||||||
|
"nextcloud"
|
||||||
|
"portainer"
|
||||||
|
"vaultwarden"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
metrics.deployment = {
|
||||||
|
targetHost = hosts.metrics;
|
||||||
|
tags = [
|
||||||
|
"lxc"
|
||||||
|
"bacco"
|
||||||
|
"metrics"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
nextcloud.deployment = {
|
||||||
|
targetHost = hosts.nextcloud;
|
||||||
|
tags = [
|
||||||
|
"lxc"
|
||||||
|
"bacco"
|
||||||
|
"nextcloud"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
vaultwarden.deployment = {
|
||||||
|
targetHost = hosts.vaultwarden;
|
||||||
|
tags = [
|
||||||
|
"lxc"
|
||||||
|
"bacco"
|
||||||
|
"vaultwarden"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
plex.deployment = {
|
||||||
|
targetHost = hosts.plex;
|
||||||
|
tags = [
|
||||||
|
"lxc"
|
||||||
|
"node"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
portainer.deployment = {
|
||||||
|
targetHost = hosts.portainer;
|
||||||
|
tags = [
|
||||||
|
"lxc"
|
||||||
|
"node"
|
||||||
|
"portainer"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
authentik.deployment = {
|
||||||
|
targetHost = hosts.authentik;
|
||||||
|
tags = [
|
||||||
|
"lxc"
|
||||||
|
"node"
|
||||||
|
"auth"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
colmena.deployment = {
|
||||||
|
targetHost = hosts.colmena;
|
||||||
|
tags = [
|
||||||
|
"lxc"
|
||||||
|
"node"
|
||||||
|
"colmena"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
deadbeef.deployment = {
|
||||||
|
allowLocalDeployment = true;
|
||||||
|
targetHost = null;
|
||||||
|
tags = [ "local" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
110
hosts/hosts.nix
110
hosts/hosts.nix
|
|
@ -1,103 +1,11 @@
|
||||||
{ inputs, ... }:
|
|
||||||
{
|
{
|
||||||
meta = {
|
authentik = "auth.internal";
|
||||||
nixpkgs = import inputs.nixpkgs {
|
arr = "arr.internal";
|
||||||
system = "x86_64-linux";
|
caddy = "caddy.internal";
|
||||||
overlays = [ ];
|
metrics = "metrics.internal";
|
||||||
};
|
nextcloud = "nextcloud.internal";
|
||||||
nodeNixpkgs = builtins.mapAttrs (_: v: v.pkgs) inputs.self.nixosConfigurations;
|
vaultwarden = "vaultwarden.internal";
|
||||||
nodeSpecialArgs = builtins.mapAttrs (_: v: v._module.specialArgs) inputs.self.nixosConfigurations;
|
plex = "plex.internal";
|
||||||
};
|
portainer = "portainer.internal";
|
||||||
|
colmena = "colmena.internal";
|
||||||
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"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
metrics.deployment = {
|
|
||||||
targetHost = "192.168.1.152";
|
|
||||||
tags = [
|
|
||||||
"lxc"
|
|
||||||
"bacco"
|
|
||||||
"metrics"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
nextcloud.deployment = {
|
|
||||||
targetHost = "192.168.1.103";
|
|
||||||
tags = [
|
|
||||||
"lxc"
|
|
||||||
"bacco"
|
|
||||||
"nextcloud"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
vaultwarden.deployment = {
|
|
||||||
targetHost = "192.168.1.154";
|
|
||||||
tags = [
|
|
||||||
"lxc"
|
|
||||||
"bacco"
|
|
||||||
"vaultwarden"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
plex.deployment = {
|
|
||||||
targetHost = "192.168.1.155";
|
|
||||||
tags = [
|
|
||||||
"lxc"
|
|
||||||
"node"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
portainer.deployment = {
|
|
||||||
targetHost = "192.168.1.156";
|
|
||||||
tags = [
|
|
||||||
"lxc"
|
|
||||||
"node"
|
|
||||||
"portainer"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
authentik.deployment = {
|
|
||||||
targetHost = "192.168.1.157";
|
|
||||||
tags = [
|
|
||||||
"lxc"
|
|
||||||
"node"
|
|
||||||
"auth"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
colmena.deployment = {
|
|
||||||
targetHost = "192.168.1.158";
|
|
||||||
tags = [
|
|
||||||
"lxc"
|
|
||||||
"node"
|
|
||||||
"colmena"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
deadbeef.deployment = {
|
|
||||||
allowLocalDeployment = true;
|
|
||||||
targetHost = null;
|
|
||||||
tags = [ "local" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue