feat(1p): add 1password

This commit is contained in:
zack 2024-07-30 12:08:53 -04:00
parent 3bb074df65
commit db42bf10d8
No known key found for this signature in database
GPG key ID: 5F873416BCF59F35
2 changed files with 40 additions and 8 deletions

View file

@ -0,0 +1,36 @@
{
lib,
config,
pkgs,
...
}:
with lib;
with lib.custom; let
cfg = config.services._1password;
in {
options.services._1password = with types; {
enable = mkBoolOpt false "Enable 1Password";
polkitPolicyOwnerUsername = mkStringOpt "zoey" "The username to own the polkit policy";
};
config = mkIf cfg.enable {
programs._1password.enable = true;
programs._1password-gui = {
enable = true;
# Certain features, including CLI integration and system authentication support,
# require enabling PolKit integration on some desktop environments (e.g. Plasma).
polkitPolicyOwners = [cfg.polkitPolicyOwnerUsername];
};
environment.etc = {
"1password/custom_allowed_browsers" = {
text = ''
librewolf
firefox
'';
mode = "0755";
};
};
};
}