diff options
author | Aspen Smith <grfn@gws.fyi> | 2024-02-12T03·00-0500 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2024-02-14T19·37+0000 |
commit | 82ecd61f5c699cf3af6c4eadf47a1c52b1d696c6 (patch) | |
tree | 429c5e078528000591742ec3211bc768ae913a78 /users/aspen/system/home/modules/development | |
parent | 0ba476a4266015f278f18d74094299de74a5a111 (diff) |
chore(users): grfn -> aspen r/7511
Change-Id: I6c6847fac56f0a9a1a2209792e00a3aec5e672b9 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10809 Autosubmit: aspen <root@gws.fyi> Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI Reviewed-by: lukegb <lukegb@tvl.fyi>
Diffstat (limited to 'users/aspen/system/home/modules/development')
5 files changed, 197 insertions, 0 deletions
diff --git a/users/aspen/system/home/modules/development/agda.nix b/users/aspen/system/home/modules/development/agda.nix new file mode 100644 index 000000000000..afd22a306dc9 --- /dev/null +++ b/users/aspen/system/home/modules/development/agda.nix @@ -0,0 +1,58 @@ +{ config, lib, pkgs, ... }: + +let + agda-categories = with pkgs.agdaPackages; mkDerivation rec { + pname = "agda-categories"; + version = "2128fab"; + src = pkgs.fetchFromGitHub { + owner = "agda"; + repo = "agda-categories"; + rev = version; + sha256 = "08mc20qaz9vp5rhi60rh8wvjkg5aby3bgwwdhfnxha1663qf1q24"; + }; + + buildInputs = [ standard-library ]; + }; + +in + +{ + imports = [ + ../lib/cloneRepo.nix + ]; + + home.packages = with pkgs; [ + (pkgs.agda.withPackages + (p: with p; [ + p.standard-library + + ])) + ]; + + grfn.impure.clonedRepos = { + agda-stdlib = { + github = "agda/agda-stdlib"; + path = "code/agda-stdlib"; + }; + + agda-categories = { + github = "agda/agda-categories"; + path = "code/agda-categories"; + }; + + categories-examples = { + github = "agda/categories-examples"; + path = "code/categories-examples"; + }; + }; + + home.file.".agda/defaults".text = '' + standard-library + ''; + + home.file.".agda/libraries".text = '' + /home/grfn/code/agda-stdlib/standard-library.agda-lib + /home/grfn/code/agda-categories/agda-categories.agda-lib + ''; + +} diff --git a/users/aspen/system/home/modules/development/kube.nix b/users/aspen/system/home/modules/development/kube.nix new file mode 100644 index 000000000000..876b0c08df1d --- /dev/null +++ b/users/aspen/system/home/modules/development/kube.nix @@ -0,0 +1,34 @@ +{ config, lib, pkgs, ... }: +{ + home.packages = with pkgs; [ + kubectl + kubetail + sops + kubie + # pkgs-unstable.argocd # provided by urbos + ]; + + programs.zsh.shellAliases = { + "kc" = "kubectl"; + "kg" = "kc get"; + "kga" = "kc get --all-namespaces"; + "kpd" = "kubectl get pods"; + "kpa" = "kubectl get pods --all-namespaces"; + "klf" = "kubectl logs -f"; + "kdep" = "kubectl get deployments"; + "ked" = "kubectl edit deployment"; + "kpw" = "kubectl get pods -w"; + "kew" = "kubectl get events -w"; + "kdel" = "kubectl delete"; + "knw" = "kubectl get nodes -w"; + "kev" = "kubectl get events --sort-by='.metadata.creationTimestamp'"; + + "arsy" = "argocd app sync --prune"; + }; + + home.file.".kube/kubie.yaml".text = '' + shell: zsh + prompt: + zsh_use_rps1: true + ''; +} diff --git a/users/aspen/system/home/modules/development/ocaml.nix b/users/aspen/system/home/modules/development/ocaml.nix new file mode 100644 index 000000000000..5dcdd8980e47 --- /dev/null +++ b/users/aspen/system/home/modules/development/ocaml.nix @@ -0,0 +1,17 @@ +{ config, lib, pkgs, ... }: + +{ + home.packages = with pkgs; [ + ocaml + + # ocamlPackages.merlin + # ocamlPackages.utop + # ocamlPackages.ocp-indent + # ocamlPackages.ocamlformat + ]; + + programs.opam = { + enable = true; + enableZshIntegration = true; + }; +} diff --git a/users/aspen/system/home/modules/development/readyset.nix b/users/aspen/system/home/modules/development/readyset.nix new file mode 100644 index 000000000000..afe762468aeb --- /dev/null +++ b/users/aspen/system/home/modules/development/readyset.nix @@ -0,0 +1,39 @@ +{ config, lib, pkgs, ... }: + +{ + imports = [ + ./rust.nix + ]; + + home.packages = with pkgs; [ + # These go in $PATH so I can run it from rofi and parent to my WM + (writeShellScriptBin "dotclip" "xclip -out -selection clipboard | dot -Tpng | feh -") + (writeShellScriptBin "dotcontroller" "curl -s localhost:6033/graph | dot -Tpng | feh -") + + rain + awscli2 + ssm-session-manager-plugin + amazon-ecr-credential-helper + postgresql_15 + + # TODO remove override when https://github.com/NixOS/nixpkgs/pull/233826 is merged + (sysbench.overrideDerivation (oldAttrs: { + configureFlags = oldAttrs.configureFlags ++ [ "--with-pgsql" ]; + buildInputs = oldAttrs.buildInputs ++ [ postgresql ]; + })) + ]; + + programs.zsh.shellAliases = { + "tf" = "terraform"; + }; + + home.file.".docker/config.json".text = builtins.toJSON { + credHelpers = { + "305232526136.dkr.ecr.us-east-2.amazonaws.com" = "ecr-login"; + }; + }; + + programs.zsh.functions."purge_deployment" = '' + for key in $(http :8500/v1/kv/$1 keys==true | jq -r .'[]'); do http DELETE ":8500/v1/kv/$key"; done + ''; +} diff --git a/users/aspen/system/home/modules/development/rust.nix b/users/aspen/system/home/modules/development/rust.nix new file mode 100644 index 000000000000..c4b20f231546 --- /dev/null +++ b/users/aspen/system/home/modules/development/rust.nix @@ -0,0 +1,49 @@ +{ config, lib, pkgs, ... }: + +let + inherit (config.lib) depot; +in + +with lib; + +{ + + home.packages = with pkgs; [ + rustup + cargo-edit + cargo-expand + cargo-udeps + cargo-bloat + sccache + evcxr + + depot.users.aspen.pkgs.cargo-hakari + depot.users.aspen.pkgs.cargo-nextest + + # benchmarking+profiling + cargo-criterion + cargo-flamegraph + coz + inferno + hotspot + ] ++ optionals (stdenv.isLinux) [ + cargo-rr + ]; + + programs.zsh.shellAliases = { + "cg" = "cargo"; + "cb" = "cargo build"; + "ct" = "cargo test"; + "ctw" = "fd -e rs | entr cargo test"; + "cch" = "cargo check"; + }; + + home.file.".cargo/config".text = '' + [build] + rustc-wrapper = "${pkgs.sccache}/bin/sccache" + + [target.x86_64-unknown-linux-gnu] + linker = "clang" + rustflags = ["-C", "link-arg=-fuse-ld=${pkgs.mold}/bin/mold"] + ''; +} |