home-manager/modules/services/keepassx.nix

32 lines
730 B
Nix
Raw Normal View History

2017-01-07 18:16:26 +00:00
{ config, lib, pkgs, ... }:
with lib;
{
meta.maintainers = [ maintainers.rycee ];
2017-01-07 18:16:26 +00:00
options = {
services.keepassx = {
enable = mkEnableOption "the KeePassX password manager";
};
};
config = mkIf config.services.keepassx.enable {
2022-04-24 14:25:54 +00:00
assertions = [
(hm.assertions.assertPlatform "services.keepassx" pkgs platforms.linux)
];
2017-01-07 18:16:26 +00:00
systemd.user.services.keepassx = {
2020-02-01 23:39:17 +00:00
Unit = {
Description = "KeePassX password manager";
After = [ "graphical-session-pre.target" ];
PartOf = [ "graphical-session.target" ];
};
2017-01-07 18:16:26 +00:00
2020-02-01 23:39:17 +00:00
Install = { WantedBy = [ "graphical-session.target" ]; };
2017-01-07 18:16:26 +00:00
2020-02-01 23:39:17 +00:00
Service = { ExecStart = "${pkgs.keepassx}/bin/keepassx -min -lock"; };
2017-01-07 18:16:26 +00:00
};
};
}