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": {
"nixpkgs": {
"locked": {
"lastModified": 1689282004,
"narHash": "sha256-VNhuyb10c9SV+3hZOlxwJwzEGytZ31gN9w4nPCnNvdI=",
"lastModified": 1689373857,
"narHash": "sha256-mtBksyvhhT98Zsm9tYHuMKuLwUKDwv+BGTl6K5nOGhY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e74e68449c385db82de3170288a28cd0f608544f",
"rev": "dfdbcc428f365071f0ca3888f6ec8c25c3792885",
"type": "github"
},
"original": {

View file

@ -3,49 +3,41 @@
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 = {
meta = {
nixpkgs = import nixpkgs {
system = "x86_64-linux";
};
};
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
];
};
};
} // builtins.mapAttrs (self.generateColmenaHost) self.hosts;
};
}

View file

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

View file

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

View file

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