add readeck

This commit is contained in:
Joakim Repomaa
2025-02-11 23:10:17 +02:00
parent 0bc01cd2b1
commit cfa04ddc31
6 changed files with 54 additions and 1 deletions

View File

@@ -14,5 +14,6 @@
./gotosocial.nix
./hastebin.nix
./workout-sync.nix
./readeck.nix
];
}

View 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;
};
};
};
};
}