Skip to content

Commit

Permalink
nixos/miniflux: use types.secretFile for admin credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
symphorien committed Jun 6, 2022
1 parent b4df6da commit 2caf44d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion nixos/modules/services/web-apps/miniflux.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ in
};

adminCredentialsFile = mkOption {
type = types.path;
type = types.secretFile;
description = ''
File containing the ADMIN_USERNAME and
ADMIN_PASSWORD (length >= 6) in the format of
Expand Down
8 changes: 4 additions & 4 deletions nixos/tests/miniflux.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ let
defaultPort = 8080;
defaultUsername = "admin";
defaultPassword = "password";
adminCredentialsFile = pkgs.writeText "admin-credentials" ''
adminCredentialsFile = lib.types.secretFile.makeWorldReadable (pkgs.writeText "admin-credentials" ''
ADMIN_USERNAME=${defaultUsername}
ADMIN_PASSWORD=${defaultPassword}
'';
customAdminCredentialsFile = pkgs.writeText "admin-credentials" ''
'');
customAdminCredentialsFile = lib.types.secretFile.makeWorldReadable (pkgs.writeText "admin-credentials" ''
ADMIN_USERNAME=${username}
ADMIN_PASSWORD=${password}
'';
'');

in
with lib;
Expand Down

0 comments on commit 2caf44d

Please sign in to comment.