about summary refs log tree commit diff
path: root/modules/user/devhell/profiles/base.nix
blob: 263206ffbe8226144b4e51718fc1f208a179fe67 (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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
{ config, pkgs, lib, ... }:

let
  cfg = config.vuizvui.user.devhell.profiles.base;

in {
  options.vuizvui.user.devhell.profiles.base = {
    enable = lib.mkEnableOption "Base profile for devhell";
  };

  config = lib.mkIf cfg.enable {
    boot = {
      kernelPackages = pkgs.linuxPackages_latest;
      cleanTmpDir = true;
    };

    nix = {
      buildCores = 0;
      useSandbox = true;
    };

    time = {
      timeZone = "Europe/London";
    };

    system = {
      fsPackages = with pkgs; [
        sshfsFuse
        fuse
        cryptsetup
      ];
    };

    hardware = {
      enableAllFirmware = true;
      cpu.intel.updateMicrocode = true;
      opengl = {
        s3tcSupport = true;
        driSupport32Bit = true;
      };
      pulseaudio = {
        enable = true;
        systemWide = false;
      };
    };

    programs = {
      ssh = {
        startAgent = false;
      };
      zsh = {
        enable = true;
        enableCompletion = true;
      };
      bash = {
        enableCompletion = true;
        promptInit = ''
          # Provide a nice prompt.
          PROMPT_COLOR="1;31m"
          let $UID && PROMPT_COLOR="1;32m"
          PS1="\n\[\033[$PROMPT_COLOR\][\u@\h:\w]\\$\[\033[0m\] "
          if test "$TERM" = "xterm"; then
            PS1="\[\033]2;\h:\u:\w\007\]$PS1"
          fi
          eval `dircolors ~/.dir_colors`
        '';
      };
    };

    environment = {
      shells = [ "/run/current-system/sw/bin/zsh" ];
      sessionVariables.TERM = "xterm-256color";
    };

    fonts = {
      fontconfig = {
        enable = true;
        ultimate = {
          enable = true;
        };
      };
      enableGhostscriptFonts = true;
      enableCoreFonts = true;
      fonts = with pkgs; [
        clearlyU
        cm_unicode
        dejavu_fonts
        dosemu_fonts
        font-awesome-ttf
        freefont_ttf
        hack-font
        inconsolata
        powerline-fonts
        proggyfonts
        source-code-pro
        source-sans-pro
        source-serif-pro
        terminus_font
        tewi-font
        ttf_bitstream_vera
        ubuntu_font_family
        unifont
        vistafonts
        wqy_microhei
      ] ++ lib.filter lib.isDerivation (lib.attrValues lohit-fonts);
    };
  };
}