feat(1p): add 1password
This commit is contained in:
parent
3bb074df65
commit
db42bf10d8
2 changed files with 40 additions and 8 deletions
36
modules/nixos/services/1p/default.nix
Normal file
36
modules/nixos/services/1p/default.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue