switch 1password on darwin to nix module

This commit is contained in:
Noah Masur
2026-07-08 11:10:43 -06:00
parent d238b7a81a
commit e04cdab409
4 changed files with 37 additions and 7 deletions
@@ -48,7 +48,7 @@ in
tilesize = 44; tilesize = 44;
persistent-apps = map mkDockApp [ persistent-apps = map mkDockApp [
"/Applications/1Password.app" "${pkgs._1password-gui}/Applications/1Password.app"
"${pkgs.slack}/Applications/Slack.app" "${pkgs.slack}/Applications/Slack.app"
"/System/Applications/Calendar.app" "/System/Applications/Calendar.app"
"${pkgs.firefox-unwrapped}/Applications/Firefox.app" "${pkgs.firefox-unwrapped}/Applications/Firefox.app"
@@ -44,7 +44,7 @@ in
]; ];
home.file.".Brewfile".text = /* homebrew */ '' home.file.".Brewfile".text = /* homebrew */ ''
cask "1password" # 1Password will not launch from Nix on macOS # cask "1password" # 1Password will not launch from Nix on macOS
# cask "gitify" # Git notifications in menu bar (downgrade manually from 4.6.1) # cask "gitify" # Git notifications in menu bar (downgrade manually from 4.6.1)
# cask "logitech-g-hub" # Mouse and keyboard management # cask "logitech-g-hub" # Mouse and keyboard management
cask "logitune" # Logitech webcam firmware cask "logitune" # Logitech webcam firmware
@@ -56,7 +56,7 @@ in
nmasur.presets = { nmasur.presets = {
fonts.enable = lib.mkDefault true; fonts.enable = lib.mkDefault true;
programs = { programs = {
_1password.enable = lib.mkDefault true; # _1password.enable = lib.mkDefault true;
atuin.enable = lib.mkDefault true; atuin.enable = lib.mkDefault true;
aws-ssh.enable = lib.mkDefault true; aws-ssh.enable = lib.mkDefault true;
bash.enable = lib.mkDefault true; bash.enable = lib.mkDefault true;
@@ -0,0 +1,29 @@
{
config,
lib,
...
}:
let
cfg = config.nmasur.presets.programs._1password;
in
{
options.nmasur.presets.programs._1password.enable = lib.mkEnableOption "1Password password manager";
config = lib.mkIf cfg.enable {
allowUnfreePackages = [
"1password"
"_1password-gui"
"1password-cli"
];
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 = [ "yourUsernameHere" ];
};
};
}
@@ -17,10 +17,11 @@ in
system.primaryUser = config.nmasur.settings.username; system.primaryUser = config.nmasur.settings.username;
nmasur.presets = { nmasur.presets = {
# programs = { programs = {
_1password.enable = lib.mkDefault true;
# fish.enable = lib.mkDefault true; # fish.enable = lib.mkDefault true;
# homebrew.enable = lib.mkDefault true; # homebrew.enable = lib.mkDefault true;
# }; };
services = { services = {
# daily-summary.enable = lib.mkDefault false; # daily-summary.enable = lib.mkDefault false;
# dock.enable = lib.mkDefault true; # dock.enable = lib.mkDefault true;