Reconfigured 1password as module to integrate with vivaldi browser and moved it to system packages.

This commit is contained in:
Joseph Hanson 2024-07-29 02:32:10 -05:00
parent 3b386222aa
commit 60776e90c0
Signed by: jahanson
SSH key fingerprint: SHA256:vy6dKBECV522aPAwklFM3ReKAVB086rT3oWwiuiFG7o
6 changed files with 60 additions and 14 deletions

View file

@ -33,7 +33,6 @@ with config;
p7zip
# cli
_1password
bat
dbus
direnv

View file

@ -5,9 +5,9 @@ with config;
./global.nix
];
myHome.programs.firefox.enable = true;
myHome.shell = {
myHome = {
programs.firefox.enable = true;
shell = {
starship.enable = true;
fish.enable = true;
wezterm.enable = true;
@ -20,13 +20,13 @@ with config;
signingKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIDSAmssproxG+KsVn2DfuteBAemHrmmAFzCtldpKl4J";
};
};
};
home = {
# Install these packages for my user
packages = with pkgs;
[
#apps
_1password-gui
discord
flameshot
jetbrains.datagrip

View file

@ -46,5 +46,6 @@
mySystem = {
purpose = "Development";
system.motd.networkInterfaces = [ "wlp1s0" ];
security._1password.enable = true;
};
}

View file

@ -0,0 +1,10 @@
[Desktop Entry]
Name=1Password
Exec=1password %U --silent
Terminal=false
Type=Application
Icon=1password
StartupWMClass=1Password
Comment=Password manager and secure wallet
MimeType=x-scheme-handler/onepassword;
Categories=Office;

View file

@ -0,0 +1,35 @@
{ config, lib, ... }:
with lib; let
cfg = config.mySystem.security._1password;
user = "jahanson";
in
{
options.mySystem.security._1password = {
enable = mkEnableOption "_1password";
};
config = mkIf cfg.enable {
programs = {
_1password.enable = true;
_1password-gui = {
enable = true;
polkitPolicyOwners = [ "${user}" ];
};
};
home-manager.users.${user} = {
home.file = {
".config/autostart/1password-startup.desktop".source = ./config/1password-startup.desktop;
};
};
environment.etc = {
"1password/custom_allowed_browsers" = {
text = ''
vivaldi-bin
'';
mode = "0755";
};
};
};
}

View file

@ -1,6 +1,7 @@
{ ... }:
{
imports = [
./1password
./acme
];
}