From b1b8dcd024d1cfb2c119f8e512b50a022a30812e Mon Sep 17 00:00:00 2001 From: Sebastian Heiden Date: Sun, 23 Apr 2023 18:12:54 +0200 Subject: [PATCH 1/4] Update hardware-configuration.nix - adapt to QEMU-Guest - use XFS instead of ZFS inside VM --- hosts/quitte/hardware-configuration.nix | 49 ++++--------------------- 1 file changed, 8 insertions(+), 41 deletions(-) diff --git a/hosts/quitte/hardware-configuration.nix b/hosts/quitte/hardware-configuration.nix index 0a2357a..387de4e 100644 --- a/hosts/quitte/hardware-configuration.nix +++ b/hosts/quitte/hardware-configuration.nix @@ -5,56 +5,24 @@ { imports = - [ - (modulesPath + "/installer/scan/not-detected.nix") + [ (modulesPath + "/profiles/qemu-guest.nix") ]; - boot.initrd.availableKernelModules = [ "megaraid_sas" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sr_mod" ]; + boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; fileSystems."/" = - { - device = "rpool/nixos/root"; - fsType = "zfs"; - options = [ "zfsutil" ]; - }; - - fileSystems."/home" = - { - device = "rpool/nixos/home"; - fsType = "zfs"; - options = [ "zfsutil" ]; - }; - - fileSystems."/var/lib" = - { - device = "rpool/nixos/var/lib"; - fsType = "zfs"; - options = [ "zfsutil" ]; - }; - - fileSystems."/var/log" = - { - device = "rpool/nixos/var/log"; - fsType = "zfs"; - options = [ "zfsutil" ]; + { device = "/dev/disk/by-uuid/599838c5-49cd-4769-aff1-2236300c097f"; + fsType = "xfs"; }; fileSystems."/boot" = - { - device = "/dev/disk/by-uuid/7FE6-F583"; + { device = "/dev/disk/by-uuid/3F75-65A3"; fsType = "vfat"; }; - fileSystems."/nix" = - { - device = "rpool/nixos/nix"; - fsType = "zfs"; - options = [ "zfsutil" ]; - }; - swapDevices = [ ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking @@ -62,10 +30,9 @@ # still possible to use this option, but it's recommended to use it in conjunction # with explicit per-interface declarations with `networking.interfaces..useDHCP`. networking.useDHCP = lib.mkDefault true; - # networking.interfaces.eno8303.useDHCP = lib.mkDefault true; - # networking.interfaces.eno8403.useDHCP = lib.mkDefault true; - # networking.interfaces.enp65s0f0np0.useDHCP = lib.mkDefault true; - # networking.interfaces.enp65s0f1np1.useDHCP = lib.mkDefault true; + # networking.interfaces.ens18.useDHCP = lib.mkDefault true; + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } + -- 2.44.2 From c54c7382e870ac7344b2384ffcae16a3362571bd Mon Sep 17 00:00:00 2001 From: Sebastian Heiden Date: Sun, 23 Apr 2023 18:15:13 +0200 Subject: [PATCH 2/4] Update network.nix - Change network adapter --- hosts/quitte/network.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hosts/quitte/network.nix b/hosts/quitte/network.nix index d0671ec..85d477f 100644 --- a/hosts/quitte/network.nix +++ b/hosts/quitte/network.nix @@ -13,7 +13,7 @@ in hostId = "a71c81fc"; enableIPv6 = true; useDHCP = true; - interfaces.enp65s0f0np0.useDHCP = true; + interfaces.ens18.useDHCP = true; useNetworkd = true; firewall.allowedUDPPorts = [ wireguard_port ]; @@ -37,7 +37,7 @@ in # Interfaces on the machine networks."10-ether-bond" = { - matchConfig.Name = "enp65s0f0np0"; + matchConfig.Name = "ens18"; address = [ "141.30.30.169/25" ]; routes = [ -- 2.44.2 From 71eb19b82b309c7ea99e5db41769f38ae4449d40 Mon Sep 17 00:00:00 2001 From: Sebastian Heiden Date: Sun, 23 Apr 2023 18:16:38 +0200 Subject: [PATCH 3/4] Update configuration.nix - Disable ZFS specific tweaks --- hosts/quitte/configuration.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hosts/quitte/configuration.nix b/hosts/quitte/configuration.nix index c2f9cee..448916d 100644 --- a/hosts/quitte/configuration.nix +++ b/hosts/quitte/configuration.nix @@ -9,11 +9,11 @@ # Use the systemd-boot EFI boot loader. boot.loader.systemd-boot.enable = true; - boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages; - boot.kernelParams = [ "video=VGA-1:1024x768@30" ]; + #boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages; + #boot.kernelParams = [ "video=VGA-1:1024x768@30" ]; boot.loader.efi.canTouchEfiVariables = true; - boot.supportedFilesystems = [ "zfs" ]; - boot.zfs.devNodes = "/dev/"; + #boot.supportedFilesystems = [ "zfs" ]; + #boot.zfs.devNodes = "/dev/"; networking.hostName = "quitte"; # Define your hostname. -- 2.44.2 From 8e1543bb142fbddb313ff9c0cd551e66cc92991b Mon Sep 17 00:00:00 2001 From: revol-xut Date: Sun, 23 Apr 2023 19:43:53 +0200 Subject: [PATCH 4/4] nixpkgs fmt --- hosts/quitte/hardware-configuration.nix | 9 ++++++--- modules/sogo.nix | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/hosts/quitte/hardware-configuration.nix b/hosts/quitte/hardware-configuration.nix index 387de4e..f88e24b 100644 --- a/hosts/quitte/hardware-configuration.nix +++ b/hosts/quitte/hardware-configuration.nix @@ -5,7 +5,8 @@ { imports = - [ (modulesPath + "/profiles/qemu-guest.nix") + [ + (modulesPath + "/profiles/qemu-guest.nix") ]; boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ]; @@ -14,12 +15,14 @@ boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/599838c5-49cd-4769-aff1-2236300c097f"; + { + device = "/dev/disk/by-uuid/599838c5-49cd-4769-aff1-2236300c097f"; fsType = "xfs"; }; fileSystems."/boot" = - { device = "/dev/disk/by-uuid/3F75-65A3"; + { + device = "/dev/disk/by-uuid/3F75-65A3"; fsType = "vfat"; }; diff --git a/modules/sogo.nix b/modules/sogo.nix index 92b716f..f60bba7 100644 --- a/modules/sogo.nix +++ b/modules/sogo.nix @@ -22,7 +22,7 @@ in type = ldap; CNFieldName = cn; UIDFieldName = uid; - baseDN = "ou = users, dc=ifsr, dc=de"; + baseDN = "ou=users, dc=ifsr, dc=de"; bindDN = "uid=search, ou=users, dc=ifsr, dc=de"; bindPassword = LDAP_SEARCH; hostname = "ldap://localhost"; -- 2.44.2