mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-22 15:29:07 +01:00
sshd: Make sure to only ever listen on overlay address
This commit is contained in:
parent
a2827a95f2
commit
3a669dd8fd
1 changed files with 2 additions and 2 deletions
|
|
@ -16,7 +16,7 @@ in
|
||||||
openssh = {
|
openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
openFirewall = false;
|
openFirewall = false;
|
||||||
ports = [ ];
|
ports = lib.mkForce [ ];
|
||||||
listenAddresses = lib.singleton {
|
listenAddresses = lib.singleton {
|
||||||
addr = netCfg.overlay.address;
|
addr = netCfg.overlay.address;
|
||||||
port = 22;
|
port = 22;
|
||||||
|
|
@ -46,7 +46,7 @@ in
|
||||||
users.users.seb.openssh.authorizedKeys.keyFiles =
|
users.users.seb.openssh.authorizedKeys.keyFiles =
|
||||||
self.nixosConfigurations
|
self.nixosConfigurations
|
||||||
|> lib.attrValues
|
|> lib.attrValues
|
||||||
|> lib.filter (host: host.config.custom.networking.hostName != netCfg.hostName)
|
|> lib.filter (host: host.config.networking.hostName != netCfg.hostName)
|
||||||
|> lib.filter (host: host.config |> lib.hasAttr "home-manager")
|
|> lib.filter (host: host.config |> lib.hasAttr "home-manager")
|
||||||
|> lib.map (host: host.config.home-manager.users.seb.custom.programs.ssh)
|
|> lib.map (host: host.config.home-manager.users.seb.custom.programs.ssh)
|
||||||
|> lib.filter (ssh: ssh.enable)
|
|> lib.filter (ssh: ssh.enable)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue