From 5f6358365b1c0b7be15306672d49507b1708ba1c Mon Sep 17 00:00:00 2001 From: caleb Date: Wed, 20 Mar 2024 15:24:15 -0400 Subject: [PATCH] migrated networking related items to separate config file --- application-configuration.nix | 7 ------- configuration.nix | 18 +++++------------- networking-configuration.nix | 20 ++++++++++++++++++++ 3 files changed, 25 insertions(+), 20 deletions(-) create mode 100644 networking-configuration.nix diff --git a/application-configuration.nix b/application-configuration.nix index 29d96bb..b20b2ed 100644 --- a/application-configuration.nix +++ b/application-configuration.nix @@ -29,13 +29,6 @@ openjdk8 ]; - # Enable mullvad vpn - services.mullvad-vpn.package = pkgs.mullvad-vpn; - services.mullvad-vpn.enable = true; - - # Enable tailscale - services.tailscale.enable = true; - # install Steam programs.steam = { enable = true; diff --git a/configuration.nix b/configuration.nix index 7003d42..85a77f2 100644 --- a/configuration.nix +++ b/configuration.nix @@ -5,6 +5,7 @@ ./hardware-configuration.nix ./bootloader-configuration.nix ./surfacebook-configuration.nix + ./networking-configuration.nix ./application-configuration.nix ./software-development-configuration.nix ./school-configuration.nix @@ -12,12 +13,6 @@ ./faf-linux.nix ]; - # Enable networking and bluetooth - networking.networkmanager.enable = true; - systemd.services.NetworkManager-wait-online.enable = false; #disable wait online since it is broken - networking.hostName = "surface"; - hardware.bluetooth.enable = true; - # Set time zone. time.timeZone = "America/New_York"; @@ -135,23 +130,20 @@ }; }; - # enable mac address randomization - networking.networkmanager.wifi.macAddress = "random"; - # Enable CUPS to print documents. services.printing.enable = true; services.printing.drivers = [ pkgs.brlaser ]; # remote build nix.buildMachines = [ - { + /* { hostName = "talos"; system = "x86_64-linux"; protocol = "ssh-ng"; speedFactor = 4; supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ]; mandatoryFeatures = [ ]; - } + } */ { hostName = "january"; system = "x86_64-linux"; @@ -160,14 +152,14 @@ supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ]; mandatoryFeatures = [ ]; } - { + /* { hostName = "pubnix"; system = "x86_64-linux"; protocol = "ssh-ng"; speedFactor = 2; supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ]; mandatoryFeatures = [ ]; - } + } */ ]; nix.distributedBuilds = true; # optional, useful when the builder has a faster internet connection than yours diff --git a/networking-configuration.nix b/networking-configuration.nix new file mode 100644 index 0000000..d9ca213 --- /dev/null +++ b/networking-configuration.nix @@ -0,0 +1,20 @@ +{ pkgs, ... }: +{ + # Enable networking and bluetooth + networking = { + hostName = "surface"; + networkmanager = { + enable = true; + wifi.macAddress = "random"; + }; + }; + systemd.services.NetworkManager-wait-online.enable = false; #disable wait online since it is broken + hardware.bluetooth.enable = true; + + # Enable mullvad vpn + services.mullvad-vpn.package = pkgs.mullvad-vpn; + services.mullvad-vpn.enable = true; + + # Enable tailscale + services.tailscale.enable = true; +} \ No newline at end of file