{ 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.git = { enable = true; package = pkgs.gitFull; userName = "sefidel"; userEmail = "contact@sefidel.net"; signing = { key = "8BDFDFB56842239382A0441B9238BC709E05516A"; signByDefault = true; }; aliases = { graph = "log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold yellow)%h%C(reset) - %C(green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n %C(normal)%s%C(reset) %C(blue)- %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; merge.conflictStyle = "diff3"; mergetool.fugitive = { cmd = ''nvim -f -c "Gvdiffsplit!" "$MERGED"''; trustExitCode = true; }; merge.tool = "fugitive"; mergetool.prompt = false; format.signOff = true; sendemail = { smtpserver = "smtp.migadu.com"; smtpuser = "contact@sefidel.com"; smtpencryption = "ssl"; smtpserverport = "465"; }; }; 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" ]; }; # GPG Authentication subkey is used for provisioning the server, # thus we need to use fallback key to identify with gitolite. programs.ssh.enable = true; # this has no relation with the sshd daemon. programs.ssh.forwardAgent = true; programs.ssh.extraConfig = '' Host git.exotic.sh User git Port 22 IdentityFile ~/.ssh/sefidel.pub IdentitiesOnly true Host git-admin.vhosts.exotic.sh HostName git.exotic.sh User git Port 22 IdentityFile ~/.ssh/id_ed25519 IdentitiesOnly true Host work.vhosts.exotic.sh HostName cobalt.exotic.sh User sefidel Port 22 IdentityFile ~/.ssh/sefidel.pub IdentitiesOnly true ''; home.packages = [ pkgs.bfg-repo-cleaner pkgs.diffoscopeMinimal pkgs.colmena pkgs.du-dust pkgs.deploy-rs # pkgs.dnsutils # Err on darwin # TODO: https://github.com/cli/cli/issues/4955 pkgs.gh pkgs.git-annex pkgs.hyperfine pkgs.jq pkgs.lsof pkgs.ouch pkgs.tcpdump pkgs.tokei pkgs.mtr pkgs.nil pkgs.nixpkgs-fmt pkgs.nixpkgs-review pkgs.nmap pkgs.ripgrep pkgs.rust-analyzer pkgs.sd pkgs.tig pkgs.xh pkgs.cargo-play pkgs.cargo-edit pkgs.cargo-sort pkgs.cargo-diet pkgs.cargo-deny pkgs.lldb pkgs.ghc pkgs.ghidra pkgs.stack (pkgs.haskell-language-server.override { supportedGhcVersions = [ (builtins.replaceStrings [ "." ] [ "" ] pkgs.ghc.version) ]; }) pkgs.sbcl # pkgs.lispPackages.quicklisp # pkgs.lispPackages.clwrapper (pkgs.python3.withPackages (ps: with ps; [ pynvim ])) pkgs.gopls ] ++ pkgs.lib.optionals (pkgs.stdenv.isLinux) [ # TODO: currently broken/doesn't support Darwin pkgs.valgrind pkgs.clang-tools pkgs.gdb ]; }; }