reorganize and fix searxng
This commit is contained in:
47
homes/nathan/home-manager/programs/git/default.nix
Normal file
47
homes/nathan/home-manager/programs/git/default.nix
Normal file
@@ -0,0 +1,47 @@
|
||||
{ config, lib, ... }: {
|
||||
|
||||
options.homeconfig.git.enable = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.homeconfig.git.enable {
|
||||
|
||||
sops = {
|
||||
secrets = {
|
||||
"git/username" = {};
|
||||
"git/email" = {};
|
||||
};
|
||||
|
||||
templates.gitconfig.content = ''
|
||||
[user]
|
||||
name = "${config.sops.placeholder."git/username"}"
|
||||
email = "${config.sops.placeholder."git/email"}"
|
||||
'';
|
||||
};
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
|
||||
includes = [
|
||||
{ path = "${config.sops.templates.gitconfig.path}"; }
|
||||
];
|
||||
|
||||
settings = {
|
||||
init = {
|
||||
defaultBranch = "master";
|
||||
};
|
||||
|
||||
safe.directory = "/etc/nixos";
|
||||
|
||||
url = {
|
||||
"ssh://gitea@esotericbytes.com/" = {
|
||||
insteadOf = [
|
||||
"server:"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user