From b17e836502562128dc8dedcf2fc4842f49a20d85 Mon Sep 17 00:00:00 2001 From: moni-dz Date: Tue, 31 Dec 2024 04:53:49 +0800 Subject: [PATCH] users/hosts: pam ssh auth --- hosts/mistral/configuration.nix | 5 +++++ modules/shared/home-manager/vcs.nix | 4 ++-- users/moni/home.nix | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/hosts/mistral/configuration.nix b/hosts/mistral/configuration.nix index 8c7cd76..e018a4f 100644 --- a/hosts/mistral/configuration.nix +++ b/hosts/mistral/configuration.nix @@ -65,6 +65,11 @@ }; }; + security.pam = { + rssh.enable = true; + sudo.rssh = true; + }; + users.users.moni = { isNormalUser = true; home = "/home/moni"; diff --git a/modules/shared/home-manager/vcs.nix b/modules/shared/home-manager/vcs.nix index 6b64aa7..31e48f0 100644 --- a/modules/shared/home-manager/vcs.nix +++ b/modules/shared/home-manager/vcs.nix @@ -94,9 +94,9 @@ }; signing = { - sign-all = "true"; + sign-all = true; backend = "ssh"; - key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBlr5SHXali3ttWt8ygyWgCW2usWVsBhXebeyi2XKO2Z"; + key = "${config.home.homeDirectory}/.ssh/id_ed25519.pub"; }; ui = { diff --git a/users/moni/home.nix b/users/moni/home.nix index 5984d2b..b134609 100644 --- a/users/moni/home.nix +++ b/users/moni/home.nix @@ -27,6 +27,8 @@ tinymist ; }; + + sessionVariables.SSH_ASKPASS = "/opt/homebrew/bin/touch2sudo"; }; programs = {