From c1043ca9e4f9f5d0a49adf356d3b362485a7ad0a Mon Sep 17 00:00:00 2001 From: "Gustavo L de Mello (Guz)" Date: Tue, 1 Oct 2024 19:18:38 -0300 Subject: [PATCH] feat: ssh configuration --- hosts/battleship/configuration.nix | 4 ++-- hosts/battleship/packages.nix | 10 +++++++++- hosts/fighter/configuration.nix | 4 ++-- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/hosts/battleship/configuration.nix b/hosts/battleship/configuration.nix index 3a85e4e..053488b 100644 --- a/hosts/battleship/configuration.nix +++ b/hosts/battleship/configuration.nix @@ -137,10 +137,10 @@ hostName = "battleship"; wireless.enable = false; dhcpcd.enable = true; - defaultGateway = "192.168.1.1"; + defaultGateway = "${config.battleship-secrets.lesser.devices.defaultGateway}"; interfaces."enp6s0".ipv4.addresses = [ { - address = "192.168.1.13"; + address = "${config.battleship-secrets.lesser.devices.battleship}"; prefixLength = 24; } ]; diff --git a/hosts/battleship/packages.nix b/hosts/battleship/packages.nix index b164fee..f9bc389 100644 --- a/hosts/battleship/packages.nix +++ b/hosts/battleship/packages.nix @@ -3,7 +3,7 @@ pkgs, inputs, ... -}: { +} @ args: { imports = [ inputs.dot013-environment.homeManagerModule inputs.rec-sh.homeManagerModules.rec-sh @@ -13,6 +13,14 @@ dot013.environment.enable = true; dot013.environment.tmux.sessionizer.paths = ["~/.projects"]; + dot013.environment.ssh.devices = { + "spacestation" = { + hostname = "${args.osConfig.battleship-secrets.lesser.devices.spacestation}"; + }; + "figther" = { + hostname = "${args.osConfig.battleship-secrets.lesser.devices.figther}"; + }; + }; programs.brave.enable = true; programs.brave.extensions = [ diff --git a/hosts/fighter/configuration.nix b/hosts/fighter/configuration.nix index 48bc770..ed73bfa 100644 --- a/hosts/fighter/configuration.nix +++ b/hosts/fighter/configuration.nix @@ -116,10 +116,10 @@ hostName = "fighter"; wireless.enable = false; dhcpcd.enable = true; - defaultGateway = "192.168.1.1"; + defaultGateway = "${config.battleship-secrets.lesser.devices.defaultGateway}"; interfaces."enp6s0".ipv4.addresses = [ { - address = "192.168.1.7"; + address = "${config.battleship-secrets.lesser.devices.fighter}"; prefixLength = 24; } ];