mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-17 11:13:30 +00:00
ef176dcf7e
conversions were done using https://github.com/pennae/nix-doc-munge using (probably) rev f34e145 running nix-doc-munge nixos/**/*.nix nix-doc-munge --import nixos/**/*.nix the tool ensures that only changes that could affect the generated manual *but don't* are committed, other changes require manual review and are discarded.
66 lines
1.5 KiB
Nix
66 lines
1.5 KiB
Nix
{ config, pkgs, lib, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
cfg = config.programs._1password-gui;
|
|
|
|
in
|
|
{
|
|
imports = [
|
|
(mkRemovedOptionModule [ "programs" "_1password-gui" "gid" ] ''
|
|
A preallocated GID will be used instead.
|
|
'')
|
|
];
|
|
|
|
options = {
|
|
programs._1password-gui = {
|
|
enable = mkEnableOption (lib.mdDoc "the 1Password GUI application");
|
|
|
|
polkitPolicyOwners = mkOption {
|
|
type = types.listOf types.str;
|
|
default = [ ];
|
|
example = literalExpression ''["user1" "user2" "user3"]'';
|
|
description = lib.mdDoc ''
|
|
A list of users who should be able to integrate 1Password with polkit-based authentication mechanisms.
|
|
'';
|
|
};
|
|
|
|
package = mkPackageOption pkgs "1Password GUI" {
|
|
default = [ "_1password-gui" ];
|
|
};
|
|
};
|
|
};
|
|
|
|
config =
|
|
let
|
|
package = cfg.package.override {
|
|
polkitPolicyOwners = cfg.polkitPolicyOwners;
|
|
};
|
|
in
|
|
mkIf cfg.enable {
|
|
environment.systemPackages = [ package ];
|
|
users.groups.onepassword.gid = config.ids.gids.onepassword;
|
|
|
|
security.wrappers = {
|
|
"1Password-BrowserSupport" = {
|
|
source = "${package}/share/1password/1Password-BrowserSupport";
|
|
owner = "root";
|
|
group = "onepassword";
|
|
setuid = false;
|
|
setgid = true;
|
|
};
|
|
|
|
"1Password-KeyringHelper" = {
|
|
source = "${package}/share/1password/1Password-KeyringHelper";
|
|
owner = "root";
|
|
group = "onepassword";
|
|
setuid = true;
|
|
setgid = true;
|
|
};
|
|
};
|
|
|
|
};
|
|
}
|