Switch to lix and update the arr stack

This commit is contained in:
pazpi 2024-08-27 22:00:18 +02:00
parent e860e4a9bd
commit 34f11ee2fb
No known key found for this signature in database
GPG key ID: 0942571C4B9966BE
6 changed files with 249 additions and 148 deletions

View file

@ -1,25 +1,66 @@
{
config,
pkgs,
lib,
...
{ config
, pkgs
, lib
, ...
}:
with lib;
let
cfg = config.my.services.download-pod;
containers = {
webserver = {
jackett = {
enable = true;
image = "nginx";
image = "linuxserver/jackett";
autoStart = true;
extraOptions = [ "--pod=download" ];
volumes = [
"aaa:/config"
"bbb:/data"
"jackett_config:/config"
"jackett_data:/data"
];
};
postgres = {
radarr = {
enable = true;
image = "linuxserver/radarr";
autoStart = true;
extraOptions = [ "--pod=download" ];
volumes = [
"radarr_config:/config"
"radarr_data:/data"
];
};
sabnzbd = {
enable = false;
image = "postgres:13";
image = "linuxserver/sabnzbd";
autoStart = true;
extraOptions = [ "--pod=download" ];
volumes = [
"sabnzbd_config:/config"
"sabnzbd_data:/data"
];
};
sonarr = {
enable = false;
image = "linuxserver/sonarr";
autoStart = true;
extraOptions = [ "--pod=download" ];
volumes = [
"sonarr_config:/config"
"sonarr_data:/data"
];
};
prowlarr = {
enable = true;
image = "linuxserver/prowlarr";
autoStart = true;
# extraOptions = [ "--pod=download" ];
volumes = [ "prowlarr_config:/config" ];
};
};
@ -60,11 +101,14 @@ in
config = lib.mkIf cfg.enable {
my.virtualisation.podmanPods = {
mywebapp = {
name = "mywebapp";
download = {
name = "download";
ports = [
"9090:80"
"9443:443"
"7878:7878" # : Radarr
# "8080:8080" # : Sabnzbd
"8989:8989" # : Sonarr
"9117:9117" # : Jackett
"9696:9696" # : Prowlarr
];
containers = enabledContainers containers;
};

View file

@ -37,7 +37,5 @@ in
};
};
nixpkgs.config.allowUnfree = true;
};
}

View file

@ -1,11 +1,27 @@
{
lib,
config,
pkgs,
...
{ lib
, config
, pkgs
, ...
}:
let
cfg = config.my.utils.serverNodeUsers;
gitlabUsername = "pazpi";
sshKeys =
let
localKeys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDhiGLc/whCY3lCmDiRlYnMJOLiO/gvcRj/sKVEFVAhQ pazpi@deadbeef"
# Add more local keys as needed
];
gitlabKeys = pkgs.lib.splitString "\n" (
builtins.readFile (
pkgs.fetchurl {
url = "https://gitlab.com/${gitlabUsername}.keys";
sha256 = "tHC4DBRO8mXBLFBqGiZlgyY5Pzpl4AMeURCni6H7IjI=";
}
)
);
in
localKeys ++ gitlabKeys;
in
{
options.my.utils.serverNodeUsers = {
@ -24,6 +40,7 @@ in
users.root = {
hashedPassword = "!";
openssh.authorizedKeys.keys = sshKeys;
};
users.pazpi = {
@ -31,9 +48,7 @@ in
hashedPassword = "$y$j9T$oWLCV1hnGPyOGabMfAS3p1$/iwouRZGwQXcv6IHnLuT3I9.pmeXNpcHxq.b8xfitr1";
shell = pkgs.bash;
extraGroups = [ "wheel" ];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDhiGLc/whCY3lCmDiRlYnMJOLiO/gvcRj/sKVEFVAhQ pazpi@deadbeef"
];
openssh.authorizedKeys.keys = sshKeys;
};
};