fix(nixos): add safe.directory for dotfiles-rebuild service 🔧
Git refuses to operate on /etc/dotfiles owned by danny when the service runs as root. Pass safe.directory via environment variables.
This commit is contained in:
parent
afbc87be2b
commit
d8e5cbe26a
1 changed files with 3 additions and 0 deletions
|
|
@ -67,6 +67,9 @@ in
|
|||
systemd.services.dotfiles-rebuild = {
|
||||
description = "Pull dotfiles and run nixos-rebuild if repo changed";
|
||||
path = with pkgs; [ git nix ];
|
||||
environment.GIT_CONFIG_COUNT = "1";
|
||||
environment.GIT_CONFIG_KEY_0 = "safe.directory";
|
||||
environment.GIT_CONFIG_VALUE_0 = dotfilesDir;
|
||||
script = ''
|
||||
set -euo pipefail
|
||||
cd ${dotfilesDir}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue