-
-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make configuration.nix writeable by root #384
Comments
Hello, I will try to implement this, I will keep you updated if I need anything |
Hello again @nzbr , I got a few issue so I want to know how should I try to debug it further, the three changes I tried: --- a/modules/build-tarball.nix
+++ b/modules/build-tarball.nix
@@ -85,6 +85,7 @@ in
mkdir -p "$root/etc/nixos"
cp -R ${lib.cleanSource cfg.configPath}/. "$root/etc/nixos"
chmod -R u+w "$root/etc/nixos"
+ chown -R 1000 /etc/nixos
''}
echo "[NixOS-WSL] Compressing..." AND --- a/modules/build-tarball.nix
+++ b/modules/build-tarball.nix
@@ -85,6 +85,7 @@ in
mkdir -p "$root/etc/nixos"
cp -R ${lib.cleanSource cfg.configPath}/. "$root/etc/nixos"
chmod -R u+w "$root/etc/nixos"
+ chown -R 1000 "$root/etc/nixos"
''}
echo "[NixOS-WSL] Compressing..." AND --- a/modules/build-tarball.nix
+++ b/modules/build-tarball.nix
@@ -85,6 +85,7 @@ in
mkdir -p "$root/etc/nixos"
cp -R ${lib.cleanSource cfg.configPath}/. "$root/etc/nixos"
chmod -R u+w "$root/etc/nixos"
+ chown -R nixos /etc/nixos
''}
echo "[NixOS-WSL] Compressing..." |
Changing the owner to the default user shouldn't be necessary. It's fine if the file can only be edited by root. Given that the needed |
That is what I was thinking too, so maybe we could do it in the first time the system is runned like the welcome message? |
Good idea. I like it. It's probably best to put it in an activation script |
I don't like the idea of a activation script since I still want give the user a way to change the permissions for whatever they want, Which is impossible if the permissions are changed everytime the system is rebuilt |
When importing a fresh tarball,
/etc/nixos/configuration.nix
is set to read-only. We should make the file writeable by root in the tarball builderThe text was updated successfully, but these errors were encountered: