Skip to content

Commit

Permalink
Add support for symlining secret files
Browse files Browse the repository at this point in the history
  • Loading branch information
icetan committed Mar 29, 2023
1 parent 222da3b commit 1a21d6d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions bin/nixiform
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ in {
description = "Attrset of paths to local files, name -> local path.";
type = with types; attrsOf (submodule { options = {
path = mkOption { type = path; };
links = mkOption { type = listOf str; default = []; };
chmod = mkOption { type = strMatching "[0-7]+"; default = "0600"; };
user = mkOption { type = enum (attrNames config.users.users); default = "root"; };
group = mkOption { type = enum (attrNames config.users.groups); default = "root"; };
Expand All @@ -385,6 +386,7 @@ in {
o = config.nixiform.filesOut."\${k}";
in ''
chown -R "\${i.user}:\${i.group}" "\${o}"
\${concatMapStringsSep "\\n" (ln: "ln -sfT '\${o}' '\${ln}'") i.links}
'')
(attrNames config.nixiform.filesIn);
})
Expand Down
2 changes: 1 addition & 1 deletion lib/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.2.0
4.3.0

0 comments on commit 1a21d6d

Please sign in to comment.