about summary refs log tree commit diff
path: root/home/git
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2023-05-05 19:41:58 -0700
committerFranck Cuny <franck@fcuny.net>2023-05-05 19:41:58 -0700
commit43da9edb4598eef509c481ae0b305384418c45de (patch)
treea0ad614c90102757143e026e4fe1806431a3dbf4 /home/git
parentprofiles/default: users are immutable (diff)
downloadworld-43da9edb4598eef509c481ae0b305384418c45de.tar.gz
home/profiles: move (almost) all modules to profiles
This is a major refactor, similar to what was done for the hosts, but in
a single commit.
Diffstat (limited to '')
-rw-r--r--home/git/commit.template11
-rw-r--r--home/git/default.nix63
-rw-r--r--home/git/gitignore12
3 files changed, 0 insertions, 86 deletions
diff --git a/home/git/commit.template b/home/git/commit.template
deleted file mode 100644
index b116a68..0000000
--- a/home/git/commit.template
+++ /dev/null
@@ -1,11 +0,0 @@
-
-# (If applied, this commit will...) <subject>
-
-# Explain why this change is being made
-
-# --- COMMIT END ---
-# Remember to
-#    Use the imperative mood, present tense: `change' not `changed' nor `changes'
-#    Do not end the subject line with a period
-#    Use the body to explain what and why vs. how
-#    Can use multiple lines with "-" for bullet points in body
diff --git a/home/git/default.nix b/home/git/default.nix
deleted file mode 100644
index e840f54..0000000
--- a/home/git/default.nix
+++ /dev/null
@@ -1,63 +0,0 @@
-{ lib, config, pkgs, ... }:
-
-let
-  cfg = config.my.home.git;
-  sshPub = builtins.fromTOML (builtins.readFile ../../configs/ssh-pubkeys.toml);
-in
-{
-  options.my.home.git = with lib; {
-    enable = mkEnableOption "git configuration";
-  };
-
-  config = lib.mkIf cfg.enable {
-    home.file.".ssh/allowed_signers".text = lib.concatMapStrings (x: "franck@fcuny.net ${x}\n") (with sshPub; [ aptos work git ykey-laptop ]);
-
-    programs.git = {
-      enable = true;
-      aliases = {
-        s = "status --short --branch";
-        amend = "commit --amend --no-edit";
-      };
-      signing = {
-        key = "key::${sshPub.ykey-laptop}";
-        signByDefault = true;
-      };
-      extraConfig = {
-        core.whitespace = "trailing-space,space-before-tab";
-        color.ui = "true";
-
-        diff = {
-          age.textconv = "${pkgs.age}/bin/age --identity ${config.home.homeDirectory}/.age/key.txt --decrypt";
-        };
-
-        gpg = {
-          format = "ssh";
-          ssh.allowedSignersFile = "~/.ssh/allowed_signers";
-        };
-        # abort if the remote branch does not match the local one
-        push.default = "simple";
-
-        init.defaultBranch = "main";
-
-        pull.rebase = true;
-        rebase = {
-          # Automatically create a temporary stash entry before the
-          # operation begins, and apply it after the operation ends.
-          autoStash = true;
-          # Print a warning if some commits are removed
-          missingCommitsCheck = "warn";
-        };
-
-        branch.autosetuprebase = "remote";
-        branch.sort = "authordate";
-
-        commit.template = "${config.xdg.dataHome}/git/commit.template";
-      };
-      userName = "Franck Cuny";
-      userEmail = "franck@fcuny.net";
-      ignores = [ (builtins.readFile ./gitignore) ];
-    };
-    xdg.dataFile."git/commit.template" = { source = ./commit.template; };
-    home.packages = with pkgs; [ tools.git-blame-stats gitAndTools.pre-commit ];
-  };
-}
diff --git a/home/git/gitignore b/home/git/gitignore
deleted file mode 100644
index 83adbce..0000000
--- a/home/git/gitignore
+++ /dev/null
@@ -1,12 +0,0 @@
-*.elc
-*pyc
-*~
-.DS_Store
-.\\#
-.dir-locals.el
-.direnv/*
-.projectile
-.pytest_cache/
-tags
-/result
-/.pre-commit-config.yaml