{ config, lib, ... }: { options.homeconfig.git.enable = lib.options.mkOption { type = lib.types.bool; default = false; }; config = lib.mkIf config.homeconfig.git.enable { programs.git = { enable = true; userName._secret = if (!config.homeconfig.home-manager.enable) then config.home-manager.nathan.sops.secrets."git/username" else config.sops.secrets."git/username"; userEmail._secret = if (!config.homeconfig.home-manager.enable) then config.home-manager.nathan.sops.secrets."git/email" else config.sops.secrets."git/email"; extraConfig = { init = { defaultBranch = "master"; }; url = { "ssh://gitea@gitea.blunkall.us/" = { insteadOf = [ "blunkall:" ]; }; }; }; }; }; }