2020-04-28 20:36:57 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
2020-05-26 17:27:20 +02:00
|
|
|
let
|
|
|
|
|
|
|
|
clj2nix = pkgs.callPackage
|
|
|
|
(pkgs.fetchFromGitHub {
|
|
|
|
owner = "hlolli";
|
|
|
|
repo = "clj2nix";
|
|
|
|
rev = "3ab3480a25e850b35d1f532a5e4e7b3202232383";
|
|
|
|
sha256 = "1lry026mlpxp1j563qs13nhxf37i2zpl7lh0lgfdwc44afybqka6";
|
|
|
|
})
|
|
|
|
{ };
|
|
|
|
|
2020-06-15 17:53:39 +02:00
|
|
|
pg-dump-upsert = pkgs.buildGoModule rec {
|
|
|
|
pname = "pg-dump-upsert";
|
|
|
|
version = "165258deaebded5e9b88f7a0acf3a4b7350e7bf4";
|
|
|
|
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "tomyl";
|
|
|
|
repo = "pg-dump-upsert";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "1an4h8jjbj3r618ykjwk9brii4h9cxjqy47c4c8rivnvhimgf4wm";
|
|
|
|
};
|
|
|
|
|
2022-09-26 19:33:05 +02:00
|
|
|
vendorHash = "sha256:1a5fx6mrv30cl46kswicd8lf5i5shn1fykchvbnbhdpgxhbz6qi4";
|
2020-06-15 17:53:39 +02:00
|
|
|
};
|
|
|
|
|
2020-05-26 17:27:20 +02:00
|
|
|
in
|
|
|
|
|
2020-05-26 16:43:19 +02:00
|
|
|
with lib;
|
|
|
|
|
2020-04-28 20:36:57 +02:00
|
|
|
{
|
|
|
|
imports = [
|
2020-06-08 16:19:05 +02:00
|
|
|
./lib/zshFunctions.nix
|
2024-03-31 20:11:01 +02:00
|
|
|
# TODO(aspen): agda build is broken in the nixpkgs checkout
|
2020-12-25 11:13:06 +01:00
|
|
|
# ./development/agda.nix
|
2020-11-30 00:54:38 +01:00
|
|
|
./development/rust.nix
|
2020-04-28 20:36:57 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
home.packages = with pkgs; [
|
|
|
|
jq
|
2020-05-08 16:16:52 +02:00
|
|
|
yq
|
2021-06-18 17:52:38 +02:00
|
|
|
gron
|
2020-04-28 20:36:57 +02:00
|
|
|
gitAndTools.tig
|
2020-10-05 16:43:47 +02:00
|
|
|
gitAndTools.gh
|
2020-04-28 20:36:57 +02:00
|
|
|
shellcheck
|
|
|
|
httpie
|
|
|
|
entr
|
|
|
|
gnumake
|
|
|
|
inetutils
|
2020-12-14 18:52:14 +01:00
|
|
|
tokei
|
2020-07-06 16:32:41 +02:00
|
|
|
jsonnet
|
2021-01-13 16:12:49 +01:00
|
|
|
ngrok
|
2021-04-12 17:21:20 +02:00
|
|
|
amber
|
2020-05-26 17:27:20 +02:00
|
|
|
|
2020-07-13 21:14:56 +02:00
|
|
|
gdb
|
|
|
|
lldb
|
2020-07-15 20:04:51 +02:00
|
|
|
hyperfine
|
2024-01-16 16:44:38 +01:00
|
|
|
clang-tools
|
2020-07-13 21:14:56 +02:00
|
|
|
|
2020-05-26 17:27:20 +02:00
|
|
|
clj2nix
|
2020-08-02 21:58:26 +02:00
|
|
|
clojure
|
|
|
|
leiningen
|
2021-01-29 18:14:35 +01:00
|
|
|
clj-kondo
|
2020-05-26 17:27:20 +02:00
|
|
|
|
2020-06-15 17:53:39 +02:00
|
|
|
pg-dump-upsert
|
2020-05-26 17:27:20 +02:00
|
|
|
|
2021-03-29 01:55:18 +02:00
|
|
|
nodePackages.prettier
|
2020-11-25 15:59:11 +01:00
|
|
|
] ++ optionals (stdenv.isLinux) [
|
2024-03-31 20:11:01 +02:00
|
|
|
# TODO(aspen): replace with stable again once the current julia debacle
|
2021-06-02 22:32:41 +02:00
|
|
|
# is resolved upstream, see https://github.com/NixOS/nixpkgs/pull/121114
|
|
|
|
julia_16-bin
|
2020-11-25 15:59:11 +01:00
|
|
|
valgrind
|
2023-10-23 20:51:21 +02:00
|
|
|
|
|
|
|
linuxPackages.perf
|
|
|
|
rr
|
2020-11-25 15:59:11 +01:00
|
|
|
];
|
2020-04-28 20:36:57 +02:00
|
|
|
|
|
|
|
programs.git = {
|
|
|
|
enable = true;
|
2020-05-07 16:57:12 +02:00
|
|
|
package = pkgs.gitFull;
|
2020-04-28 20:36:57 +02:00
|
|
|
userEmail = "root@gws.fyi";
|
2023-06-27 21:08:52 +02:00
|
|
|
userName = "Aspen Smith";
|
2020-04-28 20:36:57 +02:00
|
|
|
ignores = [
|
|
|
|
"*.sw*"
|
|
|
|
".classpath"
|
|
|
|
".project"
|
|
|
|
".settings/"
|
|
|
|
".dir-locals.el"
|
|
|
|
".stack-work-profiling"
|
|
|
|
".projectile"
|
|
|
|
];
|
|
|
|
extraConfig = {
|
|
|
|
github.user = "glittershark";
|
|
|
|
merge.conflictstyle = "diff3";
|
2021-01-13 16:12:59 +01:00
|
|
|
rerere.enabled = "true";
|
2021-12-22 22:21:22 +01:00
|
|
|
advice.skippedCherryPicks = "false";
|
2020-04-28 20:36:57 +02:00
|
|
|
};
|
2020-05-07 16:58:27 +02:00
|
|
|
|
|
|
|
delta = {
|
|
|
|
enable = true;
|
2020-08-02 21:58:26 +02:00
|
|
|
options = {
|
2021-04-12 17:08:32 +02:00
|
|
|
syntax-theme = "Solarized (light)";
|
2020-08-02 21:58:26 +02:00
|
|
|
hunk-style = "plain";
|
|
|
|
commit-style = "box";
|
|
|
|
};
|
2020-05-07 16:58:27 +02:00
|
|
|
};
|
2020-04-28 20:36:57 +02:00
|
|
|
};
|
|
|
|
|
2021-04-16 16:50:28 +02:00
|
|
|
home.file.".gdbinit".text = ''
|
|
|
|
set history filename ~/.gdb_history
|
|
|
|
set history save on
|
|
|
|
set history size unlimited
|
|
|
|
set history remove-duplicates unlimited
|
|
|
|
set history expansion on
|
|
|
|
'';
|
|
|
|
|
2020-04-28 20:36:57 +02:00
|
|
|
home.file.".psqlrc".text = ''
|
|
|
|
\set QUIET 1
|
2023-08-17 18:06:47 +02:00
|
|
|
|
2020-04-28 20:36:57 +02:00
|
|
|
\timing
|
|
|
|
\set ON_ERROR_ROLLBACK interactive
|
|
|
|
\set VERBOSITY verbose
|
|
|
|
\x auto
|
|
|
|
\set PROMPT1 '%[%033[1m%]%M/%/%R%[%033[0m%]%# '
|
|
|
|
\set PROMPT2 '...%# '
|
|
|
|
\set HISTFILE ~/.psql_history- :DBNAME
|
|
|
|
\set HISTCONTROL ignoredups
|
|
|
|
\pset null [null]
|
2023-08-17 18:06:47 +02:00
|
|
|
|
|
|
|
\pset linestyle 'unicode'
|
|
|
|
\pset unicode_border_linestyle single
|
|
|
|
\pset unicode_column_linestyle single
|
|
|
|
\pset unicode_header_linestyle double
|
|
|
|
|
2020-04-28 20:36:57 +02:00
|
|
|
\unset QUIET
|
|
|
|
'';
|
|
|
|
|
|
|
|
programs.readline = {
|
|
|
|
enable = true;
|
|
|
|
extraConfig = ''
|
|
|
|
set editing-mode vi
|
|
|
|
'';
|
|
|
|
};
|
2020-05-11 00:41:11 +02:00
|
|
|
|
2020-06-08 16:20:35 +02:00
|
|
|
programs.zsh = {
|
|
|
|
shellAliases = {
|
|
|
|
# Git
|
|
|
|
"gwip" = "git add . && git commit -am wip";
|
|
|
|
"gpr" = "g pull-request";
|
|
|
|
"gcl" = "git clone";
|
|
|
|
"grs" = "gr --soft";
|
|
|
|
"grhh" = "grh HEAD";
|
|
|
|
"grh" = "gr --hard";
|
|
|
|
"gr" = "git reset";
|
|
|
|
"gcb" = "gc -b";
|
|
|
|
"gco" = "gc";
|
|
|
|
"gcd" = "gc development";
|
|
|
|
"gcm" = "gc master";
|
2020-06-29 01:39:45 +02:00
|
|
|
"gcc" = "gc canon";
|
2020-06-08 16:20:35 +02:00
|
|
|
"gc" = "git checkout";
|
|
|
|
"gbg" = "git branch | grep";
|
|
|
|
"gba" = "git branch -a";
|
|
|
|
"gb" = "git branch";
|
|
|
|
"gcv" = "git commit --verbose";
|
|
|
|
"gci" = "git commit";
|
|
|
|
"gm" = "git merge";
|
|
|
|
"gdc" = "gd --cached";
|
|
|
|
"gd" = "git diff";
|
|
|
|
"gsl" = "git stash list";
|
|
|
|
"gss" = "git show stash";
|
|
|
|
"gsad" = "git stash drop";
|
|
|
|
"gsa" = "git stash";
|
|
|
|
"gst" = "gs";
|
|
|
|
"gs" = "git status";
|
|
|
|
"gg" = "gl --decorate --oneline --graph --date-order --all";
|
|
|
|
"gl" = "git log";
|
|
|
|
"gf" = "git fetch";
|
|
|
|
"gur" = "gu --rebase";
|
|
|
|
"gu" = "git pull";
|
|
|
|
"gpf" = "gp -f";
|
|
|
|
"gpa" = "gp --all";
|
|
|
|
"gpu" = "git push -u origin \"$(git symbolic-ref --short HEAD)\"";
|
|
|
|
"gp" = "git push";
|
|
|
|
"ganw" = "git diff -w --no-color | git apply --cached --ignore-whitespace";
|
|
|
|
"ga" = "git add";
|
|
|
|
"gnp" = "git --no-pager";
|
|
|
|
"g" = "git";
|
2020-08-28 17:08:22 +02:00
|
|
|
"grim" = "git fetch && git rebase -i --autostash origin/master";
|
|
|
|
"grom" = "git fetch && git rebase --autostash origin/master";
|
2020-07-03 18:42:01 +02:00
|
|
|
"groc" = "git fetch && git rebase --autostash origin/canon";
|
2020-06-08 16:20:35 +02:00
|
|
|
"grc" = "git rebase --continue";
|
|
|
|
"gcan" = "git commit --amend --no-edit";
|
|
|
|
"grl" = "git reflog";
|
|
|
|
|
|
|
|
# Haskell
|
2020-07-03 18:40:09 +02:00
|
|
|
"crl" = "cabal repl";
|
|
|
|
"cr" = "cabal run";
|
2020-06-08 16:20:35 +02:00
|
|
|
"cnb" = "cabal new-build";
|
|
|
|
"cob" = "cabal old-build";
|
|
|
|
"cnr" = "cabal new-run";
|
|
|
|
"cor" = "cabal old-run";
|
|
|
|
"ho" = "hoogle";
|
|
|
|
};
|
|
|
|
|
|
|
|
functions = {
|
|
|
|
gdelmerged = ''
|
|
|
|
git branch --merged | egrep -v 'master' | tr -d '+ ' | xargs git branch -d
|
|
|
|
'';
|
2022-02-08 17:57:17 +01:00
|
|
|
|
|
|
|
gref = ''
|
|
|
|
git show -s --pretty=reference "$1" | xclip -selection clipboard
|
|
|
|
'';
|
2020-06-08 16:20:35 +02:00
|
|
|
};
|
2020-05-11 00:41:11 +02:00
|
|
|
};
|
2020-04-28 20:36:57 +02:00
|
|
|
}
|