From 1a76403f0be09e091d2a81cb2e913bb797a7bc79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20R=C3=B6ger?= Date: Sat, 3 May 2025 15:30:32 +0200 Subject: [PATCH] Home Gen509 @ 2025-05-03-15:04 by jonas@comfy-station --- home/jonas@comfy-station.nix | 2 +- home/jonas@monolith.nix | 2 -- home/jroeger.nix | 8 ++------ modules/default.nix | 1 + modules/home/yubikey.nix | 11 +++++++---- 5 files changed, 11 insertions(+), 13 deletions(-) diff --git a/home/jonas@comfy-station.nix b/home/jonas@comfy-station.nix index a8fec7a..53a468d 100644 --- a/home/jonas@comfy-station.nix +++ b/home/jonas@comfy-station.nix @@ -1,7 +1,6 @@ {config, ...}: rec { imports = [ ../modules/home/borg.nix - ../modules/home/yubikey.nix ]; # Home Manager needs a bit of information about you and the paths it should @@ -33,6 +32,7 @@ sopsFile = ../secrets/jonas/ssh.yaml; keys = ["borg" "passgit"]; }; + hive.yubikey.enable = true; hive.zsh.enable = true; hive.nix-scripts.enable = true; hive.doom.enable = true; diff --git a/home/jonas@monolith.nix b/home/jonas@monolith.nix index a8aa730..39dec2c 100644 --- a/home/jonas@monolith.nix +++ b/home/jonas@monolith.nix @@ -1,8 +1,6 @@ {config, ...}: rec { imports = [ ../modules/home/borg.nix - ../modules/home/ssh.nix - ../modules/home/yubikey.nix ]; # Home Manager needs a bit of information about you and the paths it should diff --git a/home/jroeger.nix b/home/jroeger.nix index aa87028..c6d7085 100644 --- a/home/jroeger.nix +++ b/home/jroeger.nix @@ -1,18 +1,14 @@ {...}: { - imports = [ - ../modules/home/yubikey.nix - ]; - # Home Manager needs a bit of information about you and the paths it should # manage. home.username = "jroeger"; home.homeDirectory = "/home/jroeger"; - yubikey.pinentry = "gnome3"; - # hive modules hive.kitty.enable = true; hive.ranger.enable = true; + hive.yubikey.enable = true; + hive.yubikey.pinentry = "gnome3"; hive.nix-scripts.enable = true; hive.zsh.enable = true; hive.doom.enable = true; diff --git a/modules/default.nix b/modules/default.nix index e21c311..0756c2b 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -43,5 +43,6 @@ ./home/plasma.nix ./home/ssh.nix ./home/wallpaper.nix + ./home/yubikey.nix ]; } diff --git a/modules/home/yubikey.nix b/modules/home/yubikey.nix index 87230dd..14cb14a 100644 --- a/modules/home/yubikey.nix +++ b/modules/home/yubikey.nix @@ -3,8 +3,11 @@ lib, pkgs, ... -}: { - options.yubikey = with lib; { +}: let + cfg = config.hive.yubikey; +in { + options.hive.yubikey = with lib; { + enable = mkEnableOption "Yubikey support"; pinentry = mkOption { type = types.enum ["qt" "gnome3"]; default = "qt"; @@ -12,7 +15,7 @@ }; }; - config = { + config = lib.mkIf cfg.enable { programs.gpg = { enable = true; mutableKeys = false; @@ -29,7 +32,7 @@ enableSshSupport = true; enableZshIntegration = true; pinentryPackage = - if config.yubikey.pinentry == "qt" + if cfg.pinentry == "qt" then pkgs.pinentry-qt else pkgs.pinentry.gnome3; extraConfig = ''