summaryrefslogtreecommitdiff
path: root/nixpkgs/common.nix
blob: 305132a7a974583ef27531894e40599966ced827 (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
{ pkgs, ... }: {
  home.username = "lx";
  home.packages = with pkgs; [
    nodejs-slim
  ];

  programs.direnv = {
    enable = true;
    nix-direnv.enable = true;
    enableBashIntegration = true;
  };

  programs.bash = {
    enable = true;
    shellAliases = {
      ll = "ls -lah";
      irc = "ssh -t adnab.me /usr/local/bin/irc";
    };
    bashrcExtra = ''
      export PATH=$HOME/.cargo/bin:$PATH
    '';
  };
  programs.vim = {
    enable = true;
    extraConfig = (builtins.readFile ../vim/vimrc);
    plugins = with pkgs.vimPlugins; [
      fzf-vim
      nerdtree
      coc-nvim
      coc-json
      coc-rust-analyzer
      vim-nix
      vim-hcl
      vim-go
    ];
  };

  programs.git.enable = true;
  programs.git.userName = "Alex Auvolat";
  programs.git.userEmail = "alex@adnab.me";
  programs.git.lfs.enable = true;

  home.file = {
    ".vim/coc-settings.json".source = ../vim/coc-settings.json;
    ".config/tmux/tmux.conf".source = ../tmux/tmux.conf;
    ".config/qutebrowser/config.py".source = ../qutebrowser/config.py;
    ".config/sx/sxrc".executable = true;
    ".config/sx/sxrc".text = ''
      ${pkgs.xorg.xsetroot}/bin/xsetroot -solid "#008080"
      ${pkgs.xorg.xkbcomp}/bin/xkbcomp ${../xkb/symbols/custom-fr} $DISPLAY
      nm-applet &
      icewm-session
    '';
    ".config/icewm/preferences".source = ../icewm/preferences;
    ".config/icewm/keys".source = ../icewm/keys;
    ".config/icewm/menu".source = ../icewm/menu;
    ".config/icewm/theme".source = ../icewm/theme;
    ".config/icewm/toolbar".text = ''
      prog "Terminal" xterm st
      prog "Qutebrowser" ${pkgs.qutebrowser}/share/icons/hicolor/32x32/apps/qutebrowser.png qutebrowser
      prog "Firefox" ${pkgs.firefox}/share/icons/hicolor/32x32/apps/firefox.png ${pkgs.firefox}/bin/firefox
      prog "Midori" ${pkgs.midori}/share/icons/hicolor/22x22/apps/org.midori_browser.Midori.png midori
      prog "Thunderbird" ${pkgs.thunderbird}/share/icons/hicolor/32x32/apps/thunderbird.png thunderbird
      prog "Spotify" ${pkgs.spotify}/share/icons/hicolor/32x32/apps/spotify-client.png spotify
    '';
  };

  services.syncthing.enable = true;

  xsession.enable = true;
  home.keyboard = null;

  xdg.enable = true;
  xdg.userDirs = {
    desktop = null;
    documents = null;
    pictures = null;
    music = null;
    publicShare = null;
    templates = null;
    videos = null;
  };

  nixpkgs.config.allowUnfree = true;

  home.stateVersion = "22.11";
}