Nix configurations for my personal machines (Linux & macOS)
at main 902 B view raw
1{ 2 delib, 3 homeConfig, 4 ... 5}: 6delib.module { 7 name = "_1password"; 8 9 options = delib.singleEnableOption true; 10 11 nixos.ifEnabled = { 12 services.systembus-notify.enable = true; 13 programs._1password.enable = true; 14 programs._1password-gui = { 15 enable = true; 16 polkitPolicyOwners = ["ovy"]; # TODO: replace 17 }; 18 19 environment.etc."1password/custom_allowed_browsers" = { 20 text = '' 21 vivaldi-bin 22 zen 23 zen-bin 24 ''; 25 mode = "0755"; 26 }; 27 }; 28 29 home.ifEnabled.programs.ssh.matchBlocks = let 30 _1passwordAgent = options: 31 homeConfig.lib.dag.entryBefore ["*"] ({ 32 extraOptions.IdentityAgent = "~/.1password/agent.sock"; 33 extraOptions.IdentitiesOnly = "no"; 34 } 35 // options); 36 in { 37 # OpenWrt 38 "192.168.1.1" = _1passwordAgent {user = "root";}; 39 "*.repo.borgbase.com" = _1passwordAgent {}; 40 }; 41}