Dedicated file for hosts definition
This commit is contained in:
parent
d036dfb270
commit
8b954340fb
2 changed files with 196 additions and 93 deletions
187
flake.nix
187
flake.nix
|
|
@ -59,6 +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; };
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
@ -67,110 +68,110 @@
|
||||||
|
|
||||||
nixosConfigurations = (import ./hosts inputs);
|
nixosConfigurations = (import ./hosts inputs);
|
||||||
|
|
||||||
colmena =
|
colmena = lib.recursiveUpdate (builtins.mapAttrs (k: v: {
|
||||||
lib.recursiveUpdate
|
imports = v._module.args.modules;
|
||||||
(builtins.mapAttrs (k: v: { imports = v._module.args.modules; }) self.nixosConfigurations)
|
}) self.nixosConfigurations) hosts;
|
||||||
{
|
# {
|
||||||
meta = {
|
# meta = {
|
||||||
nixpkgs = import nixpkgs {
|
# nixpkgs = import nixpkgs {
|
||||||
system = "x86_64-linux";
|
# system = "x86_64-linux";
|
||||||
overlays = [ ];
|
# overlays = [ ];
|
||||||
};
|
# };
|
||||||
nodeNixpkgs = builtins.mapAttrs (_: v: v.pkgs) self.nixosConfigurations;
|
# nodeNixpkgs = builtins.mapAttrs (_: v: v.pkgs) self.nixosConfigurations;
|
||||||
nodeSpecialArgs = builtins.mapAttrs (_: v: v._module.specialArgs) self.nixosConfigurations;
|
# nodeSpecialArgs = builtins.mapAttrs (_: v: v._module.specialArgs) self.nixosConfigurations;
|
||||||
};
|
# };
|
||||||
|
|
||||||
arr.deployment = {
|
# arr.deployment = {
|
||||||
targetHost = "192.168.1.189";
|
# targetHost = "192.168.1.189";
|
||||||
tags = [
|
# tags = [
|
||||||
"lxc"
|
# "lxc"
|
||||||
"bacco"
|
# "bacco"
|
||||||
"arr"
|
# "arr"
|
||||||
];
|
# ];
|
||||||
};
|
# };
|
||||||
|
|
||||||
caddy.deployment = {
|
# caddy.deployment = {
|
||||||
targetHost = "192.168.1.150";
|
# targetHost = "192.168.1.150";
|
||||||
tags = [
|
# tags = [
|
||||||
"lxc"
|
# "lxc"
|
||||||
"bacco"
|
# "bacco"
|
||||||
"arr"
|
# "arr"
|
||||||
"auth"
|
# "auth"
|
||||||
"metrics"
|
# "metrics"
|
||||||
"nextcloud"
|
# "nextcloud"
|
||||||
"portainer"
|
# "portainer"
|
||||||
"vaultwarden"
|
# "vaultwarden"
|
||||||
];
|
# ];
|
||||||
};
|
# };
|
||||||
|
|
||||||
metrics.deployment = {
|
# metrics.deployment = {
|
||||||
targetHost = "192.168.1.152";
|
# targetHost = "192.168.1.152";
|
||||||
tags = [
|
# tags = [
|
||||||
"lxc"
|
# "lxc"
|
||||||
"bacco"
|
# "bacco"
|
||||||
"metrics"
|
# "metrics"
|
||||||
];
|
# ];
|
||||||
};
|
# };
|
||||||
|
|
||||||
nextcloud.deployment = {
|
# nextcloud.deployment = {
|
||||||
targetHost = "192.168.1.103";
|
# targetHost = "192.168.1.103";
|
||||||
tags = [
|
# tags = [
|
||||||
"lxc"
|
# "lxc"
|
||||||
"bacco"
|
# "bacco"
|
||||||
"nextcloud"
|
# "nextcloud"
|
||||||
];
|
# ];
|
||||||
};
|
# };
|
||||||
|
|
||||||
vaultwarden.deployment = {
|
# vaultwarden.deployment = {
|
||||||
targetHost = "192.168.1.154";
|
# targetHost = "192.168.1.154";
|
||||||
tags = [
|
# tags = [
|
||||||
"lxc"
|
# "lxc"
|
||||||
"bacco"
|
# "bacco"
|
||||||
"vaultwarden"
|
# "vaultwarden"
|
||||||
];
|
# ];
|
||||||
};
|
# };
|
||||||
|
|
||||||
plex.deployment = {
|
# plex.deployment = {
|
||||||
targetHost = "192.168.1.155";
|
# targetHost = "192.168.1.155";
|
||||||
tags = [
|
# tags = [
|
||||||
"lxc"
|
# "lxc"
|
||||||
"node"
|
# "node"
|
||||||
];
|
# ];
|
||||||
};
|
# };
|
||||||
|
|
||||||
portainer.deployment = {
|
# portainer.deployment = {
|
||||||
targetHost = "192.168.1.156";
|
# targetHost = "192.168.1.156";
|
||||||
tags = [
|
# tags = [
|
||||||
"lxc"
|
# "lxc"
|
||||||
"node"
|
# "node"
|
||||||
"portainer"
|
# "portainer"
|
||||||
];
|
# ];
|
||||||
};
|
# };
|
||||||
|
|
||||||
authentik.deployment = {
|
# authentik.deployment = {
|
||||||
targetHost = "192.168.1.157";
|
# targetHost = "192.168.1.157";
|
||||||
tags = [
|
# tags = [
|
||||||
"lxc"
|
# "lxc"
|
||||||
"node"
|
# "node"
|
||||||
"auth"
|
# "auth"
|
||||||
];
|
# ];
|
||||||
};
|
# };
|
||||||
|
|
||||||
colmena.deployment = {
|
# colmena.deployment = {
|
||||||
targetHost = "192.168.1.158";
|
# targetHost = "192.168.1.158";
|
||||||
tags = [
|
# tags = [
|
||||||
"lxc"
|
# "lxc"
|
||||||
"node"
|
# "node"
|
||||||
];
|
# ];
|
||||||
};
|
# };
|
||||||
|
|
||||||
deadbeef.deployment = {
|
# deadbeef.deployment = {
|
||||||
allowLocalDeployment = true;
|
# allowLocalDeployment = true;
|
||||||
targetHost = null;
|
# targetHost = null;
|
||||||
tags = [ "local" ];
|
# tags = [ "local" ];
|
||||||
};
|
# };
|
||||||
|
|
||||||
};
|
# };
|
||||||
|
|
||||||
devShells.${system}.default = pkgs.mkShell {
|
devShells.${system}.default = pkgs.mkShell {
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
|
|
|
||||||
102
hosts/hosts.nix
Normal file
102
hosts/hosts.nix
Normal file
|
|
@ -0,0 +1,102 @@
|
||||||
|
{ inputs, ... }:
|
||||||
|
{
|
||||||
|
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 = "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"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
deadbeef.deployment = {
|
||||||
|
allowLocalDeployment = true;
|
||||||
|
targetHost = null;
|
||||||
|
tags = [ "local" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue