Allow reverse SSH via regular trusted keys
This commit is contained in:
@@ -81,7 +81,10 @@
|
||||
|
||||
homeConfigurations."artem@mars" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-darwin;
|
||||
extraSpecialArgs.primaryUser = "artem";
|
||||
extraSpecialArgs = {
|
||||
primaryUser = "artem";
|
||||
inherit trustedSSHKeys;
|
||||
};
|
||||
modules = [
|
||||
self.homeModules.mac-portable
|
||||
./hosts/mars/home.nix
|
||||
|
||||
+13
-1
@@ -1,4 +1,10 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
trustedSSHKeys,
|
||||
...
|
||||
}:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
dosbox-staging # dosbox appears broken on darwin
|
||||
@@ -11,6 +17,12 @@
|
||||
antigravity
|
||||
];
|
||||
|
||||
home.activation.setupAuthorizedKeys = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||
run install -m 0600 -D \
|
||||
${pkgs.writeText "keys" (builtins.concatStringsSep "\n" trustedSSHKeys)} \
|
||||
${config.home.homeDirectory}/.ssh/ephemeral_sshd/authorized_keys
|
||||
'';
|
||||
|
||||
# TODO: consider
|
||||
# https://nest.pijul.com/yonkeltron/macOS-nix-config:main/ZLDSMIXK5XFW6.EIAAA
|
||||
# and
|
||||
|
||||
Reference in New Issue
Block a user