From 098c9f44ccf87b232afffbabe81daa8f5d4e885c Mon Sep 17 00:00:00 2001 From: Kabbone Date: Sat, 21 Jan 2023 19:02:08 +0100 Subject: [PATCH] hosts: add vlan100 --- hosts/desktop/hardware-configuration.nix | 16 +++++++++++++++- hosts/nas/hardware-configuration.nix | 24 +++++++++++++++++++----- modules/desktop/virtualisation/qemu.nix | 1 + 3 files changed, 35 insertions(+), 6 deletions(-) diff --git a/hosts/desktop/hardware-configuration.nix b/hosts/desktop/hardware-configuration.nix index fe5d098..af9081a 100644 --- a/hosts/desktop/hardware-configuration.nix +++ b/hosts/desktop/hardware-configuration.nix @@ -110,10 +110,20 @@ networking = { useDHCP = false; # Deprecated - hostName = "hades"; + hostName = "nas"; + domain = "home.opel-online.de"; networkmanager = { enable = true; }; + timeServers = [ + "192.168.2.1" + ]; + vlans = { + vlan100 = { + id = 100; + interface = "enp34s0"; + }; + }; interfaces = { enp34s0 = { useDHCP = true; # For versatility sake, manually edit IP on nm-applet. @@ -124,6 +134,10 @@ }; }; #defaultGateway = "192.168.0.1"; + defaultGateway6 = { + address = "fe80::1"; + interface = "enp34s0"; + }; #nameservers = [ "192.168.0.4" ]; #firewall = { # enable = false; diff --git a/hosts/nas/hardware-configuration.nix b/hosts/nas/hardware-configuration.nix index c70a726..ac42d02 100644 --- a/hosts/nas/hardware-configuration.nix +++ b/hosts/nas/hardware-configuration.nix @@ -180,6 +180,15 @@ networkmanager = { enable = false; }; + timeServers = [ + "192.168.2.1" + ]; + vlans = { + vlan100 = { + id = 100; + interface = "enp0s31f6"; + }; + }; interfaces = { enp0s31f6 = { useDHCP = true; # For versatility sake, manually edit IP on nm-applet. @@ -194,12 +203,17 @@ }; }; # defaultGateway = "45.142.114.1"; -# defaultGateway6 = { -# address = "fe80::1"; -# interface = "ens18"; -# }; -# + defaultGateway6 = { + address = "fe80::1"; + interface = "enp0s31f6"; + }; # nameservers = [ "9.9.9.9" "2620:fe::fe" ]; + #firewall = { + # enable = false; + # #allowedUDPPorts = [ 53 67 ]; + # #allowedTCPPorts = [ 53 80 443 9443 ]; + #}; + }; }; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; powerManagement = { diff --git a/modules/desktop/virtualisation/qemu.nix b/modules/desktop/virtualisation/qemu.nix index 4380b10..916a48e 100644 --- a/modules/desktop/virtualisation/qemu.nix +++ b/modules/desktop/virtualisation/qemu.nix @@ -14,6 +14,7 @@ users.groups.libvirtd.members = [ "root" "${user}" ]; virtualisation = { + vswitch.enable = true; libvirtd = { enable = true; # Virtual drivers #qemuPackage = pkgs.qemu_kvm; # Default