Skip to content

Commit

Permalink
nixos/acme: use types.secretFile for credential files
Browse files Browse the repository at this point in the history
  • Loading branch information
symphorien committed Jun 6, 2022
1 parent 67e17c7 commit b4df6da
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion nixos/modules/security/acme/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ let
};

credentialsFile = mkOption {
type = types.path;
type = types.secretFile;
inherit (defaultAndText "credentialsFile" null) default defaultText;
description = ''
Path to an EnvironmentFile for the cert's service containing any required and
Expand Down
4 changes: 2 additions & 2 deletions nixos/tests/acme.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: let
dnsConfig = nodes: {
dnsProvider = "exec";
dnsPropagationCheck = false;
credentialsFile = pkgs.writeText "wildcard.env" ''
credentialsFile = lib.types.secretFile.makeWorldReadable (pkgs.writeText "wildcard.env" ''
EXEC_PATH=${dnsScript nodes}
EXEC_POLLING_INTERVAL=1
EXEC_PROPAGATION_TIMEOUT=1
EXEC_SEQUENCE_INTERVAL=1
'';
'');
};

documentRoot = pkgs.runCommand "docroot" {} ''
Expand Down

0 comments on commit b4df6da

Please sign in to comment.