mirror of
https://github.com/nix-community/home-manager.git
synced 2024-12-15 17:50:53 +00:00
31 lines
730 B
Nix
31 lines
730 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
{
|
|
meta.maintainers = [ maintainers.rycee ];
|
|
|
|
options = {
|
|
services.keepassx = {
|
|
enable = mkEnableOption "the KeePassX password manager";
|
|
};
|
|
};
|
|
|
|
config = mkIf config.services.keepassx.enable {
|
|
assertions = [
|
|
(hm.assertions.assertPlatform "services.keepassx" pkgs platforms.linux)
|
|
];
|
|
|
|
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"; };
|
|
};
|
|
};
|
|
}
|