mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 21:01:34 +01:00
Add freshrss nspawn container
This commit is contained in:
parent
946ef625fc
commit
ad11056a26
2 changed files with 42 additions and 2 deletions
38
hosts/stratus/containers/nspawn/freshrss/default.nix
Normal file
38
hosts/stratus/containers/nspawn/freshrss/default.nix
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{ lib, ... }:
|
||||
let
|
||||
serviceName = lib.last (lib.splitString "/" (builtins.toString ./.)); # Parent directory name
|
||||
subdomain = "rss";
|
||||
in
|
||||
{
|
||||
sops.secrets."container/freshrss/admin-password" = { };
|
||||
|
||||
containers.${serviceName}.config =
|
||||
{
|
||||
config,
|
||||
domain,
|
||||
dataDir,
|
||||
...
|
||||
}:
|
||||
let
|
||||
userName = config.users.users.freshrss.name;
|
||||
groupName = config.users.groups.freshrss.name;
|
||||
in
|
||||
{
|
||||
systemd.tmpfiles.rules = [
|
||||
"z /run/secrets/container/freshrss/admin-password - ${userName} ${groupName} -"
|
||||
];
|
||||
|
||||
services.freshrss = {
|
||||
enable = true;
|
||||
inherit dataDir;
|
||||
baseUrl = "https://${subdomain}.${domain}";
|
||||
defaultUser = "seb";
|
||||
passwordFile = "/run/secrets/container/freshrss/admin-password";
|
||||
};
|
||||
|
||||
myConfig.tailscale = {
|
||||
inherit subdomain;
|
||||
serve = "80";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue