about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-02-09 08:35:25 -0800
committerFranck Cuny <franck@fcuny.net>2022-02-09 08:35:25 -0800
commit0c40201f2cae729a94c43490a07c437aedfc4534 (patch)
treeca37fdf59b46b1b530434bbbcbc5ee5784bb7862
parentterminal: alacritty is our terminal of choice (diff)
downloadworld-0c40201f2cae729a94c43490a07c437aedfc4534.tar.gz
home-manager: add more common programs
Add git configuration and move go to its own module.
-rw-r--r--users/fcuny/common.nix8
-rw-r--r--users/fcuny/git.nix20
-rw-r--r--users/fcuny/go.nix6
3 files changed, 30 insertions, 4 deletions
diff --git a/users/fcuny/common.nix b/users/fcuny/common.nix
index 62ebb80..7bad304 100644
--- a/users/fcuny/common.nix
+++ b/users/fcuny/common.nix
@@ -13,8 +13,8 @@
     EDITOR = "vim";
   };
 
-  programs.go = {
-    enable = true;
-    goPath = "workspace/go";
-  };
+  import = [
+    ./git.nix
+    ./go.nix
+  ]
 }
diff --git a/users/fcuny/git.nix b/users/fcuny/git.nix
new file mode 100644
index 0000000..adaf626
--- /dev/null
+++ b/users/fcuny/git.nix
@@ -0,0 +1,20 @@
+{
+  programs.git = {
+    enable = true;
+    aliases = {
+      s = "status --short --branch";
+      amend = "commit --amend --no-edit";
+    };
+    extraConfig = {
+      core.whitespace = "trailing-space,space-before-tab";
+      color.ui = "true";
+      push.default = "simple";
+      init.defaultBranch = "main";
+      branch.autosetuprebase = "remote";
+      branch.sort = "authordate";
+    };
+    userName = "Franck Cuny";
+    userEmail = "franck@fcuny.net";
+    ignores = [ "*.o" "*.pyc" "*.pyo" "*.elc" "*~" ".direnv/*" "\\#*\\#" ".\\#" ];
+  };
+}
diff --git a/users/fcuny/go.nix b/users/fcuny/go.nix
new file mode 100644
index 0000000..990b2ae
--- /dev/null
+++ b/users/fcuny/go.nix
@@ -0,0 +1,6 @@
+{
+  programs.go = {
+    enable = true;
+    goPath = "workspace/go";
+  };
+}