From 14fabcbe200bf6ee6554ded62b6353ad8fd00972 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Wed, 10 Jul 2024 09:57:10 -0500 Subject: [PATCH] Passwords --- flake.nix | 2 +- modules/home-manager/default.nix | 21 ++++++++++++++++----- modules/nixos/default.nix | 24 +++++++++++++++++++++--- nixos/thinker.nix | 2 +- 4 files changed, 39 insertions(+), 10 deletions(-) diff --git a/flake.nix b/flake.nix index 94a650c..6f07521 100644 --- a/flake.nix +++ b/flake.nix @@ -183,6 +183,7 @@ hardware.nixosModules.common-cpu-amd hardware.nixosModules.common-pc-ssd + password-manager wifi graphical-workstation music-production @@ -194,7 +195,6 @@ { home-manager.users.daniel = { imports = with homeManagerModules; [ - pass senpai iex cargo diff --git a/modules/home-manager/default.nix b/modules/home-manager/default.nix index 8abfa19..09ae471 100644 --- a/modules/home-manager/default.nix +++ b/modules/home-manager/default.nix @@ -1141,7 +1141,7 @@ macos = { imports = with homeManagerModules; [ desktop - pass + password-manager ]; }; @@ -1149,15 +1149,26 @@ # nnn = {}; + password-manager = {pkgs, ...}: { + imports = with homeManagerModules; [ + pass + ]; + + home.packages = with pkgs; [ + passage + rage + age-plugin-yubikey + bitwarden-cli + oath-toolkit + bitwarden-desktop + ]; + }; + pass = {pkgs, ...}: { programs.password-store = { enable = true; package = pkgs.pass.withExtensions (exts: [exts.pass-otp]); }; - - home.packages = with pkgs; [ - pinentry-curses - ]; }; senpai = {config, ...}: { diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index 66bb363..5370b04 100644 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -160,6 +160,18 @@ }; }; + password-manager = {pkgs, ...}: { + programs.goldwarden = { + enable = true; + }; + + home-manager.users.daniel = { + imports = with homeManagerModules; [ + password-manager + ]; + }; + }; + tailscale = {lib, ...}: { services.tailscale = { enable = true; @@ -371,7 +383,11 @@ ]; }; - plasma6 = {pkgs, ...}: { + plasma6 = { + pkgs, + lib, + ... + }: { imports = with nixosModules; [ kde-connect pipewire @@ -786,8 +802,10 @@ daniel ]; - programs.gnupg.agent.enable = false; - programs.gnupg.agent.pinentryPackage = pkgs.pinentry-tty; + programs.gnupg.agent = { + enable = true; + pinentryPackage = lib.mkDefault pkgs.pinentry-tty; + }; time = { timeZone = lib.mkDefault "America/Chicago"; diff --git a/nixos/thinker.nix b/nixos/thinker.nix index 5d0272a..f8146f4 100644 --- a/nixos/thinker.nix +++ b/nixos/thinker.nix @@ -60,7 +60,7 @@ home-manager.users.daniel = { imports = with outputs.homeManagerModules; [ sway - pass + password-manager firefox-no-tabs # wallpaper-manager # sway-laptop