diff --git a/hosts/astyanax/configuration.nix b/hosts/astyanax/configuration.nix index 667b0c2..26880ac 100644 --- a/hosts/astyanax/configuration.nix +++ b/hosts/astyanax/configuration.nix @@ -17,7 +17,7 @@ ../../modules/gnome.nix ../../modules/bluetooth.nix ../../modules/keyboard - ../../modules/networking.nix + (import ../../modules/networking.nix { hostName = "astyanax"; }) ../../modules/users.nix ../../modules/audio.nix ../../modules/printing.nix @@ -45,7 +45,10 @@ }; }; - networking.hostId = "80eef97e"; + networking = { + hostId = "80eef97e"; + }; + services.openssh = { enable = true; harden = true; diff --git a/hosts/vm/configuration.nix b/hosts/vm/configuration.nix index eeacc59..b974e90 100644 --- a/hosts/vm/configuration.nix +++ b/hosts/vm/configuration.nix @@ -16,7 +16,7 @@ ./disk.nix ../../modules/bootloader.nix ../../modules/keyboard - ../../modules/networking.nix + (import ../../modules/networking.nix { hostName = "vm"; }) ../../modules/users.nix ../../modules/audio.nix ../../modules/printing.nix diff --git a/modules/networking.nix b/modules/networking.nix index 12b4400..1f5cb40 100644 --- a/modules/networking.nix +++ b/modules/networking.nix @@ -1,19 +1,13 @@ -{ ... }: +{ + hostName ? "nixos", + ... +}: { networking = { - hostName = "nixos"; - wireless = { - iwd = { - enable = true; - }; - - }; - - networkmanager = { - wifi.backend = "iwd"; - }; - + hostName = hostName; + wireless.iwd.enable = true; + networkmanager.wifi.backend = "iwd"; nftables.enable = true; firewall.enable = true; };