this post was submitted on 21 Apr 2024
14 points (100.0% liked)

Nix / NixOS

1465 readers
1 users here now

Main links

Videos

founded 1 year ago
MODERATORS
 

Hi! I ran into the issue that my kube config, which I manage with home-manager is world read- and writable. I hoped that there is an easy option to set file permissions with home-manager, e.g. home.file."foo".permissions = 0644 but something like this does not exist. All solutions a short web search turns up are overly complicated for something that seems to be a trivial task.

What is the easiest way to set permissions for a file with home-manager?

you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 1 points 5 months ago (1 children)

Thanks for the response. I'll have a look at it. It still astonishes me that there is no off-the-shelf solution to such a trivial and common use case.

[โ€“] [email protected] 2 points 5 months ago

@secana If you manage it with homemanager it will be world readable anyway, since it is a symlink to nix store, and files inside the nix store are always world readable