about summary refs log tree commit diff
path: root/home/modules/development/urbint.nix
blob: 6958e3155b5802a535d09c93904dde6e15db1c3e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# 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";
    };

    initExtra = ''
      # Alembic {{{
      function aup() {
        alembic upgrade ''${1:-head}
      }

      function adown() {
        alembic downgrade ''${1:--1}
      }
    '';
  };

  home.file.".ipython/profile_default/ipython_config.py".text = ''
    c.InteractiveShellApp.exec_lines = ['%autoreload 2']
    c.InteractiveShellApp.extensions = ['autoreload']
    c.TerminalInteractiveShell.editing_mode = 'vi'
  '';
}