miniflux: Add package option

This commit is contained in:
Giulio De Pasquale 2022-12-16 16:11:40 +01:00 committed by GitHub
parent 20620ad867
commit b2742248e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,6 +21,13 @@ in
services.miniflux = {
enable = mkEnableOption (lib.mdDoc "miniflux and creates a local postgres database for it");
package = mkOption {
type = types.package;
default = pkgs.miniflux;
defaultText = literalExpression "pkgs.miniflux";
description = lib.mdDoc "Miniflux package to use.";
};
config = mkOption {
type = types.attrsOf types.str;
example = literalExpression ''
@ -89,7 +96,7 @@ in
after = [ "network.target" "postgresql.service" "miniflux-dbsetup.service" ];
serviceConfig = {
ExecStart = "${pkgs.miniflux}/bin/miniflux";
ExecStart = "${cfg.package}/bin/miniflux";
User = dbUser;
DynamicUser = true;
RuntimeDirectory = "miniflux";
@ -122,6 +129,6 @@ in
environment = cfg.config;
};
environment.systemPackages = [ pkgs.miniflux ];
environment.systemPackages = [ cfg.package ];
};
}