From ac23dd9251469dc3b9711bde5c31e66c8477d5e4 Mon Sep 17 00:00:00 2001 From: twoneis Date: Mon, 10 Jun 2024 00:05:15 +0200 Subject: [PATCH] more sensible config and nvidia option didn't really work like that --- devices/ellaca/default.nix | 13 ++++++++++++- devices/ellaca/options.nix | 1 - devices/inkvine/default.nix | 5 ++++- devices/inkvine/options.nix | 1 - devices/pleniscenta/options.nix | 1 - modules/audio/default.nix | 2 ++ modules/default.nix | 13 +++---------- modules/nvidia/default.nix | 9 --------- options.nix | 1 - 9 files changed, 21 insertions(+), 25 deletions(-) delete mode 100644 modules/nvidia/default.nix diff --git a/devices/ellaca/default.nix b/devices/ellaca/default.nix index 2dbc382..aff376c 100644 --- a/devices/ellaca/default.nix +++ b/devices/ellaca/default.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: { +{ config, pkgs, ... }: { imports = [ ./options.nix ]; @@ -50,11 +50,22 @@ }; }; + services = { + xserver.videoDrivers = ["nvidia"]; + }; + hardware = { enableRedistributableFirmware = true; enableAllFirmware = true; cpu.amd.updateMicrocode = true; + + nvidia = { + modesetting.enable = true; + nvidiaSettings = false; + package = config.boot.kernelPackages.nvidiaPackages.vulkan_beta; + }; + opengl = { enable = true; driSupport = true; diff --git a/devices/ellaca/options.nix b/devices/ellaca/options.nix index 612b143..c9b6f07 100644 --- a/devices/ellaca/options.nix +++ b/devices/ellaca/options.nix @@ -3,7 +3,6 @@ withAudio = true; withBluetooth = true; - withNvidia = true; withNiri = true; withGnome = false; diff --git a/devices/inkvine/default.nix b/devices/inkvine/default.nix index 73f454c..d741e4c 100644 --- a/devices/inkvine/default.nix +++ b/devices/inkvine/default.nix @@ -49,7 +49,10 @@ }; swapDevices = [ { device = "/swap/swapfile"; } ]; - services.thermald.enable = true; + services = { + thermald.enable = true; + upower.enable = true; + }; hardware = { enableRedistributableFirmware = true; diff --git a/devices/inkvine/options.nix b/devices/inkvine/options.nix index 9f6b00f..2ffb2cd 100644 --- a/devices/inkvine/options.nix +++ b/devices/inkvine/options.nix @@ -3,7 +3,6 @@ withAudio = true; withBluetooth = true; - withNvidia = false; withNiri = true; withGnome = false; diff --git a/devices/pleniscenta/options.nix b/devices/pleniscenta/options.nix index 9f6b00f..2ffb2cd 100644 --- a/devices/pleniscenta/options.nix +++ b/devices/pleniscenta/options.nix @@ -3,7 +3,6 @@ withAudio = true; withBluetooth = true; - withNvidia = false; withNiri = true; withGnome = false; diff --git a/modules/audio/default.nix b/modules/audio/default.nix index 5655048..1bf3142 100644 --- a/modules/audio/default.nix +++ b/modules/audio/default.nix @@ -1,4 +1,6 @@ { lib, config, ... }: lib.mkIf(config.withAudio) { + security.rtkit.enable = true; + services.pipewire = { enable = true; alsa.enable = true; diff --git a/modules/default.nix b/modules/default.nix index 50e4216..62f1323 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -7,7 +7,6 @@ ./gnome ./home ./niri - ./nvidia ./virt ]; @@ -20,6 +19,9 @@ }; }; + environment.sessionVariables = { + NIXOS_OZONE_WL = "1"; + }; nix = { nixPath = ["nixpkgs=${inputs.nixpkgs}"]; @@ -74,15 +76,6 @@ # Needed for some features in nautilus such as auto-mounting and trash services.gvfs.enable = true; - security.rtkit.enable = true; - - services.upower = { - enable = true; - }; - - - environment.sessionVariables.NIXOS_OZONE_WL = "1"; - users.users.twoneis = { isNormalUser = true; description = "twoneis"; diff --git a/modules/nvidia/default.nix b/modules/nvidia/default.nix deleted file mode 100644 index 9b35c0d..0000000 --- a/modules/nvidia/default.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ lib, config, ... }: lib.mkIf (config.withNvidia) { - services.xserver.videoDrivers = ["nvidia"]; - - hardware.nvidia = { - modesetting.enable = true; - nvidiaSettings = false; - package = config.boot.kernelPackages.nvidiaPackages.vulkan_beta; - }; -} diff --git a/options.nix b/options.nix index ae5fdcd..8eed72f 100644 --- a/options.nix +++ b/options.nix @@ -4,7 +4,6 @@ withAudio = mkEnableOption "Enable support for audio"; withBluetooth = mkEnableOption "Enable bluetooth"; - withNvidia = mkEnableOption "Enable proprietary nvidia drivers"; withNiri = mkEnableOption "Enable niri compositor"; withGnome =mkEnableOption "Enable gnome DE";