mirror of
https://github.com/nix-community/home-manager
synced 2024-11-30 23:19:47 +01:00
29 lines
630 B
Nix
29 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";
|
|
};
|
|
};
|
|
};
|
|
}
|