From 3b5a73c436eb22e0cda59469263490705e149cb9 Mon Sep 17 00:00:00 2001 From: schererleander Date: Fri, 9 Jan 2026 16:57:15 +0100 Subject: refactor: use flake-parts, change modules structure --- modules/users/git/default.nix | 81 ------------------------------------------- 1 file changed, 81 deletions(-) delete mode 100644 modules/users/git/default.nix (limited to 'modules/users/git/default.nix') diff --git a/modules/users/git/default.nix b/modules/users/git/default.nix deleted file mode 100644 index f1f555e..0000000 --- a/modules/users/git/default.nix +++ /dev/null @@ -1,81 +0,0 @@ -{ - config, - lib, - ... -}: -let - cfg = config.nx.git; - inherit (lib) mkOption mkIf types; -in -{ - options.nx.git = { - enable = mkOption { - description = "Enable git"; - type = types.bool; - default = false; - }; - - userName = mkOption { - description = "Git username"; - type = types.str; - default = "Leander Scherer"; - }; - - userEmail = mkOption { - description = "Git email"; - type = types.str; - default = "leander@schererleander.de"; - }; - - signKey = mkOption { - description = "Sign key"; - type = types.nullOr types.str; - default = "A3502B180BC1D41A"; - }; - - signFlavor = mkOption { - description = "Sign key flavor"; - type = types.enum [ - "ssh" - "openpgp" - ]; - default = "openpgp"; - }; - }; - - config = mkIf cfg.enable { - programs.git = { - enable = true; - - signing = mkIf (cfg.signKey != null) { - key = cfg.signKey; - signByDefault = true; - }; - - ignores = [ - "*~" - ".DS_Store" - ".direnv" - ".envrc" - ]; - - settings = { - user.name = cfg.userName; - user.email = cfg.userEmail; - help.autocorrect = 20; - alias = { - st = "status"; - co = "checkout"; - br = "branch"; - }; - pull.rebase = true; - gpg.format = cfg.signFlavor; - url."git@github.com:".insteadOf = "https://github.com"; - }; - }; - programs.diff-highlight = { - enable = true; - enableGitIntegration = true; - }; - }; -} -- cgit v1.3.1