about summary refs log tree commit diff
path: root/home/profiles/development
diff options
context:
space:
mode:
authorsefidel <contact@sefidel.net>2022-01-18 17:38:31 +0900
committersefidel <contact@sefidel.net>2022-01-18 17:38:31 +0900
commit7a372ed81256ce5d6aa608be9bebe173ab4e042e (patch)
tree29c7ee0a316ae0dc21ce3fe22342ec2c36ee0f4c /home/profiles/development
parent2bdc141bebd35cc38396271c42b23b6f89d032a0 (diff)
downloadnixrc-7a372ed81256ce5d6aa608be9bebe173ab4e042e.tar.gz
nixrc-7a372ed81256ce5d6aa608be9bebe173ab4e042e.zip
project: rewrite
Diffstat (limited to 'home/profiles/development')
-rw-r--r--home/profiles/development/default.nix87
1 files changed, 87 insertions, 0 deletions
diff --git a/home/profiles/development/default.nix b/home/profiles/development/default.nix
new file mode 100644
index 0000000..b0b8309
--- /dev/null
+++ b/home/profiles/development/default.nix
@@ -0,0 +1,87 @@
+{ config, lib, pkgs, self, ... }:
+
+let
+  cfg = config.profiles.development;
+in
+{
+  options.profiles.development = {
+    enable = lib.mkEnableOption
+      "A profile that enables the system to be used for developing programs";
+  };
+
+  config = lib.mkIf cfg.enable {
+    programs.gh.enable = true;
+    programs.gpg.enable = true;
+    programs.git = {
+      enable = true;
+      package = pkgs.gitFull;
+
+      userName = "Zack A";
+      userEmail = "hi@boopy.dev";
+
+      signing = {
+        key = null;
+        signByDefault = true;
+      };
+
+      aliases = {
+        graph =
+          "log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold cyan)%h%C(reset) - %C(green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all";
+        co = "checkout";
+        br = "branch";
+        st = "status";
+        ps = "push";
+        pl = "pull";
+        root = "rev-parse --show-toplevel";
+      };
+
+      extraConfig = {
+        init.defaultBranch = "main";
+        pull.rebase = true;
+      };
+
+      ignores = [
+        # IntelliJ files and folders
+        ".idea/"
+        "*.iml"
+        # backupfiles and shadow copies done by editors
+        "*~"
+        "\\#*\\#"
+        ".#*"
+        # Elixir language server
+        "/.elixir_ls"
+        # MyPy Cache
+        ".mypy_cache"
+        # Visual Studio Code project configuration
+        "/.vscode"
+        # Result folder for nix builds
+        "result"
+        "result-*"
+        # direnv caches
+        ".direnv/"
+        # emacs/python stuff
+        "flycheck_*.py"
+      ];
+    };
+
+    home.packages = [
+      pkgs.bfg-repo-cleaner
+      pkgs.diffoscopeMinimal
+      # Fix gpg not recognizing foot terminfo
+      pkgs.foot.terminfo
+      pkgs.jq
+      pkgs.nixpkgs-fmt
+      pkgs.nixpkgs-review
+      pkgs.ripgrep
+      pkgs.rust-analyzer
+      (pkgs.rust-bin.nightly.latest.default.override { extensions = [ "rust-src" ]; })
+      pkgs.tig
+    ];
+
+    services.gpg-agent = {
+      enable = true;
+      pinentryFlavor = "curses";
+    };
+  };
+}
+