update ssh for root

This commit is contained in:
= 2024-03-12 03:43:06 -05:00
parent 337fcc8af2
commit 2689a3927a
2 changed files with 9 additions and 2 deletions

View file

@ -19,8 +19,7 @@
programs.ssh = {
enable = true;
matchBlocks = {
github = {
hostname = "github.com";
"github.com" = {
identityFile = age.secrets.nix2github.path;
};
};

View file

@ -3,5 +3,13 @@
users.users.root = {
initialPassword = "password1";
};
system.activationScripts.sshConfig = {
text = ''
mkdir -p /root/.ssh
ln -snf ${config.age.secrets.nix2github.path} /root/.ssh/nix2github
ln -snf /home/${settings.user.username}/.ssh/config /root/.ssh/config
'';
};
}