File: default.nix

package info (click to toggle)
ruby-iso8601 0.13.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid, trixie
  • size: 316 kB
  • sloc: ruby: 2,156; makefile: 3
file content (36 lines) | stat: -rw-r--r-- 702 bytes parent folder | download
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
let
  pkgs = import <nixpkgs> {};
  tooling = [
    pkgs.exa
    pkgs.xsv
    pkgs.git
    pkgs.ruby_2_7
    pkgs.rubyPackages_2_7.rake
  ];

in
  pkgs.mkShell {
    LANG = "en_GB.UTF-8";
    EDITOR="vim";
    buildInputs = tooling ++ [
    ];

    shellHook = ''
      set -o vi
      local pink='\e[1;35m'
      local yellow='\e[1;33m'
      local blue='\e[1;36m'
      local white='\e[0;37m'
      local reset='\e[0m'

      function git_branch {
        git rev-parse --abbrev-ref HEAD 2>/dev/null
      }

      export PS1="\[$pink\]nix \[$blue\]\W \[$yellow\]\$(git_branch)\[$white\] ∙ \[$reset\]"

      alias ls=exa

      source ${pkgs.git}/share/bash-completion/completions/git
    '';
  }