From 4e3838b97f3ad2a0f532a84754395b4a0dbe0053 Mon Sep 17 00:00:00 2001 From: lucy Date: Wed, 21 Oct 2026 21:24:16 +0200 Subject: [PATCH 1/7] add bluetooth and nvidia modules + hw config --- modules/default.nix | 12 +----- modules/hardware/bluetooth.nix | 15 +++++++ modules/hardware/nvidia.nix | 18 ++++++++ modules/hosts/nerv/hardware-configuration.nix | 42 +++++++++++++++++++ modules/system/core/core.nix | 10 ----- 5 files changed, 77 insertions(+), 20 deletions(-) create mode 100644 modules/hardware/bluetooth.nix create mode 100644 modules/hardware/nvidia.nix create mode 100644 modules/hosts/nerv/hardware-configuration.nix diff --git a/modules/default.nix b/modules/default.nix index 3d515e4..dcd533a 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -7,6 +7,7 @@ let mods = with self.nixosModules; [ agenix base_services + bluetooth boot core chromium @@ -28,16 +29,7 @@ in modules = with self.nixosModules; [ - { - config.networking.hostName = "nerv"; - config.dualBoot = true; - config.hardware.nvidia = { - open = true; - modesetting.enable = true; - }; - config.services.xserver.videoDrivers = [ "nvidia" ]; - - } + nvidia ] ++ mods; }; diff --git a/modules/hardware/bluetooth.nix b/modules/hardware/bluetooth.nix new file mode 100644 index 0000000..c40074a --- /dev/null +++ b/modules/hardware/bluetooth.nix @@ -0,0 +1,15 @@ +{ ... }: +{ + flake.nixosModules.bluetooth = { + hardware.bluetooth = { + enable = true; + powerOnBoot = false; + input.General.ClassicBondedOnly = false; + settings = { + General = { + Experimental = true; + }; + }; + }; + }; +} diff --git a/modules/hardware/nvidia.nix b/modules/hardware/nvidia.nix new file mode 100644 index 0000000..9c23782 --- /dev/null +++ b/modules/hardware/nvidia.nix @@ -0,0 +1,18 @@ +{ ... }: { + flake.nixosModules.nvidia = { config, ... }: { + # Enable OpenGL + hardware.graphics = { + enable = true; + }; + + services.xserver.videoDrivers = [ "nvidia" ]; + hardware.nvidia = { + modesetting.enable = true; + powerManagement.enable = false; + powerManagement.finegrained = false; + open = true; + nvidiaSettings = true; + package = config.boot.kernelPackages.nvidiaPackages.stable; + }; + }; +} diff --git a/modules/hosts/nerv/hardware-configuration.nix b/modules/hosts/nerv/hardware-configuration.nix new file mode 100644 index 0000000..ca77fe4 --- /dev/null +++ b/modules/hosts/nerv/hardware-configuration.nix @@ -0,0 +1,42 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ ... }: + +{ + flake.nixosModules.nerv = { + + boot.initrd.availableKernelModules = [ + "nvme" + "xhci_pci" + "ahci" + "usbhid" + "usb_storage" + "sd_mod" + ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = { + device = "/dev/disk/by-uuid/48badf37-8adb-48d0-b861-fbf71cbaddd7"; + fsType = "xfs"; + }; + + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/DC66-ACA6"; + fsType = "vfat"; + options = [ + "fmask=0077" + "dmask=0077" + ]; + }; + + swapDevices = [ + { device = "/dev/disk/by-uuid/3b0e79c9-e3d8-4b58-99b4-63c98309ac85"; } + ]; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + }; +} diff --git a/modules/system/core/core.nix b/modules/system/core/core.nix index 227d18e..3719db2 100644 --- a/modules/system/core/core.nix +++ b/modules/system/core/core.nix @@ -1,16 +1,6 @@ { ... }: { flake.nixosModules.core = { pkgs, ... }: { boot.kernelPackages = pkgs.linuxPackages_latest; - hardware.bluetooth = { - enable = true; - powerOnBoot = false; - input.General.ClassicBondedOnly = false; - settings = { - General = { - Experimental = true; - }; - }; - }; time.timeZone = "Europe/Berlin"; i18n.defaultLocale = "en_US.UTF-8"; i18n.extraLocaleSettings = { From 29a224e6bd46f04587a443ee1753773d3ec048f5 Mon Sep 17 00:00:00 2001 From: lucy Date: Wed, 21 Oct 2026 21:27:32 +0200 Subject: [PATCH 2/7] fix typos --- modules/default.nix | 2 +- modules/hosts/nerv/hardware-configuration.nix | 68 ++++++++++--------- 2 files changed, 37 insertions(+), 33 deletions(-) diff --git a/modules/default.nix b/modules/default.nix index dcd533a..41e0d23 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -21,7 +21,6 @@ let tlp user zsh - /etc/nixos/hardware-configuration.nix ]; in { @@ -30,6 +29,7 @@ in with self.nixosModules; [ nvidia + nerv ] ++ mods; }; diff --git a/modules/hosts/nerv/hardware-configuration.nix b/modules/hosts/nerv/hardware-configuration.nix index ca77fe4..c2f03d2 100644 --- a/modules/hosts/nerv/hardware-configuration.nix +++ b/modules/hosts/nerv/hardware-configuration.nix @@ -1,42 +1,46 @@ # Do not modify this file! It was generated by ‘nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. -{ ... }: +{ lib, config, ... }: { - flake.nixosModules.nerv = { + flake.nixosModules.nerv = { config, ... }: { + config = { + dualBoot = true; + networking.hostName = "nerv"; - boot.initrd.availableKernelModules = [ - "nvme" - "xhci_pci" - "ahci" - "usbhid" - "usb_storage" - "sd_mod" - ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-amd" ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = { - device = "/dev/disk/by-uuid/48badf37-8adb-48d0-b861-fbf71cbaddd7"; - fsType = "xfs"; - }; - - fileSystems."/boot" = { - device = "/dev/disk/by-uuid/DC66-ACA6"; - fsType = "vfat"; - options = [ - "fmask=0077" - "dmask=0077" + boot.initrd.availableKernelModules = [ + "nvme" + "xhci_pci" + "ahci" + "usbhid" + "usb_storage" + "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = { + device = "/dev/disk/by-uuid/48badf37-8adb-48d0-b861-fbf71cbaddd7"; + fsType = "xfs"; + }; + + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/DC66-ACA6"; + fsType = "vfat"; + options = [ + "fmask=0077" + "dmask=0077" + ]; + }; + + swapDevices = [ + { device = "/dev/disk/by-uuid/3b0e79c9-e3d8-4b58-99b4-63c98309ac85"; } + ]; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; }; - - swapDevices = [ - { device = "/dev/disk/by-uuid/3b0e79c9-e3d8-4b58-99b4-63c98309ac85"; } - ]; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; }; } From 47cd47b4f2daa5d1af331f40511fe9823376f6a1 Mon Sep 17 00:00:00 2001 From: lucy Date: Wed, 21 Oct 2026 21:29:57 +0200 Subject: [PATCH 3/7] seperate hw config and quirks --- modules/default.nix | 1 + modules/hosts/nerv/hardware-configuration.nix | 65 +++++++++---------- modules/hosts/nerv/quirks.nix | 8 +++ 3 files changed, 40 insertions(+), 34 deletions(-) create mode 100644 modules/hosts/nerv/quirks.nix diff --git a/modules/default.nix b/modules/default.nix index 41e0d23..c888354 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -30,6 +30,7 @@ in [ nvidia nerv + nerv_quirks ] ++ mods; }; diff --git a/modules/hosts/nerv/hardware-configuration.nix b/modules/hosts/nerv/hardware-configuration.nix index c2f03d2..f411dac 100644 --- a/modules/hosts/nerv/hardware-configuration.nix +++ b/modules/hosts/nerv/hardware-configuration.nix @@ -5,42 +5,39 @@ { flake.nixosModules.nerv = { config, ... }: { - config = { - dualBoot = true; - networking.hostName = "nerv"; - boot.initrd.availableKernelModules = [ - "nvme" - "xhci_pci" - "ahci" - "usbhid" - "usb_storage" - "sd_mod" - ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-amd" ]; - boot.extraModulePackages = [ ]; + boot.initrd.availableKernelModules = [ + "nvme" + "xhci_pci" + "ahci" + "usbhid" + "usb_storage" + "sd_mod" + ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; - fileSystems."/" = { - device = "/dev/disk/by-uuid/48badf37-8adb-48d0-b861-fbf71cbaddd7"; - fsType = "xfs"; - }; - - fileSystems."/boot" = { - device = "/dev/disk/by-uuid/DC66-ACA6"; - fsType = "vfat"; - options = [ - "fmask=0077" - "dmask=0077" - ]; - }; - - swapDevices = [ - { device = "/dev/disk/by-uuid/3b0e79c9-e3d8-4b58-99b4-63c98309ac85"; } - ]; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + fileSystems."/" = { + device = "/dev/disk/by-uuid/48badf37-8adb-48d0-b861-fbf71cbaddd7"; + fsType = "xfs"; }; + + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/DC66-ACA6"; + fsType = "vfat"; + options = [ + "fmask=0077" + "dmask=0077" + ]; + }; + + swapDevices = [ + { device = "/dev/disk/by-uuid/3b0e79c9-e3d8-4b58-99b4-63c98309ac85"; } + ]; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; }; + } diff --git a/modules/hosts/nerv/quirks.nix b/modules/hosts/nerv/quirks.nix new file mode 100644 index 0000000..a53af4e --- /dev/null +++ b/modules/hosts/nerv/quirks.nix @@ -0,0 +1,8 @@ +{ ... }: { + flake.nixosModules.nerv_quirks = { config, ... }: { + config = { + networking.hostName = "nerv"; + dualBoot = true; + }; + }; +} From d1712461f61b53e39fcbc10a65404f3c22b93614 Mon Sep 17 00:00:00 2001 From: lucy Date: Wed, 21 Oct 2026 21:32:54 +0200 Subject: [PATCH 4/7] overhaul repo structure --- modules/system/core/boot.nix | 1 + modules/system/hardware/bluetooth.nix | 15 +++++++ modules/system/hardware/nvidia.nix | 18 ++++++++ .../hosts/nerv/hardware-configuration.nix | 43 +++++++++++++++++++ modules/system/hosts/nerv/quirks.nix | 8 ++++ 5 files changed, 85 insertions(+) create mode 100644 modules/system/hardware/bluetooth.nix create mode 100644 modules/system/hardware/nvidia.nix create mode 100644 modules/system/hosts/nerv/hardware-configuration.nix create mode 100644 modules/system/hosts/nerv/quirks.nix diff --git a/modules/system/core/boot.nix b/modules/system/core/boot.nix index 35e0e3d..98789ab 100644 --- a/modules/system/core/boot.nix +++ b/modules/system/core/boot.nix @@ -10,6 +10,7 @@ config.boot.loader = { efi.canTouchEfiVariables = true; limine = { + style.wallapers = [ ]; enable = true; extraEntries = lib.mkIf config.dualBoot '' /Windows 11 diff --git a/modules/system/hardware/bluetooth.nix b/modules/system/hardware/bluetooth.nix new file mode 100644 index 0000000..c40074a --- /dev/null +++ b/modules/system/hardware/bluetooth.nix @@ -0,0 +1,15 @@ +{ ... }: +{ + flake.nixosModules.bluetooth = { + hardware.bluetooth = { + enable = true; + powerOnBoot = false; + input.General.ClassicBondedOnly = false; + settings = { + General = { + Experimental = true; + }; + }; + }; + }; +} diff --git a/modules/system/hardware/nvidia.nix b/modules/system/hardware/nvidia.nix new file mode 100644 index 0000000..9c23782 --- /dev/null +++ b/modules/system/hardware/nvidia.nix @@ -0,0 +1,18 @@ +{ ... }: { + flake.nixosModules.nvidia = { config, ... }: { + # Enable OpenGL + hardware.graphics = { + enable = true; + }; + + services.xserver.videoDrivers = [ "nvidia" ]; + hardware.nvidia = { + modesetting.enable = true; + powerManagement.enable = false; + powerManagement.finegrained = false; + open = true; + nvidiaSettings = true; + package = config.boot.kernelPackages.nvidiaPackages.stable; + }; + }; +} diff --git a/modules/system/hosts/nerv/hardware-configuration.nix b/modules/system/hosts/nerv/hardware-configuration.nix new file mode 100644 index 0000000..f411dac --- /dev/null +++ b/modules/system/hosts/nerv/hardware-configuration.nix @@ -0,0 +1,43 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ lib, config, ... }: + +{ + flake.nixosModules.nerv = { config, ... }: { + + boot.initrd.availableKernelModules = [ + "nvme" + "xhci_pci" + "ahci" + "usbhid" + "usb_storage" + "sd_mod" + ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = { + device = "/dev/disk/by-uuid/48badf37-8adb-48d0-b861-fbf71cbaddd7"; + fsType = "xfs"; + }; + + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/DC66-ACA6"; + fsType = "vfat"; + options = [ + "fmask=0077" + "dmask=0077" + ]; + }; + + swapDevices = [ + { device = "/dev/disk/by-uuid/3b0e79c9-e3d8-4b58-99b4-63c98309ac85"; } + ]; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + }; + +} diff --git a/modules/system/hosts/nerv/quirks.nix b/modules/system/hosts/nerv/quirks.nix new file mode 100644 index 0000000..a53af4e --- /dev/null +++ b/modules/system/hosts/nerv/quirks.nix @@ -0,0 +1,8 @@ +{ ... }: { + flake.nixosModules.nerv_quirks = { config, ... }: { + config = { + networking.hostName = "nerv"; + dualBoot = true; + }; + }; +} From 88972aa4a272018890af635d8a611e130151018d Mon Sep 17 00:00:00 2001 From: lucy Date: Wed, 21 Oct 2026 21:33:10 +0200 Subject: [PATCH 5/7] overhaul repo structure, 2 --- modules/hardware/bluetooth.nix | 15 ------- modules/hardware/nvidia.nix | 18 -------- modules/hosts/nerv/hardware-configuration.nix | 43 ------------------- modules/hosts/nerv/quirks.nix | 8 ---- 4 files changed, 84 deletions(-) delete mode 100644 modules/hardware/bluetooth.nix delete mode 100644 modules/hardware/nvidia.nix delete mode 100644 modules/hosts/nerv/hardware-configuration.nix delete mode 100644 modules/hosts/nerv/quirks.nix diff --git a/modules/hardware/bluetooth.nix b/modules/hardware/bluetooth.nix deleted file mode 100644 index c40074a..0000000 --- a/modules/hardware/bluetooth.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ ... }: -{ - flake.nixosModules.bluetooth = { - hardware.bluetooth = { - enable = true; - powerOnBoot = false; - input.General.ClassicBondedOnly = false; - settings = { - General = { - Experimental = true; - }; - }; - }; - }; -} diff --git a/modules/hardware/nvidia.nix b/modules/hardware/nvidia.nix deleted file mode 100644 index 9c23782..0000000 --- a/modules/hardware/nvidia.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ ... }: { - flake.nixosModules.nvidia = { config, ... }: { - # Enable OpenGL - hardware.graphics = { - enable = true; - }; - - services.xserver.videoDrivers = [ "nvidia" ]; - hardware.nvidia = { - modesetting.enable = true; - powerManagement.enable = false; - powerManagement.finegrained = false; - open = true; - nvidiaSettings = true; - package = config.boot.kernelPackages.nvidiaPackages.stable; - }; - }; -} diff --git a/modules/hosts/nerv/hardware-configuration.nix b/modules/hosts/nerv/hardware-configuration.nix deleted file mode 100644 index f411dac..0000000 --- a/modules/hosts/nerv/hardware-configuration.nix +++ /dev/null @@ -1,43 +0,0 @@ -# Do not modify this file! It was generated by ‘nixos-generate-config’ -# and may be overwritten by future invocations. Please make changes -# to /etc/nixos/configuration.nix instead. -{ lib, config, ... }: - -{ - flake.nixosModules.nerv = { config, ... }: { - - boot.initrd.availableKernelModules = [ - "nvme" - "xhci_pci" - "ahci" - "usbhid" - "usb_storage" - "sd_mod" - ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-amd" ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = { - device = "/dev/disk/by-uuid/48badf37-8adb-48d0-b861-fbf71cbaddd7"; - fsType = "xfs"; - }; - - fileSystems."/boot" = { - device = "/dev/disk/by-uuid/DC66-ACA6"; - fsType = "vfat"; - options = [ - "fmask=0077" - "dmask=0077" - ]; - }; - - swapDevices = [ - { device = "/dev/disk/by-uuid/3b0e79c9-e3d8-4b58-99b4-63c98309ac85"; } - ]; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; - }; - -} diff --git a/modules/hosts/nerv/quirks.nix b/modules/hosts/nerv/quirks.nix deleted file mode 100644 index a53af4e..0000000 --- a/modules/hosts/nerv/quirks.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ ... }: { - flake.nixosModules.nerv_quirks = { config, ... }: { - config = { - networking.hostName = "nerv"; - dualBoot = true; - }; - }; -} From db536c6b80df53c30305fc7560a6e0739c82dfdc Mon Sep 17 00:00:00 2001 From: lucy Date: Wed, 21 Oct 2026 21:33:45 +0200 Subject: [PATCH 6/7] make limine use no wallpaper --- modules/system/core/boot.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/core/boot.nix b/modules/system/core/boot.nix index 98789ab..cd2b8cf 100644 --- a/modules/system/core/boot.nix +++ b/modules/system/core/boot.nix @@ -10,7 +10,7 @@ config.boot.loader = { efi.canTouchEfiVariables = true; limine = { - style.wallapers = [ ]; + style.wallpapers = [ ]; enable = true; extraEntries = lib.mkIf config.dualBoot '' /Windows 11 From 408ccf7b2288d99548e4f12e631dceff6e2d954a Mon Sep 17 00:00:00 2001 From: lucy Date: Wed, 21 Oct 2026 21:35:27 +0200 Subject: [PATCH 7/7] remove unneeded packages --- modules/system/core/packages.nix | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/modules/system/core/packages.nix b/modules/system/core/packages.nix index 2868e9c..3ec489a 100644 --- a/modules/system/core/packages.nix +++ b/modules/system/core/packages.nix @@ -4,27 +4,23 @@ programs.niri.enable = true; services.displayManager.gdm.enable = true; environment.systemPackages = with pkgs; [ - stow ufetch rbw pinentry-gnome3 nixd nixfmt xournalpp - rnote btop chromium wl-clipboard - adw-gtk3 polkit_gnome xwayland-satellite - nemo + nautilus libwacom devenv kdePackages.qt6ct gcc clang-tools - clang gdb gnumake libreoffice @@ -32,15 +28,8 @@ jq nmgui kdePackages.qtdeclarative - gsettings-desktop-schemas - glib ]; fonts.packages = with pkgs; [ - jetbrains-mono - nerd-fonts.jetbrains-mono - noto-fonts - noto-fonts-cjk-sans - noto-fonts-color-emoji inter ]; };