From c36eebe6f16ffcc937720466120d1b5b3d8cef72 Mon Sep 17 00:00:00 2001 From: caem Date: Sun, 8 Dec 2024 11:46:43 +0100 Subject: [PATCH] git: Fix multiple identities Very cursed solution but I don't have time to waste on it right now. Will fix sometime later when I find the spare time to. --- modules/packages/git.nix | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/modules/packages/git.nix b/modules/packages/git.nix index 7beb86f..b0d49ba 100644 --- a/modules/packages/git.nix +++ b/modules/packages/git.nix @@ -1,4 +1,4 @@ -{ pkgs, lib, ... }: +{ pkgs, ... }: let ugp = "/nix/config/secrets/git_uni"; @@ -28,9 +28,9 @@ in { ''; }; - home.file."/home/hu/.config/git/uni" = (lib.mkIf (builtins.pathExists ugp) { - source = "/nix/config/secrets/git_uni"; - }); + home.file."/home/hu/.config/git/uni" = { + source = ugp; + }; home.file."/home/hu/.config/git/config" = { text = '' @@ -40,13 +40,9 @@ in { [includeIf "gitdir:~/programming/forks/**"] path = ~/.config/git/personal - '' + (if builtins.pathExists ugp then '' [includeIf "gitdir:~/programming/uni/**"] path = ~/.config/git/uni - - '' else '' - # Uni config omitted - ''); + ''; }; }; }