diff --git a/flake.nix b/flake.nix index ae3da58..d2d4423 100644 --- a/flake.nix +++ b/flake.nix @@ -190,7 +190,7 @@ isHM = true; }; }; - homeConfigurations."jroeger" = home-manager.lib.homeManagerConfiguration { + homeConfigurations."admin-jroeger" = home-manager.lib.homeManagerConfiguration { pkgs = nixpkgs.legacyPackages.${system}; # Specify your home configuration modules here, for example, @@ -201,7 +201,7 @@ inputs.plasma-manager.homeManagerModules.plasma-manager inputs.sops-nix.homeManagerModules.sops ./modules - ./home/jroeger.nix + ./home/admin-jroeger.nix ]; # Optionally use extraSpecialArgs diff --git a/home/jroeger.nix b/home/admin-jroeger.nix similarity index 94% rename from home/jroeger.nix rename to home/admin-jroeger.nix index c6d7085..71f37c1 100644 --- a/home/jroeger.nix +++ b/home/admin-jroeger.nix @@ -1,8 +1,8 @@ {...}: { # Home Manager needs a bit of information about you and the paths it should # manage. - home.username = "jroeger"; - home.homeDirectory = "/home/jroeger"; + home.username = "admin-jroeger"; + home.homeDirectory = "/home/admin-jroeger"; # hive modules hive.kitty.enable = true; diff --git a/modules/home/yubikey.nix b/modules/home/yubikey.nix index 498abcc..71a2c2c 100644 --- a/modules/home/yubikey.nix +++ b/modules/home/yubikey.nix @@ -13,6 +13,7 @@ in { default = "qt"; description = "The pinentry flavour to use"; }; + withCCID = mkEnableOption "Use stand-aline CCID (instead of a running pcscd service)"; }; config = lib.mkIf cfg.enable { @@ -26,17 +27,33 @@ in { trust = "ultimate"; } ]; + scdaemonSettings = { + disable-ccid = !cfg.withCCID; + }; + }; + services.gpg-agent = { + enable = true; + enableSshSupport = true; + enableZshIntegration = true; + pinentry = + if cfg.pinentry == "gnome3" + then { + package = pkgs.pinentry-gnome3; + program = "pinentry-gnome3"; + } + else if cfg.pinentry == "qt" + then { + package = pkgs.pinentry-qt; + program = "pinentry-qt"; + } + else {}; + sshKeys = [config.programs.git.signing.key]; + }; + home.sessionVariables = { + SSH_AUTH_SOCK = "$XDG_RUNTIME_DIR/gnupg/S.gpg-agent.ssh"; + }; + systemd.user.settings.Manager.DefaultEnvironment = { + SSH_AUTH_SOCK = "/run/user/%U/gnupg/S.gpg-agent.ssh"; }; - # services.gpg-agent = { - # enable = true; - # enableSshSupport = true; - # enableZshIntegration = true; - # }; - # home.sessionVariables = { - # SSH_AUTH_SOCK = "$XDG_RUNTIME_DIR/gnupg/S.gpg-agent.ssh"; - # }; - # systemd.user.settings.Manager.DefaultEnvironment = lib.mapAttrs (_: lib.mkDefault) { - # SSH_AUTH_SOCK = "/run/user/%U/gnupg/S.gpg-agent.ssh"; - # }; }; }