modules: services: miniflux: use 'credentialsFiles'
In preparation for the migration to agenix.
This commit is contained in:
parent
da63787874
commit
9d8da4d2b2
|
@ -70,7 +70,10 @@ in
|
||||||
};
|
};
|
||||||
miniflux = {
|
miniflux = {
|
||||||
enable = true;
|
enable = true;
|
||||||
password = my.secrets.miniflux.password;
|
credentialsFiles = builtins.toFile "miniflux-creds.txt" ''
|
||||||
|
ADMIN_USERNAME=Ambroisie
|
||||||
|
ADMIN_PASSWORD=${my.secrets.miniflux.password}
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
# Various monitoring dashboards
|
# Various monitoring dashboards
|
||||||
monitoring = {
|
monitoring = {
|
||||||
|
|
|
@ -7,17 +7,12 @@ in
|
||||||
options.my.services.miniflux = with lib; {
|
options.my.services.miniflux = with lib; {
|
||||||
enable = mkEnableOption "Miniflux feed reader";
|
enable = mkEnableOption "Miniflux feed reader";
|
||||||
|
|
||||||
username = mkOption {
|
credentialsFiles = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = "Ambroisie";
|
example = "/var/lib/miniflux/creds.env";
|
||||||
example = "username";
|
description = ''
|
||||||
description = "Name of the admin user";
|
Credential file as an 'EnvironmentFile' (see `systemd.exec(5)`)
|
||||||
};
|
'';
|
||||||
|
|
||||||
password = mkOption {
|
|
||||||
type = types.str;
|
|
||||||
example = "password";
|
|
||||||
description = "Password of the admin user";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
port = mkOption {
|
port = mkOption {
|
||||||
|
@ -33,12 +28,7 @@ in
|
||||||
services.miniflux = {
|
services.miniflux = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
adminCredentialsFile =
|
adminCredentialsFile = cfg.credentialsFiles;
|
||||||
# Insecure, I don't care.
|
|
||||||
builtins.toFile "credentials.env" ''
|
|
||||||
ADMIN_USERNAME=${cfg.username}
|
|
||||||
ADMIN_PASSWORD=${cfg.password}
|
|
||||||
'';
|
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
# Virtual hosts settings
|
# Virtual hosts settings
|
||||||
|
|
Loading…
Reference in a new issue