git: Inline conditional config
This commit is contained in:
parent
d5ce6ddf2a
commit
7f28fe14e5
3 changed files with 45 additions and 37 deletions
|
@ -1,16 +0,0 @@
|
|||
[user]
|
||||
email = "d.kempkens@nedeco.de"
|
||||
name = "Daniel Kempkens"
|
||||
signingKey = "~/.ssh/nedeco_gitlab.pub"
|
||||
|
||||
[commit]
|
||||
gpgsign = true
|
||||
|
||||
[tag]
|
||||
gpgsign = true
|
||||
|
||||
[gpg]
|
||||
format = "ssh"
|
||||
|
||||
[gpg "ssh"]
|
||||
allowedSignersFile = "~/.ssh/allowed_signers/work-nedeco"
|
|
@ -1,9 +0,0 @@
|
|||
[user]
|
||||
email = "d.kempkens@wdw-consulting.com"
|
||||
name = "Daniel Kempkens"
|
||||
|
||||
[commit]
|
||||
gpgsign = false
|
||||
|
||||
[tag]
|
||||
gpgsign = false
|
|
@ -1,9 +1,5 @@
|
|||
{ pkgs, config, ... }:
|
||||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
config-work-nedeco = "${config.xdg.configHome}/git/config-work-nedeco";
|
||||
config-work-wdw = "${config.xdg.configHome}/git/config-work-wdw";
|
||||
in
|
||||
{
|
||||
home.packages = [ pkgs.git-crypt ];
|
||||
|
||||
|
@ -58,20 +54,57 @@ in
|
|||
];
|
||||
|
||||
includes = [
|
||||
# Private
|
||||
{
|
||||
path = "${config-work-nedeco}";
|
||||
condition = "gitdir:~/Code/Work/";
|
||||
condition = "hasconfig:remote.*.url:git@github.com:*/**";
|
||||
contents = {
|
||||
user = {
|
||||
signingKey = "~/.ssh/GitHub.pub";
|
||||
};
|
||||
|
||||
commit = {
|
||||
gpgSign = true;
|
||||
};
|
||||
|
||||
tag = {
|
||||
gpgSign = true;
|
||||
};
|
||||
|
||||
gpg = {
|
||||
format = "ssh";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
# Work
|
||||
{
|
||||
path = "${config-work-wdw}";
|
||||
condition = "gitdir:~/Code/Work/WDW/";
|
||||
condition = "hasconfig:remote.*.url:git@git.app.nedeco.de:*/**";
|
||||
contents = {
|
||||
user = {
|
||||
email = "d.kempkens@nedeco.de";
|
||||
name = "Daniel Kempkens";
|
||||
signingKey = "~/.ssh/nedeco_gitlab.pub";
|
||||
};
|
||||
|
||||
commit = {
|
||||
gpgSign = true;
|
||||
};
|
||||
|
||||
tag = {
|
||||
gpgSign = true;
|
||||
};
|
||||
|
||||
gpg = {
|
||||
format = "ssh";
|
||||
};
|
||||
|
||||
"gpg \"ssh\"" = {
|
||||
allowedSignersFile = "~/.ssh/allowed_signers/work-nedeco";
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
home.sessionVariables.GIT_CEILING_DIRECTORIES = "/Users";
|
||||
|
||||
home.file."${config-work-nedeco}".source = ../config/git/config-work-nedeco;
|
||||
home.file."${config-work-wdw}".source = ../config/git/config-work-wdw;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue