2017-01-07 19:16:26 +01:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
{
|
2017-09-26 23:40:31 +02:00
|
|
|
meta.maintainers = [ maintainers.rycee ];
|
|
|
|
|
2017-01-07 19:16:26 +01:00
|
|
|
options = {
|
|
|
|
services.keepassx = {
|
|
|
|
enable = mkEnableOption "the KeePassX password manager";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf config.services.keepassx.enable {
|
|
|
|
systemd.user.services.keepassx = {
|
2020-02-02 00:39:17 +01:00
|
|
|
Unit = {
|
|
|
|
Description = "KeePassX password manager";
|
|
|
|
After = [ "graphical-session-pre.target" ];
|
|
|
|
PartOf = [ "graphical-session.target" ];
|
|
|
|
};
|
2017-01-07 19:16:26 +01:00
|
|
|
|
2020-02-02 00:39:17 +01:00
|
|
|
Install = { WantedBy = [ "graphical-session.target" ]; };
|
2017-01-07 19:16:26 +01:00
|
|
|
|
2020-02-02 00:39:17 +01:00
|
|
|
Service = { ExecStart = "${pkgs.keepassx}/bin/keepassx -min -lock"; };
|
2017-01-07 19:16:26 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|