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