dotfiles/modules/home/graphical/keepassxc.nix

30 lines
722 B
Nix
Raw Normal View History

{ pkgs, config, lib, ... }:
let
cfg = config.my.keepassxc;
in {
options.my.keepassxc = {
enable = lib.mkEnableOption null;
};
config = lib.mkIf cfg.enable {
home.packages = [ pkgs.keepassxc ];
systemd.user.services.keepassxc = {
Unit = {
Description = "KeePassXC password manager";
After = [ "graphical-session-pre.target" "tray.target" "eww-bar.service" ];
PartOf = [ "graphical-session.target" ];
Requires = [ "tray.target" ];
};
Service = {
ExecStart = "${pkgs.keepassxc}/bin/keepassxc";
Environment = "QT_QPA_PLATFORM=wayland";
};
Install = {
WantedBy = [ "graphical-session.target" ];
};
};
};
}