From ae9744af4e17c23744a4d3b0fbb9a2e0059d9203 Mon Sep 17 00:00:00 2001 From: moons-14 Date: Sat, 20 Jun 2026 02:38:37 +0900 Subject: [PATCH] 1password --- modules/applications/1password.nix | 21 +++++++++++++++++++++ modules/applications/default.nix | 1 + modules/features/gui/default.nix | 1 + modules/features/gui/password.nix | 17 +++++++++++++++++ profiles/interfaces/gui.nix | 1 + 5 files changed, 41 insertions(+) create mode 100644 modules/applications/1password.nix create mode 100644 modules/features/gui/password.nix diff --git a/modules/applications/1password.nix b/modules/applications/1password.nix new file mode 100644 index 0000000..073558e --- /dev/null +++ b/modules/applications/1password.nix @@ -0,0 +1,21 @@ +{ + lib, + config, + ... +}: +let + cfg = config.my.applications."1password"; +in +{ + options.my.applications."1password" = { + enable = lib.mkEnableOption "1Password password manager"; + }; + + config = lib.mkIf cfg.enable { + programs._1password.enable = true; + programs._1password-gui = { + enable = true; + polkitPolicyOwners = [ "moons" ]; + }; + }; +} diff --git a/modules/applications/default.nix b/modules/applications/default.nix index 1e47b0d..75bce2d 100644 --- a/modules/applications/default.nix +++ b/modules/applications/default.nix @@ -1,5 +1,6 @@ { imports = [ + ./1password.nix ./arduino.nix ./btop ./chrome.nix diff --git a/modules/features/gui/default.nix b/modules/features/gui/default.nix index 63b1199..1f9aba6 100644 --- a/modules/features/gui/default.nix +++ b/modules/features/gui/default.nix @@ -8,6 +8,7 @@ ./file-manager.nix ./graphic.nix ./jp-input.nix + ./password.nix ./terminal.nix ]; } diff --git a/modules/features/gui/password.nix b/modules/features/gui/password.nix new file mode 100644 index 0000000..978a562 --- /dev/null +++ b/modules/features/gui/password.nix @@ -0,0 +1,17 @@ +{ + lib, + config, + ... +}: +let + cfg = config.my.features.gui.password; +in +{ + options.my.features.gui.password = { + enable = lib.mkEnableOption "GUI password manager"; + }; + + config = lib.mkIf cfg.enable { + my.applications."1password".enable = true; + }; +} diff --git a/profiles/interfaces/gui.nix b/profiles/interfaces/gui.nix index 25f3e5f..10be870 100644 --- a/profiles/interfaces/gui.nix +++ b/profiles/interfaces/gui.nix @@ -12,6 +12,7 @@ graphic.enable = true; capture.enable = true; fileManager.enable = true; + password.enable = true; }; services.kde.enable = true; };