diff --git a/flake.nix b/flake.nix index e742b53..60e2903 100644 --- a/flake.nix +++ b/flake.nix @@ -214,19 +214,6 @@ ]; }; - cube = nixpkgs.lib.nixosSystem rec { - specialArgs = { inherit inputs self; }; - system = "x86_64-linux"; - pkgs = litePkgsFor.${system}; - modules = [ - ./hosts/cube - agenix.nixosModules.age - self.nixosModules.backup - self.nixosModules.wireguard - basant.nixosModule - ]; - }; - box = nixpkgs.lib.nixosSystem rec { specialArgs = { inherit inputs self; }; system = "x86_64-linux"; @@ -237,6 +224,7 @@ self.nixosModules.backup self.nixosModules.wireguard self.nixosModules.gonic + self.nixosModules.gpodder2go self.nixosModules.wallabag self.nixosModules.ulogger-server grasp.nixosModule @@ -292,13 +280,6 @@ path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.helix; }; }; - cube = { - hostname = "lakhwara.com"; - profiles.system = { - user = "root"; - path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.cube; - }; - }; }; checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib; diff --git a/hosts/profiles/dns/default.nix b/hosts/profiles/dns/default.nix index 0ad0bf0..3872f14 100644 --- a/hosts/profiles/dns/default.nix +++ b/hosts/profiles/dns/default.nix @@ -39,6 +39,7 @@ let "tracks.mossnet.lan" "grasp.mossnet.lan" "photos.mossnet.lan" + "pod.mossnet.lan" ]; in diff --git a/hosts/profiles/gpodder/default.nix b/hosts/profiles/gpodder/default.nix index bc30455..af747f3 100644 --- a/hosts/profiles/gpodder/default.nix +++ b/hosts/profiles/gpodder/default.nix @@ -1,4 +1,16 @@ { services.gpodder.enable = true; networking.firewall.allowedTCPPorts = [ 3005 ]; + services.nginx.virtualHosts."pod.mossnet.lan" = { + extraConfig = "client_max_body_size 20M;"; + + locations."/" = { + extraConfig = '' + proxy_pass http://localhost:3005/; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + ''; + }; + }; } diff --git a/hosts/profiles/mossnet-hosts/default.nix b/hosts/profiles/mossnet-hosts/default.nix index 9857c69..ebb59bb 100644 --- a/hosts/profiles/mossnet-hosts/default.nix +++ b/hosts/profiles/mossnet-hosts/default.nix @@ -18,6 +18,7 @@ 192.168.1.240 tracks.mossnet.lan 192.168.1.240 grasp.mossnet.lan 192.168.1.240 photos.mossnet.lan + 192.168.1.240 pod.mossnet.lan ''; # 10.0.69.4 mossnet.lan # 10.0.69.4 links.mossnet.lan diff --git a/modules/nixos/gpodder2go.nix b/modules/nixos/gpodder2go.nix index 4621996..de25908 100644 --- a/modules/nixos/gpodder2go.nix +++ b/modules/nixos/gpodder2go.nix @@ -3,7 +3,7 @@ with lib; let - cfg = config.services.gpodder2go; + cfg = config.services.gpodder; in { options = { @@ -53,7 +53,7 @@ in Environment = [ "VERIFIER_SECRET_KEY=${cfg.VERIFIER_SECRET_KEY}" ]; - WorkingDirectory = dataFolder; + WorkingDirectory = cfg.dataFolder; TimeoutStopSec = " 20 "; KillMode = " process "; RestartSec = " 10 "; @@ -73,8 +73,8 @@ in RestrictNamespaces = " yes "; RestrictRealtime = " yes "; SystemCallFilter = "~@clock @debug @module @mount @obsolete @privileged @reboot @setuid @swap"; - ReadWritePaths = dataFolder; - StateDirectory = baseNameOf dataFolder; + ReadWritePaths = cfg.dataFolder; + StateDirectory = baseNameOf cfg.dataFolder; }; }; @@ -90,25 +90,31 @@ in users.groups = optionalAttrs (cfg.group == "gpodder") ({ gpodder = { }; }); - }; - systemd.services.gpodder-install = { - description = "gpodder install service"; - wantedBy = [ "multi-user.target" ]; - before = [ "gpodder.service" ]; - path = with pkgs; [ gpodder2go ]; + # systemd.services.gpodder-install = { + # description = "gpodder install service"; + # wantedBy = [ "multi-user.target" ]; + # before = [ "gpodder.service" ]; + # path = with pkgs; [ gpodder2go ]; - serviceConfig = { - User = cfg.user; - Type = "oneshot"; - } // commonServiceConfig; + # serviceConfig = { + # User = cfg.user; + # Type = "oneshot"; + # CacheDirectory = "gpodder"; + # # Stores sessions. + # CacheDirectoryMode = "700"; + # ConfigurationDirectory = "gpodder"; + # LogsDirectory = "gpodder"; + # StateDirectory = "gpodder"; + # }; - script = '' - if [ ! -f "${cfg.dataFolder}/installed" ]; then - ${pkgs.gpodder2go}/bin/gpodder2go init - touch "${cfg.dataFolder}/installed" - fi - ''; + # script = '' + # if [ ! -f "${cfg.dataFolder}/installed" ]; then + # ${pkgs.gpodder2go}/bin/gpodder2go init + # touch "${cfg.dataFolder}/installed" + # fi + # ''; + # }; }; }