From 34741268a3c9979076bebd4b3bc19692fab8f425 Mon Sep 17 00:00:00 2001 From: James Patrick Date: Wed, 23 Mar 2022 22:37:20 -0400 Subject: [PATCH] 1Password. Still need to setup PAM stuff --- modules/applications/1password.nix | 23 +++++++++++++++++++++++ modules/applications/default.nix | 1 + 2 files changed, 24 insertions(+) create mode 100644 modules/applications/1password.nix diff --git a/modules/applications/1password.nix b/modules/applications/1password.nix new file mode 100644 index 0000000..935b8fa --- /dev/null +++ b/modules/applications/1password.nix @@ -0,0 +1,23 @@ +{ config, lib, pkgs, ... }: +let + cfg = config.this.application.onepassword; + graphical = config.this.graphical; + enable = (cfg.gui.enable || cfg.cli.enable); +in with lib; { + options = { + this.application.onepassword.gui.enable = mkOption { + default = graphical.enable; + type = with types; bool; + }; + this.application.onepassword.cli.enable = mkOption { + default = (graphical.enable || cfg.gui.enable); + type = with types; bool; + }; + }; + + config = mkIf (cfg.gui.enable || cfg.cli.enable) { + home-manager.users.james = { + home.packages = with pkgs; [ _1password _1password-gui ]; + }; + }; +} diff --git a/modules/applications/default.nix b/modules/applications/default.nix index 41aec8e..17f2b66 100644 --- a/modules/applications/default.nix +++ b/modules/applications/default.nix @@ -1,5 +1,6 @@ { config, pkgs, ... }: { imports = [ + ./1password.nix ./emacs.nix ./firefox.nix ./gnome-common.nix