move the pubkey allows with ssh config

This commit is contained in:
stupidcomputer 2024-12-26 14:21:56 -06:00
parent 308761777b
commit a5534e841c
2 changed files with 15 additions and 14 deletions

View File

@ -64,10 +64,10 @@
# we don't want to bring in the entirety of home-manager for this, so just
# write some files as a hack
text = ''
${pkgs.coreutils}/bin/cp /home/ryan/dot_testing/.config/bash/bashrc /home/ryan/.bashrc
${pkgs.coreutils}/bin/cp /home/ryan/dot_testing/.config/bash/profile /home/ryan/.bash_profile
${pkgs.coreutils}/bin/mkdir -p /home/ryan/.config/nvim
${pkgs.coreutils}/bin/cp /home/ryan/dot_testing/.config/nvim/init.min.lua /home/ryan/.config/nvim/init.lua
${pkgs.coreutils}/bin/cp /home/ryan/dot_testing/config/bash/bashrc /home/ryan/.bashrc
${pkgs.coreutils}/bin/cp /home/ryan/dot_testing/config/bash/profile /home/ryan/.bash_profile
${pkgs.coreutils}/bin/mkdir -p /home/ryan/config/nvim
${pkgs.coreutils}/bin/cp /home/ryan/dot_testing/config/nvim/init.min.lua /home/ryan/.config/nvim/init.lua
'';
deps = [];
};
@ -76,10 +76,10 @@
system.activationScripts = {
copyEssentialConfiguration = {
text = ''
${pkgs.coreutils}/bin/cp /home/ryan/dot_testing/.config/bash/bashrc /root/.bashrc
${pkgs.coreutils}/bin/cp /home/ryan/dot_testing/.config/bash/profile /root/.bash_profile
${pkgs.coreutils}/bin/mkdir -p /root/.config/nvim
${pkgs.coreutils}/bin/cp /home/ryan/dot_testing/.config/nvim/init.min.lua /root/.config/nvim/init.lua
${pkgs.coreutils}/bin/cp /home/ryan/dot_testing/config/bash/bashrc /root/.bashrc
${pkgs.coreutils}/bin/cp /home/ryan/dot_testing/config/bash/profile /root/.bash_profile
${pkgs.coreutils}/bin/mkdir -p /root/config/nvim
${pkgs.coreutils}/bin/cp /home/ryan/dot_testing/config/nvim/init.min.lua /root/.config/nvim/init.lua
'';
deps = [];
};
@ -91,11 +91,6 @@
};
users.users.ryan = {
openssh.authorizedKeys.keys = [
machines.copernicus.pubkey
machines.aristotle.pubkey
machines.phone.pubkey
];
isNormalUser = true;
extraGroups = [ "wheel" "docker" ];
};

View File

@ -1,4 +1,4 @@
{ lib, config, pkgs, ... }:
{ lib, config, pkgs, machines, ... }:
{
services.openssh = {
@ -10,4 +10,10 @@
PasswordAuthentication = false;
};
};
users.users.ryan.openssh.authorizedKeys.keys = [
machines.copernicus.pubkey
machines.aristotle.pubkey
machines.phone.pubkey
];
}