add readeck
This commit is contained in:
@@ -14,5 +14,6 @@
|
||||
./gotosocial.nix
|
||||
./hastebin.nix
|
||||
./workout-sync.nix
|
||||
./readeck.nix
|
||||
];
|
||||
}
|
||||
|
||||
38
modules/services/readeck.nix
Normal file
38
modules/services/readeck.nix
Normal file
@@ -0,0 +1,38 @@
|
||||
{ lib, inputs, config, pkgs, ... }:
|
||||
let
|
||||
cfg = config.services.readeck;
|
||||
secrets = config.age.secrets;
|
||||
fqdn = "${cfg.subdomain}.${config.networking.domain}";
|
||||
pkgsUnstable = inputs.nixpkgs-unstable.legacyPackages.${pkgs.system};
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
"${inputs.nixpkgs-unstable}/nixos/modules/services/web-apps/readeck.nix"
|
||||
];
|
||||
|
||||
options.services.readeck = {
|
||||
subdomain = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.readeck = {
|
||||
package = pkgsUnstable.readeck;
|
||||
environmentFile = secrets.readeck.path;
|
||||
settings = {
|
||||
server.port = lib.mkDefault 8090;
|
||||
};
|
||||
};
|
||||
|
||||
modules.services.webserver = {
|
||||
enable = lib.mkDefault true;
|
||||
vHosts.${fqdn} = {
|
||||
proxyBuffering = false;
|
||||
locations."/" = {
|
||||
proxyPort = cfg.settings.server.port;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user