update ssh for root
This commit is contained in:
parent
337fcc8af2
commit
2689a3927a
2 changed files with 9 additions and 2 deletions
|
@ -19,8 +19,7 @@
|
|||
programs.ssh = {
|
||||
enable = true;
|
||||
matchBlocks = {
|
||||
github = {
|
||||
hostname = "github.com";
|
||||
"github.com" = {
|
||||
identityFile = age.secrets.nix2github.path;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -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
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue