moved networking into module

This commit is contained in:
2025-11-20 16:33:42 +01:00
parent 257248db82
commit 230ba1f30c
2 changed files with 16 additions and 10 deletions

View File

@@ -3,6 +3,7 @@
# Include the results of the hardware scan. # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
./modules/users/users.nix ./modules/users/users.nix
./modules/system/networking.nix
]; ];
# Bootloader. # Bootloader.
@@ -15,11 +16,6 @@
# Use latest kernel. # Use latest kernel.
boot.kernelPackages = pkgs.linuxPackages_latest; boot.kernelPackages = pkgs.linuxPackages_latest;
# Networking
networking = {
hostName = "testVM"; # Define your hostname.
networkmanager.enable = true;
};
# Set your time zone. # Set your time zone.
time.timeZone = "Europe/Berlin"; time.timeZone = "Europe/Berlin";
@@ -71,11 +67,6 @@
# Enable the OpenSSH daemon. # Enable the OpenSSH daemon.
services.openssh.enable = true; services.openssh.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
system.stateVersion = "25.05"; # Did you read the comment? system.stateVersion = "25.05"; # Did you read the comment?
} }

View File

@@ -0,0 +1,15 @@
{
config,
...
}: {
networking = {
hostName = "nixOS";
networkmanager.enable = true;
firewall = {
enable = true;
# allowedTCPPorts = [ 80 443];
# allowedUDPPorts = [];
};
};
}