This commit is contained in:
2026-06-19 18:28:22 +09:00
parent 322a5fe6be
commit f62e4077ea
7 changed files with 71 additions and 25 deletions
+1 -1
View File
@@ -11,7 +11,7 @@
./fcitx5
./ghostty
./git
./gnupg.nix
./gnupg
./grok.nix
./greetd.nix
./ly
-16
View File
@@ -1,16 +0,0 @@
{ lib, config, ... }:
let
cfg = config.my.applications.gnupg;
in
{
options.my.applications.gnupg = {
enable = lib.mkEnableOption "GnuPG agent";
};
config = lib.mkIf cfg.enable {
programs.gnupg.agent = {
enable = true;
enableSSHSupport = false;
};
};
}
+23
View File
@@ -0,0 +1,23 @@
{
lib,
config,
...
}:
let
cfg = config.my.applications.gnupg;
in
{
imports = [
./home.nix
./system.nix
];
options.my.applications.gnupg = {
enable = lib.mkEnableOption "GnuPG agent";
};
config = lib.mkIf cfg.enable {
my.applications.gnupg.system.enable = lib.mkDefault true;
my.applications.gnupg.homeManager.enable = lib.mkDefault true;
};
}
+22
View File
@@ -0,0 +1,22 @@
{
lib,
config,
...
}:
let
hmCfg = config.my.applications.gnupg.homeManager;
in
{
options.my.applications.gnupg.homeManager = {
enable = lib.mkEnableOption "GnuPG home-manager configuration";
};
config.home-manager.sharedModules = [
{
config = lib.mkIf hmCfg.enable {
services.gpg-agent.enable = false;
services.gpg-agent.enableSshSupport = false;
};
}
];
}
+20
View File
@@ -0,0 +1,20 @@
{
lib,
config,
...
}:
let
cfg = config.my.applications.gnupg.system;
in
{
options.my.applications.gnupg.system = {
enable = lib.mkEnableOption "GnuPG system configuration";
};
config = lib.mkIf cfg.enable {
programs.gnupg.agent = {
enable = true;
enableSSHSupport = false;
};
};
}
+2 -8
View File
@@ -20,16 +20,10 @@ in
pkgs.openssh
];
systemd.user.services.ssh-agent = {
Unit.Description = "OpenSSH authentication agent";
Service = {
ExecStart = "${pkgs.openssh}/bin/ssh-agent -D -a %t/ssh-agent";
};
Install.WantedBy = [ "default.target" ];
};
systemd.user.sockets.gcr-ssh-agent.Install.WantedBy = lib.mkForce [ ];
services.ssh-agent.enable = true;
home.sessionVariables = {
SSH_AUTH_SOCK = "\${XDG_RUNTIME_DIR}/ssh-agent";
};
+3
View File
@@ -16,5 +16,8 @@ in
environment.systemPackages = with pkgs; [
openssh # OpenSSH client and server
];
programs.ssh.startAgent = true;
services.gnome.gcr-ssh-agent.enable = false;
};
}