summary refs log tree commit diff stats
path: root/modules
diff options
context:
space:
mode:
authorSilas Schöffel <sils@sils.li>2024-06-02 14:08:50 +0200
committerSilas Schöffel <sils@sils.li>2024-06-02 14:08:50 +0200
commitcde45a14f2da16f8c0e9bb3d592c62ccb5e6fdb8 (patch)
tree38f04a6f534be8a88de348274dcb74301cc84ef8 /modules
parentfoot: init module (diff)
downloadnix-config-cde45a14f2da16f8c0e9bb3d592c62ccb5e6fdb8.tar.gz
nix-config-cde45a14f2da16f8c0e9bb3d592c62ccb5e6fdb8.zip
git: init module
Diffstat (limited to 'modules')
-rw-r--r--modules/hm/sils/default.nix1
-rw-r--r--modules/hm/sils/git.nix60
2 files changed, 61 insertions, 0 deletions
diff --git a/modules/hm/sils/default.nix b/modules/hm/sils/default.nix
index 8fbf363..a10ed4e 100644
--- a/modules/hm/sils/default.nix
+++ b/modules/hm/sils/default.nix
@@ -5,6 +5,7 @@
     ./etesync-dav.nix
     ./firefox
     ./foot.nix
+    ./git.nix
     ./jameica.nix
     ./kdeconnect.nix
     ./mail.nix
diff --git a/modules/hm/sils/git.nix b/modules/hm/sils/git.nix
new file mode 100644
index 0000000..5bd4dd2
--- /dev/null
+++ b/modules/hm/sils/git.nix
@@ -0,0 +1,60 @@
+{
+  config,
+  lib,
+  pkgs,
+  ...
+}: let
+  cfg = config.sils.git;
+in {
+  options.sils.git.enable = lib.mkEnableOption "sils git config";
+  config = lib.mkIf cfg.enable {
+    programs.git = {
+      enable = true;
+      package = pkgs.gitFull;
+      userName = "Silas Schöffel";
+      userEmail = "sils@sils.li";
+      delta = {
+        enable = true;
+        options = {
+          decorations = {
+            commit-decoration-style = "bold purple box ul";
+            file-decoration-style = "none";
+            file-style = "bold red ul";
+          };
+          features = "decorations";
+          whitespace-error-style = "22 reverse";
+        };
+      };
+      signing = {
+        key = "467B7D129EA73AC9";
+        signByDefault = true;
+      };
+      extraConfig = {
+        core = {
+          autocrlf = "input";
+        };
+        safe = {
+          directory = "/etc/nixos";
+        };
+        push = {
+          autoSetupRemote = true;
+        };
+        init = {
+          defaultBranch = "main";
+        };
+        commit = {
+          verbose = true;
+        };
+        sendemail = {
+          smtpserver = "server1.vhack.eu";
+          smtpuser = "sils@sils.li";
+          smtpencryption = "ssl";
+          smtpserverport = "465";
+        };
+      };
+      aliases = {
+        recommit = "commit --file=.git/COMMIT_EDITMSG --edit";
+      };
+    };
+  };
+}