{ pkgs, config, userName, ... }: let xmobar = import ./xmobar pkgs.haskellPackages; cfg = config.home-manager.users.${userName}; in { services = { "dynamic-forward@" = { Service = { WorkingDirectory = "~"; ExecStart = "${pkgs.autossh}/bin/autossh -M 20000 -- -vN -o ControlMaster=no \"%I\""; Environment = [ "AUTOSSH_POLL=30" "AUTOSSH_PIDFILE=.ssh/autossh.%i.pid" ]; PIDFile = "~/.ssh/autossh.%i.pid"; Restart = "on-failure"; RestartSec = "30"; }; Install = { WantedBy = ["default.target"]; }; }; sync-keepass = { Service = { Type = "oneshot"; WorkingDirectory = "~"; ExecStart = "${pkgs.lftp}/bin/lftp -f ${./store.kdbx.lftp}"; }; }; urxvtd = { Service = { Type = "simple"; WorkingDirectory = "~"; ExecStart = "${cfg.programs.urxvt.package}/bin/urxvtd"; Restart = "always"; }; Unit = { After = ["graphical-session.target"]; }; Install = { WantedBy = ["graphical-session.target"]; }; }; 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"]; }; }; 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"]; }; }; }; }