Hermes: Attempt to fix nixos-rebuild issue due to git
git fixed a CVE that makes directories not owned by the user to appear as not git repo. Since my /etc/nixos is owned by my user, but nixos-rebuild is performed by root, this is an issue. Simplest and best workaround is to add this repo as safe directory. This commit fixes this by way of setting default config for root user. I also decided to go all in and setup full home-manager config identical to my user here. I'll probably remove the FIsh config, but will see how it goes.
This commit is contained in:
parent
b706c3c4f8
commit
a3de5058f3
1 changed files with 15 additions and 0 deletions
15
modules/root-home.nix
Normal file
15
modules/root-home.nix
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./common-home.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
programs = {
|
||||||
|
git = {
|
||||||
|
extraConfig = {
|
||||||
|
safe.directory = [ "/etc/nixos" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Reference in a new issue