wallpaper
This commit is contained in:
parent
4348bef5ac
commit
4d269a9e8d
11 changed files with 274 additions and 65 deletions
39
modules/ssh.nix
Normal file
39
modules/ssh.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
mkMatchBlock =
|
||||
{ hostname }:
|
||||
{
|
||||
inherit hostname;
|
||||
user = "lucy"; # Use dynamically retrieved user
|
||||
identityFile = [
|
||||
"/nix/persist/etc/ssh/ssh_host_ed25519_key"
|
||||
];
|
||||
port = 22;
|
||||
};
|
||||
in
|
||||
|
||||
{
|
||||
# Enable SSH client in Home Manager
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
|
||||
# Define host-specific SSH configurations (match blocks)
|
||||
matchBlocks = {
|
||||
"shell.c-base.org" = mkMatchBlock { hostname = "shell.c-base.org"; };
|
||||
"code.c-base.org" = mkMatchBlock { hostname = "code.c-base.org"; };
|
||||
};
|
||||
|
||||
# Any extra SSH configuration options you want globally
|
||||
extraConfig = ''
|
||||
# Example of global settings
|
||||
Compression yes
|
||||
ServerAliveInterval 60
|
||||
'';
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue