summaryrefslogtreecommitdiff
path: root/accounts/gkleen@sif/systemd.nix
blob: 56965b742fcbba4a766df2f253ed84093a946964 (plain)
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
{ pkgs, config, userName, ... }:
let
  xmobar = import ./xmobar pkgs.haskellPackages;
  cfg = config.home-manager.users.${userName};
in {
  services = {
    sync-keepass = {
      Service = {
        Type = "oneshot";
        WorkingDirectory = "~";
        ExecStart = "${pkgs.lftp}/bin/lftp -f ${./store.kdbx.lftp}";
      };
    };
    emacs = {
      Unit = {
        After = ["graphical-session-pre.target"];
      };
    };
    # trayer = {
    #   Service = {
    #     Type = "simple";
    #     WorkingDirectory = "~";
    #     ExecStart = "${pkgs.trayer}/bin/trayer --edge top --align right --SetDockType true --SetPartialStrut true --expand true --width 8 --tint 0x000000 --alpha 0 --transparent true --height 32 --monitor primary";
    #     Restart = "always";
    #   };
    #   Install = {
    #     WantedBy = ["graphical-session.target"];
    #   };
    # };
    # xmobar = {
    #   Service = {
    #     Type = "simple";
    #     WorkingDirectory = "~";
    #     ExecStart = "${xmobar}/bin/xmobar";
    #     Restart = "always";
    #     Environment = "PATH=${pkgs.worktime}/bin:${pkgs.openssh}/bin";

    #   };
    #   Install = {
    #     WantedBy = ["graphical-session.target"];
    #   };
    # };
    taffybar = {
      Service = {
        Environment = with pkgs; "PATH=${worktime}/bin:${systemd}/bin";
      };
    };
    dunst = {
      Service = {
        Restart = "always";
      };
      Install = {
        WantedBy = ["graphical-session.target"];
      };
    };
    xiccd = {
      Service = {
        Type = "simple";
        WorkingDirectory = "~";
        ExecStart = "${pkgs.xiccd}/bin/xiccd";
        Restart = "always";
      };
    };
  };
  timers = {
    sync-keepass = {
      Timer = {
        OnActiveSec = "1m";
        OnUnitActiveSec = "1m";
      };

      Install = {
        WantedBy = ["default.target"];
      };
    };
  };
  targets = {
    graphical-session = {
      Unit = {
        BindsTo = ["default.target"];
        After = ["basic.target"];
      };
    };
  };
}