about summary refs log tree commit diff
path: root/users/tazjin/home/tverskoy.nix
blob: 8928dc76888fc592d678ea6398071576fa959e55 (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
# Home manage configuration for tverskoy.

{ depot, pkgs, ... }: # readTree
{ config, lib, ... }: # home-manager

{
  imports = [ "${depot.third_party.impermanence}/home-manager.nix" ];

  home.persistence."/persist/tazjin/home" = {
    allowOther = true;

    directories = [
      ".cargo"
      ".config/audacity"
      ".config/google-chrome"
      ".config/quassel-irc.org"
      ".config/spotify"
      ".config/syncthing"
      ".config/unity3d"
      ".electrum"
      ".elfeed"
      ".gnupg"
      ".local/share/Steam"
      ".local/share/audacity"
      ".local/share/direnv"
      ".local/share/fish"
      ".local/share/keyrings"
      ".local/share/zoxide"
      ".mozilla/firefox"
      ".password-store"
      ".rustup"
      ".ssh"
      ".steam"
      ".telega"
      "go"
      "mail"
    ];

    files = [
      ".notmuch-config"
    ];
  };

  home.activation.screenshots = lib.hm.dag.entryAnywhere ''
    $DRY_RUN_CMD mkdir -p $HOME/screenshots
  '';

  programs.git = {
    enable = true;
    userName = "Vincent Ambo";
    userEmail = "mail@tazj.in";
    extraConfig = {
      pull.rebase = true;
      init.defaultBranch = "canon";
    };
  };

  programs.fish = {
    enable = true;
    interactiveShellInit = ''
      ${pkgs.zoxide}/bin/zoxide init fish | source
    '';
  };

  services.screen-locker = {
    enable = true;
    enableDetectSleep = true;
    inactiveInterval = 10; # minutes
    lockCmd = "${depot.users.tazjin.screenLock}/bin/tazjin-screen-lock";
  };

  services.picom = {
    enable = true;
    vSync = true;
    backend = "glx";
  };

  # Enable the dunst notification daemon, but force the
  # configuration file separately instead of going via the strange
  # Nix->dunstrc encoding route.
  services.dunst.enable = true;
  xdg.configFile."dunst/dunstrc" = {
    source = depot.users.tazjin.dotfiles.dunstrc;
    onChange = ''
      ${pkgs.procps}/bin/pkill -u "$USER" ''${VERBOSE+-e} dunst || true
    '';
  };

  systemd.user.startServices = true;
}