This repository has been archived on 2024-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
nixos/modules/root-home.nix
Payas Relekar a3de5058f3 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.
2022-06-08 17:35:26 +05:30

15 lines
183 B
Nix

{ config, pkgs, ... }:
{
imports = [
./common-home.nix
];
programs = {
git = {
extraConfig = {
safe.directory = [ "/etc/nixos" ];
};
};
};
}