From ab21bce48d7ce899427c41c42acb10cd6f264c71 Mon Sep 17 00:00:00 2001 From: servostar Date: Thu, 21 Dec 2023 20:57:54 +0100 Subject: [PATCH] added system/networking config --- configuration.nix | 38 -------------------------------------- settings.nix | 1 + system/default.nix | 1 + system/networking.nix | 15 +++++++++++++++ 4 files changed, 17 insertions(+), 38 deletions(-) create mode 100644 system/networking.nix diff --git a/configuration.nix b/configuration.nix index b9375d5..35ce780 100644 --- a/configuration.nix +++ b/configuration.nix @@ -3,7 +3,6 @@ # Include the results of the hardware scan. ./hardware-configuration.nix ./nix-settings.nix - ./boot.nix ./users ./.luks-swap.nix ./fonts.nix @@ -25,17 +24,6 @@ hardware.opengl.enable = true; - networking.firewall.checkReversePath = false; - networking.hostName = "servostar-nixos-flex"; # Define your hostname. - # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. - - # Configure network proxy if necessary - # networking.proxy.default = "http://user:password@proxy:port/"; - # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; - - # Enable networking - networking.networkmanager.enable = true; - # Set your time zone. time.timeZone = "Europe/Berlin"; @@ -64,32 +52,6 @@ # Configure console keymap console.keyMap = "de"; - ################################################ - # ____ _ _ - # | _ \(_)_ __ _____ _(_)_ __ ___ - # | |_) | | '_ \ / _ \ \ /\ / / | '__/ _ \ - # | __/| | |_) | __/\ V V /| | | | __/ - # |_| |_| .__/ \___| \_/\_/ |_|_| \___| - # |_| - ################################################ - - # Enable sound with pipewire. - sound.enable = true; - hardware.pulseaudio.enable = false; - security.rtkit.enable = true; - services.pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - # If you want to use JACK applications, uncomment this - #jack.enable = true; - - # use the example session manager (no others are packaged yet so this is enabled by default, - # no need to redefine it in your config for now) - #media-session.enable = true; - }; - # Enable touchpad support (enabled default in most desktopManager). # services.xserver.libinput.enable = true; diff --git a/settings.nix b/settings.nix index ed407d7..0af77ef 100644 --- a/settings.nix +++ b/settings.nix @@ -92,6 +92,7 @@ with import {}; { networking = { wireguard = true; # enable wireguard protocol + hostname = "servostar-nixos-desktop"; }; games = { diff --git a/system/default.nix b/system/default.nix index 9946b6e..bdcd7b4 100644 --- a/system/default.nix +++ b/system/default.nix @@ -2,5 +2,6 @@ imports = [ ./grub.nix ./kernel.nix + ./networking.nix ]; } diff --git a/system/networking.nix b/system/networking.nix new file mode 100644 index 0000000..ba30975 --- /dev/null +++ b/system/networking.nix @@ -0,0 +1,15 @@ +{ pkgs, lib, ... }: +let + settings = import ./../settings.nix; +in +{ + networking.firewall.checkReversePath = false; + networking.hostName = settings.networking.hostname; # Define your hostname. + + # Configure network proxy if necessary + # networking.proxy.default = "http://user:password@proxy:port/"; + # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; + + # Enable networking + networking.networkmanager.enable = true; +}