Home Gen509 @ 2025-05-03-15:04 by jonas@comfy-station

This commit is contained in:
Jonas Röger 2025-05-03 15:30:32 +02:00
parent 587f734ac1
commit 1a76403f0b
5 changed files with 11 additions and 13 deletions

View File

@ -1,7 +1,6 @@
{config, ...}: rec { {config, ...}: rec {
imports = [ imports = [
../modules/home/borg.nix ../modules/home/borg.nix
../modules/home/yubikey.nix
]; ];
# Home Manager needs a bit of information about you and the paths it should # Home Manager needs a bit of information about you and the paths it should
@ -33,6 +32,7 @@
sopsFile = ../secrets/jonas/ssh.yaml; sopsFile = ../secrets/jonas/ssh.yaml;
keys = ["borg" "passgit"]; keys = ["borg" "passgit"];
}; };
hive.yubikey.enable = true;
hive.zsh.enable = true; hive.zsh.enable = true;
hive.nix-scripts.enable = true; hive.nix-scripts.enable = true;
hive.doom.enable = true; hive.doom.enable = true;

View File

@ -1,8 +1,6 @@
{config, ...}: rec { {config, ...}: rec {
imports = [ imports = [
../modules/home/borg.nix ../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 # Home Manager needs a bit of information about you and the paths it should

View File

@ -1,18 +1,14 @@
{...}: { {...}: {
imports = [
../modules/home/yubikey.nix
];
# Home Manager needs a bit of information about you and the paths it should # Home Manager needs a bit of information about you and the paths it should
# manage. # manage.
home.username = "jroeger"; home.username = "jroeger";
home.homeDirectory = "/home/jroeger"; home.homeDirectory = "/home/jroeger";
yubikey.pinentry = "gnome3";
# hive modules # hive modules
hive.kitty.enable = true; hive.kitty.enable = true;
hive.ranger.enable = true; hive.ranger.enable = true;
hive.yubikey.enable = true;
hive.yubikey.pinentry = "gnome3";
hive.nix-scripts.enable = true; hive.nix-scripts.enable = true;
hive.zsh.enable = true; hive.zsh.enable = true;
hive.doom.enable = true; hive.doom.enable = true;

View File

@ -43,5 +43,6 @@
./home/plasma.nix ./home/plasma.nix
./home/ssh.nix ./home/ssh.nix
./home/wallpaper.nix ./home/wallpaper.nix
./home/yubikey.nix
]; ];
} }

View File

@ -3,8 +3,11 @@
lib, lib,
pkgs, pkgs,
... ...
}: { }: let
options.yubikey = with lib; { cfg = config.hive.yubikey;
in {
options.hive.yubikey = with lib; {
enable = mkEnableOption "Yubikey support";
pinentry = mkOption { pinentry = mkOption {
type = types.enum ["qt" "gnome3"]; type = types.enum ["qt" "gnome3"];
default = "qt"; default = "qt";
@ -12,7 +15,7 @@
}; };
}; };
config = { config = lib.mkIf cfg.enable {
programs.gpg = { programs.gpg = {
enable = true; enable = true;
mutableKeys = false; mutableKeys = false;
@ -29,7 +32,7 @@
enableSshSupport = true; enableSshSupport = true;
enableZshIntegration = true; enableZshIntegration = true;
pinentryPackage = pinentryPackage =
if config.yubikey.pinentry == "qt" if cfg.pinentry == "qt"
then pkgs.pinentry-qt then pkgs.pinentry-qt
else pkgs.pinentry.gnome3; else pkgs.pinentry.gnome3;
extraConfig = '' extraConfig = ''