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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -38,6 +38,10 @@
|
|||
};
|
||||
};
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
services._1password = {
|
||||
enable = true;
|
||||
polkitPolicyOwnerUsername = "zoey";
|
||||
};
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = lib.mkForce false;
|
||||
|
|
@ -87,14 +91,6 @@
|
|||
initialHashedPassword = "$6$rounds=2000000$rFBJH7LwdEHvv.0i$HdHorWqp8REPdWPk5fEgZXX1TujRJkMxumGK0f0elFN0KRPlBjJMW2.35A.ID/o3eC/hGTwbSJAcJcwVN2zyV/";
|
||||
};
|
||||
|
||||
users.users.zack = {
|
||||
isNormalUser = true;
|
||||
description = "zack";
|
||||
extraGroups = ["networkmanager" "wheel" "docker" "libvirtd" "plugdev"];
|
||||
shell = pkgs.zsh;
|
||||
initialHashedPassword = "$6$rounds=2000000$rFBJH7LwdEHvv.0i$HdHorWqp8REPdWPk5fEgZXX1TujRJkMxumGK0f0elFN0KRPlBjJMW2.35A.ID/o3eC/hGTwbSJAcJcwVN2zyV/";
|
||||
};
|
||||
|
||||
users.groups.plugdev = {};
|
||||
|
||||
snowfallorg.users.zoey = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue