From 946323f0cad17e511ab0cf5052506e4f565edfe0 Mon Sep 17 00:00:00 2001 From: qaristote Date: Tue, 14 Mar 2023 12:23:56 +0100 Subject: home & nixos: git: add config for system flake directory --- modules/nixos/personal/nix.nix | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'modules/nixos/personal/nix.nix') diff --git a/modules/nixos/personal/nix.nix b/modules/nixos/personal/nix.nix index 156f045..a4948f4 100644 --- a/modules/nixos/personal/nix.nix +++ b/modules/nixos/personal/nix.nix @@ -45,5 +45,13 @@ in { wantedBy = lib.mkIf config.nix.gc.automatic [ "nix-gc.service" ]; }; }; + programs.git = lib.mkIf (cfg.flake != null + && lib.hasPrefix "git+file" cfg.flake) { + enable = true; + config.user = { + name = "Root user of ${config.networking.hostName}"; + email = "root@${config.networking.hostName}"; + }; + }; }; } -- cgit v1.2.3