From f99eb399dc36395e66cb67ad256c1b25466c84c2 Mon Sep 17 00:00:00 2001 From: Jack O'Sullivan Date: Sun, 12 Jun 2022 15:17:35 +0100 Subject: [PATCH] nixos/jackflix: Add Sonarr --- .../vms/shill/containers/jackflix/default.nix | 5 +++++ .../vms/shill/containers/middleman/vhosts.nix | 13 +++++++++++++ nixos/modules/user.nix | 2 +- 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/nixos/boxes/colony/vms/shill/containers/jackflix/default.nix b/nixos/boxes/colony/vms/shill/containers/jackflix/default.nix index ad9fe0e..417e2bd 100644 --- a/nixos/boxes/colony/vms/shill/containers/jackflix/default.nix +++ b/nixos/boxes/colony/vms/shill/containers/jackflix/default.nix @@ -35,8 +35,11 @@ users = { groups.media.gid = 2000; users = { + "${config.my.user.config.name}".extraGroups = [ "media" ]; + transmission.extraGroups = [ "media" ]; radarr.extraGroups = [ "media" ]; + sonarr.extraGroups = [ "media" ]; }; }; @@ -46,6 +49,7 @@ transmission.bindsTo = [ "systemd-networkd-wait-online@vpn.service" ]; radarr.serviceConfig.UMask = "0002"; + sonarr.serviceConfig.UMask = "0002"; }; }; @@ -74,6 +78,7 @@ jackett.enable = true; radarr.enable = true; + sonarr.enable = true; jellyfin.enable = true; }; diff --git a/nixos/boxes/colony/vms/shill/containers/middleman/vhosts.nix b/nixos/boxes/colony/vms/shill/containers/middleman/vhosts.nix index 7e726b7..51d51f0 100644 --- a/nixos/boxes/colony/vms/shill/containers/middleman/vhosts.nix +++ b/nixos/boxes/colony/vms/shill/containers/middleman/vhosts.nix @@ -191,6 +191,19 @@ in } (ssoServer "generic") ]; + "sonarr-test.${lib.my.pubDomain}" = mkMerge [ + { + locations."/" = mkMerge [ + { + proxyPass = "http://jackflix-ctr.${config.networking.domain}:8989"; + proxyWebsockets = true; + } + (ssoLoc "generic") + ]; + useACMEHost = lib.my.pubDomain; + } + (ssoServer "generic") + ]; "jackflix-test.${lib.my.pubDomain}" = let diff --git a/nixos/modules/user.nix b/nixos/modules/user.nix index e5cd9b3..534d886 100644 --- a/nixos/modules/user.nix +++ b/nixos/modules/user.nix @@ -33,7 +33,7 @@ in name = mkDefault' "dev"; isNormalUser = true; uid = mkDefault 1000; - extraGroups = mkDefault [ "wheel" "kvm" ]; + extraGroups = [ "wheel" "kvm" ]; password = mkIf (cfg.passwordSecret == null) (mkDefault "hunter2"); shell = let shell = cfg.homeConfig.my.shell;