feat(box): gpodder deployed
This commit is contained in:
parent
afb1c0efb4
commit
676ed31aad
21
flake.nix
21
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;
|
||||
|
|
|
@ -39,6 +39,7 @@ let
|
|||
"tracks.mossnet.lan"
|
||||
"grasp.mossnet.lan"
|
||||
"photos.mossnet.lan"
|
||||
"pod.mossnet.lan"
|
||||
];
|
||||
|
||||
in
|
||||
|
|
|
@ -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;
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
# '';
|
||||
# };
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue