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.
This commit is contained in:
parent
146fdb2087
commit
c36eebe6f1
1 changed files with 5 additions and 9 deletions
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, lib, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
ugp = "/nix/config/secrets/git_uni";
|
ugp = "/nix/config/secrets/git_uni";
|
||||||
|
@ -28,9 +28,9 @@ in {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
home.file."/home/hu/.config/git/uni" = (lib.mkIf (builtins.pathExists ugp) {
|
home.file."/home/hu/.config/git/uni" = {
|
||||||
source = "/nix/config/secrets/git_uni";
|
source = ugp;
|
||||||
});
|
};
|
||||||
|
|
||||||
home.file."/home/hu/.config/git/config" = {
|
home.file."/home/hu/.config/git/config" = {
|
||||||
text = ''
|
text = ''
|
||||||
|
@ -40,13 +40,9 @@ in {
|
||||||
[includeIf "gitdir:~/programming/forks/**"]
|
[includeIf "gitdir:~/programming/forks/**"]
|
||||||
path = ~/.config/git/personal
|
path = ~/.config/git/personal
|
||||||
|
|
||||||
'' + (if builtins.pathExists ugp then ''
|
|
||||||
[includeIf "gitdir:~/programming/uni/**"]
|
[includeIf "gitdir:~/programming/uni/**"]
|
||||||
path = ~/.config/git/uni
|
path = ~/.config/git/uni
|
||||||
|
'';
|
||||||
'' else ''
|
|
||||||
# Uni config omitted
|
|
||||||
'');
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue