about summary refs log tree commit diff
path: root/users/glittershark/system/home/modules/development/urbint.nix
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2020-06-16T00·02+0100
committerVincent Ambo <mail@tazj.in>2020-06-16T00·02+0100
commit81564185e951f69d490be8f5ad76e8ea642b5dde (patch)
treec27cd8a5bb922f710ff7da4b2942d2db09a95376 /users/glittershark/system/home/modules/development/urbint.nix
parent85d82a9dc262bffa87423f595f7e957c42713798 (diff)
parent3b174300ae60f63f50427cde3bfd680fd3043c3a (diff)
Add 'users/glittershark/system/' from commit '3b174300ae60f63f50427cde3bfd680fd3043c3a' r/975
git-subtree-dir: users/glittershark/system
git-subtree-mainline: 85d82a9dc262bffa87423f595f7e957c42713798
git-subtree-split: 3b174300ae60f63f50427cde3bfd680fd3043c3a
Diffstat (limited to 'users/glittershark/system/home/modules/development/urbint.nix')
-rw-r--r--users/glittershark/system/home/modules/development/urbint.nix55
1 files changed, 55 insertions, 0 deletions
diff --git a/users/glittershark/system/home/modules/development/urbint.nix b/users/glittershark/system/home/modules/development/urbint.nix
new file mode 100644
index 000000000000..63f92bf50d4e
--- /dev/null
+++ b/users/glittershark/system/home/modules/development/urbint.nix
@@ -0,0 +1,55 @@
+# urbint-only dev stuff
+{ config, lib, pkgs, ... }:
+
+let
+
+  yarn2nix = (import (pkgs.fetchFromGitHub {
+    owner = "moretea";
+    repo = "yarn2nix";
+    rev = "9e7279edde2a4e0f5ec04c53f5cd64440a27a1ae";
+    sha256 = "0zz2lrwn3y3rb8gzaiwxgz02dvy3s552zc70zvfqc0zh5dhydgn7";
+  }) { inherit pkgs; }).yarn2nix;
+
+in
+
+{
+  home.packages = with pkgs; [
+    yarn2nix
+    python36
+    python36Packages.ipython
+  ];
+
+  programs.zsh = {
+    shellAliases = {
+      ipy = "ipython";
+      amerge = "alembic merge heads";
+    };
+
+    functions = {
+      aup = "alembic upgrade \${1:-head}";
+      adown = "alembic downgrade \${1:--1}";
+    };
+  };
+
+  programs.git = {
+    extraConfig.filter.black100to80 =
+      let inherit (pkgs.python36Packages) black; in {
+        clean = "${black}/bin/black --target-version py36 -l 100 -";
+        smudge = "${black}/bin/black --target-version py36 -l 80 -";
+      };
+
+
+    includes = [{
+      condition = "gitdir:~/code/urb/";
+      contents = {
+        user.email = "grfn@urbint.com";
+      };
+    }];
+  };
+
+  home.file.".ipython/profile_default/ipython_config.py".text = ''
+    c.InteractiveShellApp.exec_lines = ['%autoreload 2']
+    c.InteractiveShellApp.extensions = ['autoreload']
+    c.TerminalInteractiveShell.editing_mode = 'vi'
+  '';
+}