Add jackett config and generate colmena hosts from attribute set

This commit is contained in:
yuri 2023-07-16 02:00:44 +02:00
parent 616d7543ca
commit 8eb9538485
9 changed files with 46 additions and 48 deletions

View file

@ -2,11 +2,11 @@
"nodes": { "nodes": {
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1689282004, "lastModified": 1689373857,
"narHash": "sha256-VNhuyb10c9SV+3hZOlxwJwzEGytZ31gN9w4nPCnNvdI=", "narHash": "sha256-mtBksyvhhT98Zsm9tYHuMKuLwUKDwv+BGTl6K5nOGhY=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e74e68449c385db82de3170288a28cd0f608544f", "rev": "dfdbcc428f365071f0ca3888f6ec8c25c3792885",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -3,49 +3,41 @@
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
}; };
outputs = { nixpkgs, ... }: { outputs = { self, nixpkgs, ... }: {
hosts = {
nitter = {
site = "vs";
};
nixos-coturn = {
site = "vs";
};
tor-relay = {
site = "vs";
};
jackett = {
site = "vs";
};
};
generateColmenaHost = name: host : {
deployment = {
targetHost = "${name}.${host.site}.grzb.de";
targetUser = "colmena-deploy";
};
imports = [
./configuration/common
./configuration/proxmox-vm
./hosts/${name}
];
};
colmena = { colmena = {
meta = { meta = {
nixpkgs = import nixpkgs { nixpkgs = import nixpkgs {
system = "x86_64-linux"; system = "x86_64-linux";
}; };
}; };
} // builtins.mapAttrs (self.generateColmenaHost) self.hosts;
nitter = { name, nodes, pkgs, ... }: {
deployment = {
targetHost = "nitter.vs.grzb.de";
targetUser = "colmena-deploy";
};
imports = [
./configuration/common
./configuration/proxmox-vm
./hosts/nitter
];
};
coturn = { name, nodes, pkgs, ... }: {
deployment = {
targetHost = "nixos-coturn.vs.grzb.de";
targetUser = "colmena-deploy";
};
imports = [
./configuration/common
./configuration/proxmox-vm
./hosts/coturn
];
};
tor-relay = { name, nodes, pkgs, ...}: {
deployment = {
targetHost = "tor-relay.vs.grzb.de";
targetUser = "colmena-deploy";
};
imports = [
./configuration/common
./configuration/proxmox-vm
./hosts/tor-relay
];
};
};
}; };
} }

View file

@ -1,10 +1,9 @@
{ config, pkgs, ... }: { ... }:
{ {
imports = [ boot.loader.grub = {
./hardware-configuration.nix enable = true;
./jackett.nix device = "/dev/vda";
]; };
networking = { networking = {
hostName = "jackett"; hostName = "jackett";

View file

@ -0,0 +1,7 @@
{ ... }:
{
imports = [
./configuration.nix
./jackett.nix
];
}

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }: { ... }:
{ {
boot.loader.grub = { boot.loader.grub = {
enable = true; enable = true;