privatebin: Add option for branding

This commit is contained in:
SebastianStork 2025-10-08 23:01:21 +02:00
parent d396ee6559
commit 223a231f71
2 changed files with 9 additions and 1 deletions

View file

@ -67,6 +67,7 @@
privatebin = { privatebin = {
enable = true; enable = true;
domain = "pastebin.${sproutedDomain}"; domain = "pastebin.${sproutedDomain}";
branding.name = "SproutedBin";
}; };
openspeedtest = { openspeedtest = {

View file

@ -18,6 +18,10 @@ in
type = lib.types.port; type = lib.types.port;
default = 61009; default = 61009;
}; };
branding.name = lib.mkOption {
type = lib.types.nonEmptyStr;
default = "PrivateBin";
};
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
@ -34,7 +38,10 @@ in
package = pkgs-unstable.privatebin; # Unstable to get version 2.0 package = pkgs-unstable.privatebin; # Unstable to get version 2.0
enableNginx = true; enableNginx = true;
virtualHost = "privatebin"; virtualHost = "privatebin";
settings.main.basepath = "https://${cfg.domain}"; settings.main = {
basepath = "https://${cfg.domain}";
inherit (cfg.branding) name;
};
}; };
nginx.virtualHosts.privatebin.listen = [ nginx.virtualHosts.privatebin.listen = [