Skip to content

Commit

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

keyFiles = mkOption {
type = types.listOf types.path;
type = types.listOf types.secretFile;
default = [];
description = ''
A list of files containing additional configuration
Expand Down
4 changes: 2 additions & 2 deletions nixos/tests/knot.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ let
paths = [ exampleZone delegatedZone ];
};
# DO NOT USE pkgs.writeText IN PRODUCTION. This put secrets in the nix store!
tsigFile = pkgs.writeText "tsig.conf" ''
tsigFile = lib.types.secretFile.makeWorldReadable (pkgs.writeText "tsig.conf" ''
key:
- id: slave_key
algorithm: hmac-sha256
secret: zOYgOgnzx3TGe5J5I/0kxd7gTcxXhLYMEq3Ek3fY37s=
'';
'');
in {
name = "knot";
meta = with pkgs.lib.maintainers; {
Expand Down

0 comments on commit 67e17c7

Please sign in to comment.