6afb255d97
these changes were generated with nixq 0.0.2, by running nixq ">> lib.mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix nixq ">> mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix nixq ">> Inherit >> mdDoc[remove]" --batchmode nixos/**.nix two mentions of the mdDoc function remain in nixos/, both of which are inside of comments. Since lib.mdDoc is already defined as just id, this commit is a no-op as far as Nix (and the built manual) is concerned.
57 lines
1.3 KiB
Nix
57 lines
1.3 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 "the 1Password GUI application";
|
|
|
|
polkitPolicyOwners = mkOption {
|
|
type = types.listOf types.str;
|
|
default = [ ];
|
|
example = literalExpression ''["user1" "user2" "user3"]'';
|
|
description = ''
|
|
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;
|
|
};
|
|
};
|
|
|
|
};
|
|
}
|