From 452e600c5f1c63c6b3b8973c8d4bd31728e65242 Mon Sep 17 00:00:00 2001 From: blahai Date: Sun, 12 Jan 2025 21:11:42 +0200 Subject: [PATCH] Add artemis & fix novideo stuff --- modules/nixos/hardware/gpu/novideo.nix | 19 ++++--------------- systems/artemis/default.nix | 21 +++++++++++++++++++++ systems/artemis/hardware.nix | 17 +++++++++++++++++ systems/default.nix | 6 ++++++ 4 files changed, 48 insertions(+), 15 deletions(-) create mode 100644 systems/artemis/default.nix create mode 100644 systems/artemis/hardware.nix diff --git a/modules/nixos/hardware/gpu/novideo.nix b/modules/nixos/hardware/gpu/novideo.nix index 36d9d5a..aca079d 100644 --- a/modules/nixos/hardware/gpu/novideo.nix +++ b/modules/nixos/hardware/gpu/novideo.nix @@ -5,13 +5,7 @@ ... }: let inherit (config.olympus) device; - inherit - (lib.modules) - mkIf - mkMerge - mkDefault - ; - inherit (lib.validators) isWayland; + inherit (lib.modules) mkIf mkMerge mkDefault; isHybrid = device.gpu == "hybrid-nv"; in { @@ -21,8 +15,6 @@ in { services.xserver = mkMerge [ {videoDrivers = ["nvidia"];} - - # xorg settings ]; boot = { @@ -36,13 +28,10 @@ in { environment = { sessionVariables = mkMerge [ - {LIBVA_DRIVER_NAME = "nvidia";} - - (mkIf (isWayland config) { - # GBM_BACKEND = "nvidia-drm"; # breaks firefox apparently - + { + LIBVA_DRIVER_NAME = "nvidia"; WLR_DRM_DEVICES = mkDefault "/dev/dri/card1"; - }) + } ]; systemPackages = builtins.attrValues { diff --git a/systems/artemis/default.nix b/systems/artemis/default.nix new file mode 100644 index 0000000..bf03948 --- /dev/null +++ b/systems/artemis/default.nix @@ -0,0 +1,21 @@ +{ + imports = [ + ./hardware.nix + ]; + + olympus = { + device = { + cpu = "amd"; + gpu = "nvidia"; + }; + system = { + boot = { + loader = "systemd-boot"; + loadRecommendedModules = true; + enableKernelTweaks = true; + initrd.enableTweaks = true; + plymouth.enable = false; + }; + }; + }; +} diff --git a/systems/artemis/hardware.nix b/systems/artemis/hardware.nix new file mode 100644 index 0000000..8244442 --- /dev/null +++ b/systems/artemis/hardware.nix @@ -0,0 +1,17 @@ +{ + fileSystems = { + "/" = { + device = "/dev/disk/by-label/root"; + fsType = "ext4"; + options = ["auto"]; + }; + + "/boot" = { + device = "/dev/disk/by-label/BOOT"; + fsType = "vfat"; + options = ["fmask=0022" "dmask=0022"]; + }; + }; + + swapDevices = [{device = "/dev/disk/by-label/swap";}]; +} diff --git a/systems/default.nix b/systems/default.nix index 825c6da..2e56a15 100644 --- a/systems/default.nix +++ b/systems/default.nix @@ -56,6 +56,12 @@ in { graphical ]; + # Brothers desktop (will set up later) + artemis.modules = [ + desktop + graphical + ]; + # Other desktop (will set up later) aphrodite.modules = [ desktop