Extract git work configuration to threema subrepo

This commit is contained in:
Fabian Hauser 2022-04-12 11:11:52 +02:00
parent 5add79250b
commit a16955dea2
3 changed files with 14 additions and 27 deletions

View file

@ -55,8 +55,10 @@
log.follow = true;
rerere.enabled = true;
};
ignores = [ "*~" "*.swp" ".direnv/" ];
lfs.enable = true;
includes = let
mkDefaultConfig = (dir: {
mkConfig = (dir: {
condition = "gitdir:${dir}";
contents = {
user = {
@ -66,27 +68,12 @@
};
};
});
workConfig = {
contents = {
commit.gpgsign = true;
tag.gpgsign = true;
user = {
signingkey = "0xE0CDD70E5D286D64";
email = "fabian.hauser@threema.ch";
};
url."git@work.github.com".insteadOf = "git@github.com";
};
};
in [
(mkDefaultConfig "~/private/")
(mkDefaultConfig "/etc/nixos/")
(mkDefaultConfig "~/.password-store/")
(mkDefaultConfig "~/shares/cloud.qo.is/")
(mkDefaultConfig "~/shares/drive.switch.ch/")
((mkDefaultConfig "~/work/") // workConfig)
((mkDefaultConfig "~/shares/cloud.threema.ch/") // workConfig)
in map mkConfig [
"~/private/"
"/etc/nixos/"
"~/.password-store/"
"~/shares/cloud.qo.is/"
"~/shares/drive.switch.ch/"
];
ignores = [ "*~" "*.swp" ".direnv/" ];
lfs.enable = true;
};
}