Add SSH keys to home manager config
This commit is contained in:
parent
54ceaa9944
commit
92ac850dc7
|
@ -100,45 +100,13 @@
|
|||
shell = "${pkgs.fish}/bin/fish";
|
||||
shortcut = "Space";
|
||||
};
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
compression = true;
|
||||
controlMaster = "auto";
|
||||
controlPath = "~/.ssh/socket-%r@%h:%p";
|
||||
controlPersist = "1m";
|
||||
forwardAgent = true;
|
||||
matchBlocks = {
|
||||
foss-dashboard.hostname = "foss-dashboard.rit.edu";
|
||||
foss-dashboard.proxyCommand = "ssh glados -W %h:%p";
|
||||
foss-dashboard.user = "emi";
|
||||
|
||||
glados.hostname = "129.21.22.196";
|
||||
glados.user = "tts1848";
|
||||
|
||||
muscaria.hostname = "69.61.2.204";
|
||||
muscaria.user = "emi";
|
||||
|
||||
redwood.hostname = "redwood.corviform.gay";
|
||||
redwood.port = 57452;
|
||||
redwood.user = "ember";
|
||||
redwood.localForwards = [{
|
||||
bind.port = 8080;
|
||||
host.port = 8080;
|
||||
host.address = "localhost";
|
||||
}];
|
||||
|
||||
serenity.hostname = "serenity.ist.rit.edu";
|
||||
serenity.user = "tts1848";
|
||||
serenity.proxyCommand = "ssh glados -W %h:%p";
|
||||
|
||||
sol.hostname = "sol.is.geeky.gay";
|
||||
sol.user = "emi";
|
||||
|
||||
awoo.hostname = "awoo.systems";
|
||||
awoo.port = 1922;
|
||||
awoo.user = "root";
|
||||
};
|
||||
programs.ssh = import programs/ssh/settings.nix;
|
||||
home.file.allowedKeys = {
|
||||
text = builtins.concatStringsSep "\n" (import programs/ssh/authorizedKeys.nix);
|
||||
target = ".ssh/authorized_keys";
|
||||
};
|
||||
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
maxCacheTtl = 180; # Seconds
|
||||
|
|
5
configs/programs/ssh/authorizedKeys.nix
Normal file
5
configs/programs/ssh/authorizedKeys.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
[
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEPQznVJkYBHszbKnPGCg/GIEChYm1Y7D5TJ/aYKf76c plantain"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDkyzzlbs66O1nO5qef8TUvZqaIQMxXcbxQQpprepDuX kudzu"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL0Ff9mxroMzT4qTybWa3/4LKzm8DPl1hF8xjjYf5i7e redwood"
|
||||
]
|
39
configs/programs/ssh/settings.nix
Normal file
39
configs/programs/ssh/settings.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
{
|
||||
enable = true;
|
||||
compression = true;
|
||||
controlMaster = "auto";
|
||||
controlPath = "~/.ssh/socket-%r@%h:%p";
|
||||
controlPersist = "1m";
|
||||
forwardAgent = true;
|
||||
matchBlocks = {
|
||||
foss-dashboard.hostname = "foss-dashboard.rit.edu";
|
||||
foss-dashboard.proxyCommand = "ssh glados -W %h:%p";
|
||||
foss-dashboard.user = "emi";
|
||||
|
||||
glados.hostname = "129.21.22.196";
|
||||
glados.user = "tts1848";
|
||||
|
||||
muscaria.hostname = "69.61.2.204";
|
||||
muscaria.user = "emi";
|
||||
|
||||
redwood.hostname = "redwood.corviform.gay";
|
||||
redwood.port = 57452;
|
||||
redwood.user = "ember";
|
||||
redwood.localForwards = [{
|
||||
bind.port = 8080;
|
||||
host.port = 8080;
|
||||
host.address = "localhost";
|
||||
}];
|
||||
|
||||
serenity.hostname = "serenity.ist.rit.edu";
|
||||
serenity.user = "tts1848";
|
||||
serenity.proxyCommand = "ssh glados -W %h:%p";
|
||||
|
||||
sol.hostname = "sol.is.geeky.gay";
|
||||
sol.user = "emi";
|
||||
|
||||
awoo.hostname = "awoo.systems";
|
||||
awoo.port = 1922;
|
||||
awoo.user = "root";
|
||||
};
|
||||
}
|
|
@ -99,11 +99,7 @@ let systemInformation = import ./system/system-information.nix; in
|
|||
description = "Ember";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
shell = pkgs.fish;
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEPQznVJkYBHszbKnPGCg/GIEChYm1Y7D5TJ/aYKf76c plantain"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDkyzzlbs66O1nO5qef8TUvZqaIQMxXcbxQQpprepDuX kudzu"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL0Ff9mxroMzT4qTybWa3/4LKzm8DPl1hF8xjjYf5i7e redwood"
|
||||
];
|
||||
openssh.authorizedKeys.keys = import ./configs/programs/ssh/authorizedKeys.nix;
|
||||
};
|
||||
home-manager.users.ember = import ./configs/home.full.nix;
|
||||
|
||||
|
|
Loading…
Reference in a new issue