Merge pull request #206419 from peperunas/miniflux-package

miniflux: Add package option
This commit is contained in:
Nikolay Korotkiy 2022-12-16 23:11:12 +04:00 committed by GitHub
commit 4e2ce56d6f
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 ];
};
}