home-manager/modules/services/keepassx.nix
2017-06-26 18:42:27 +02:00

30 lines
630 B
Nix

{ config, lib, pkgs, ... }:
with lib;
{
options = {
services.keepassx = {
enable = mkEnableOption "the KeePassX password manager";
};
};
config = mkIf config.services.keepassx.enable {
systemd.user.services.keepassx = {
Unit = {
Description = "KeePassX password manager";
After = [ "graphical-session-pre.target" ];
PartOf = [ "graphical-session.target" ];
};
Install = {
WantedBy = [ "graphical-session.target" ];
};
Service = {
ExecStart = "${pkgs.keepassx}/bin/keepassx -min -lock";
};
};
};
}