From baae25f4e2d6c31a378a13d555a64232d75ddc92 Mon Sep 17 00:00:00 2001 From: iFargle Date: Mon, 11 Dec 2023 21:01:07 +0900 Subject: [PATCH] Update --- lib/default.nix | 5 ++++- nixos/default.nix | 4 ++++ nixos/minimal.nix | 4 ++++ nixos/small.nix | 4 ++++ 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/lib/default.nix b/lib/default.nix index f3304231..3a692026 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -7,14 +7,17 @@ }: { user = "${username}"; hostname = "${hostname}"; + sshOpts = [ "-A" ]; profiles = { system = { path = inputs.deploy-rs.lib.${platform}.activate.nixos self.nixosConfigurations.${hostname}; - sshUser = "root"; + user = "root"; + sshUser = "${username}"; }; home-manager = { path = inputs.deploy-rs.lib.${platform}.activate.home-manager self.homeConfigurations."${username}@${hostname}"; + user = "${username}"; sshUser = "${username}"; }; }; diff --git a/nixos/default.nix b/nixos/default.nix index 7e4e8ddb..cbbfb67a 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -26,6 +26,10 @@ ./hosts/${hostname} ] ++ lib.optional (builtins.isString desktop) ./common/desktops/${desktop}; + # enable passwordless elevation + # Useful for deploy-rs + security.pam.enableSSHAgentAuth = true; + # List packages installed in system profile environment.systemPackages = with pkgs; [ sbctl # Secureboot Control diff --git a/nixos/minimal.nix b/nixos/minimal.nix index 203abbce..700436cf 100644 --- a/nixos/minimal.nix +++ b/nixos/minimal.nix @@ -14,6 +14,10 @@ ./hosts/${hostname} ] ++ lib.optional (builtins.isString desktop) ./common/desktops/${desktop}; + # enable passwordless elevation + # Useful for deploy-rs + security.pam.enableSSHAgentAuth = true; + # List packages installed in system profile environment.systemPackages = with pkgs; [ sbctl diff --git a/nixos/small.nix b/nixos/small.nix index 24803ccd..437b58d2 100644 --- a/nixos/small.nix +++ b/nixos/small.nix @@ -20,6 +20,10 @@ ./hosts/${hostname} ]; + # enable passwordless elevation + # Useful for deploy-rs + security.pam.enableSSHAgentAuth = true; + # List packages installed in system profile environment.systemPackages = with pkgs; [ git