mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-11-13 12:13:46 +01:00
security: scope privileges and stop a world-readable secret copy (#335)
This commit is contained in:
1 parent
d690f45183
commit
4909f6357b
11 files changed
+106
-45
No files matched your search
+6
-3
@@ -139,11 +139,14 @@ in
|
||||
mode = "0000";
|
||||
};
|
||||
|
||||
# The following secrets are used by home-manager modules
|
||||
# So we need to make then readable by the user
|
||||
# Used by a home-manager module, so it must be readable by the user.
|
||||
# Setting `mode` makes environment.etc copy the file instead of
|
||||
# symlinking the runtime secret, so the owner must be set as well —
|
||||
# otherwise it becomes a world-readable, root-owned copy of the secret.
|
||||
"agenix/nushell-secrets.nu" = {
|
||||
source = config.age.secrets."nushell-secrets.nu".path;
|
||||
mode = "0644"; # both the original file and the symlink should be readable and executable by the user
|
||||
mode = "0400";
|
||||
user = myvars.username;
|
||||
};
|
||||
};
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user