summaryrefslogtreecommitdiff
path: root/users/leonardo.nix
diff options
context:
space:
mode:
authorLeonardo Santiago <[email protected]>2024-06-05 18:54:36 -0300
committerLeonardo Santiago <[email protected]>2024-06-05 18:54:36 -0300
commit1e90166600d0be1c4178a3a721790fca5ac2c88a (patch)
treedf409e193007cb5adc628078895eb132b19de6aa /users/leonardo.nix
parent2af6761a8cacab8f421f1ce4043cc5f998f30192 (diff)
add ssh automatic signing through ssh
Diffstat (limited to 'users/leonardo.nix')
-rw-r--r--users/leonardo.nix16
1 files changed, 13 insertions, 3 deletions
diff --git a/users/leonardo.nix b/users/leonardo.nix
index 4795223..d485e8f 100644
--- a/users/leonardo.nix
+++ b/users/leonardo.nix
@@ -1,4 +1,9 @@
{ pkgs, config, inputs, ... }:
+let
+ all-keys = import ../secrets/pub-ssh-keys.nix;
+ sshkeys = all-keys.${config.networking.hostName};
+ user-key = sshkeys.user;
+in
{
imports = [
../modules/gnome.nix
@@ -107,7 +112,7 @@
extraGroups = [ "networkmanager" "wheel" ];
shell = pkgs.bashInteractive;
hashedPasswordFile = config.age.secrets.user-pass.path;
- openssh.authorizedKeys.keys = builtins.attrValues (import ../secrets/hosts-pub-keys.nix);
+ openssh.authorizedKeys.keys = builtins.concatLists (map builtins.attrValues (builtins.attrValues all-keys));
};
age.secrets = {
@@ -227,9 +232,14 @@
enable = true;
diff-so-fancy.enable = true;
extraConfig = {
- user.name = "Leonardo Santiago";
- user.email = "[email protected]";
+ user = {
+ name = "Leonardo Santiago";
+ email = "[email protected]";
+ signingkey = user-key;
+ };
color.ui = true;
+ gpg.format = "ssh";
+ commit.gpgsign = true;
};
};
mu.enable = true;