Testing SSH signing
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{
|
||||
description = "Flake config, _heavily_ influenced by fufexan's";
|
||||
description = "cnix nix";
|
||||
|
||||
outputs = inputs:
|
||||
inputs.flake-parts.lib.mkFlake {inherit inputs;} {
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
"${userModules}/userd/copyq"
|
||||
"${userModules}/userd/mako"
|
||||
"${userModules}/userd/udiskie"
|
||||
"${userModules}/userd/gpg"
|
||||
"${userModules}/utils/anyrun"
|
||||
"${userModules}/utils/misc"
|
||||
"${userModules}/utils/rofi"
|
||||
|
||||
18
home/modules/userd/gpg/default.nix
Normal file
18
home/modules/userd/gpg/default.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.modules.userd.gpg;
|
||||
in {
|
||||
options = {
|
||||
modules.userd.gpg.enable = mkEnableOption "Enables gpg";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
enableSshSupport = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -12,6 +12,7 @@ in {
|
||||
config = mkIf cfg.enable {
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
userKnownHostsFile = "~/.ssh/known_hosts";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -53,6 +53,10 @@
|
||||
copyq = {
|
||||
enable = true;
|
||||
};
|
||||
gpg = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
mako = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
@@ -83,10 +83,6 @@ in {
|
||||
ZSH_THEME_VIRTUALENV_SUFFIX=$ZSH_THEME_VIRTUAL_ENV_PROMPT_SUFFIX
|
||||
|
||||
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=241'
|
||||
${lib.optionalString config.services.gpg-agent.enable ''
|
||||
gnupg_path=$(ls $XDG_RUNTIME_DIR/gnupg)
|
||||
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/gnupg/$gnupg_path/S.gpg-agent.ssh"
|
||||
''}
|
||||
microfetch
|
||||
'';
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user