diff --git a/flake.lock b/flake.lock index 10eb2110..aefab60c 100644 --- a/flake.lock +++ b/flake.lock @@ -27,11 +27,11 @@ ] }, "locked": { - "lastModified": 1719577646, - "narHash": "sha256-k9Nww3TPmaf31v9Y1RyU3+x0qCczrsCS6iHYfMFZ/cQ=", + "lastModified": 1719664005, + "narHash": "sha256-mont9ptsywvCe7bd4Qgkdsb8+RBOrQ35Xj18PCYcrCs=", "owner": "nix-community", "repo": "flake-firefox-nightly", - "rev": "13e63fa1fca623b3ffde963f9b43cca904901d2b", + "rev": "8f2a5ece0ba53e9d6dfe3e72d887b2f93a140973", "type": "github" }, "original": { @@ -214,11 +214,11 @@ }, "hardware": { "locked": { - "lastModified": 1719552654, - "narHash": "sha256-PX3msbC5KdwCDnucGtir3qzlzv+1fuiU4tk17nljFIE=", + "lastModified": 1719681865, + "narHash": "sha256-Lp+l1IsREVbz8WM35OJYZz8sAH0XOjrZWUXVB5bJ2qg=", "owner": "nixos", "repo": "nixos-hardware", - "rev": "3980e7816c99d9e4da7a7b762e5b294055b73b2f", + "rev": "a59f00f5ac65b19382617ba00f360f8bc07ed3ac", "type": "github" }, "original": { @@ -256,11 +256,11 @@ ] }, "locked": { - "lastModified": 1719438532, - "narHash": "sha256-/Vmso2ZMoFE3M7d1MRsQ2K5sR8CVKnrM6t1ys9Xjpz4=", + "lastModified": 1719677234, + "narHash": "sha256-qO9WZsj/0E6zcK4Ht1y/iJ8XfwbBzq7xdqhBh44OP/M=", "owner": "nix-community", "repo": "home-manager", - "rev": "1a4f12ae0bda877ec4099b429cf439aad897d7e9", + "rev": "36317d4d38887f7629876b0e43c8d9593c5cc48d", "type": "github" }, "original": { @@ -347,11 +347,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1719254875, - "narHash": "sha256-ECni+IkwXjusHsm9Sexdtq8weAq/yUyt1TWIemXt3Ko=", + "lastModified": 1719506693, + "narHash": "sha256-C8e9S7RzshSdHB7L+v9I51af1gDM5unhJ2xO1ywxNH8=", "owner": "nixos", "repo": "nixpkgs", - "rev": "2893f56de08021cffd9b6b6dfc70fd9ccd51eb60", + "rev": "b2852eb9365c6de48ffb0dc2c9562591f652242a", "type": "github" }, "original": { diff --git a/home/core/hypr/default.nix b/home/core/hypr/default.nix index 2fc15693..6ee09ae4 100644 --- a/home/core/hypr/default.nix +++ b/home/core/hypr/default.nix @@ -3,19 +3,16 @@ config, pkgs, ... -}: -{ - imports = [ ../../extra/mako ]; +}: { + imports = [../../extra/mako]; - xdg.portal = - let - hyprland = config.wayland.windowManager.hyprland.package; - xdph = pkgs.xdg-desktop-portal-hyprland.override { inherit hyprland; }; - in - { - extraPortals = [ xdph ]; - configPackages = [ hyprland ]; - }; + xdg.portal = let + hyprland = config.wayland.windowManager.hyprland.package; + xdph = pkgs.xdg-desktop-portal-hyprland.override {inherit hyprland;}; + in { + extraPortals = [xdph]; + configPackages = [hyprland]; + }; home.packages = with pkgs; [ grimblast @@ -28,12 +25,11 @@ home.sessionVariables = { BROWSER = "firefox"; - MOZ_ENABLE_WAYLAND = 1; NIXOS_OZONE_WL = 1; SDL_VIDEODRIVER = "wayland"; QT_QPA_PLATFORM = "wayland"; + XDG_SESSION_TYPE = "wayland"; QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; - LIBSEAT_BACKEND = "logind"; }; wayland.windowManager.hyprland = { diff --git a/hosts/cnix/default.nix b/hosts/cnix/default.nix index 40c53506..38688f6a 100644 --- a/hosts/cnix/default.nix +++ b/hosts/cnix/default.nix @@ -23,6 +23,7 @@ in { "docker" "libvirtd" "network" + "gamemode" ]; }; diff --git a/hosts/cnix/hardware-configuration.nix b/hosts/cnix/hardware-configuration.nix index b61bbd23..6ff364b1 100644 --- a/hosts/cnix/hardware-configuration.nix +++ b/hosts/cnix/hardware-configuration.nix @@ -7,10 +7,8 @@ pkgs, modulesPath, ... -}: - -{ - imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; +}: { + imports = [(modulesPath + "/installer/scan/not-detected.nix")]; boot = { initrd = { @@ -21,17 +19,19 @@ "usbhid" "usb_storage" "sd_mod" + "amdgpu" ]; - kernelModules = [ ]; + kernelModules = []; }; - kernelModules = [ "kvm-amd" ]; - kernelPackages = pkgs.linuxPackages_latest; + kernelModules = ["kvm-amd"]; + kernelPackages = pkgs.linuxPackages_zen; consoleLogLevel = 3; kernelParams = [ "quiet" "splash" + "amdgpu.ppfeaturemask=0xffffffff" ]; - extraModulePackages = [ ]; + extraModulePackages = []; }; fileSystems."/" = { @@ -50,7 +50,7 @@ ]; }; - swapDevices = [ ]; + swapDevices = []; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's diff --git a/hosts/core/default.nix b/hosts/core/default.nix index 341ec6b8..4dad8b72 100644 --- a/hosts/core/default.nix +++ b/hosts/core/default.nix @@ -4,13 +4,12 @@ outputs, pkgs, ... -}: -{ +}: { imports = [ inputs.home-manager.nixosModules.home-manager ./adb.nix ./zsh.nix - ./adampad-pkgs.nix + ./cnix-pkgs.nix ./fonts.nix ]; home-manager = { @@ -20,7 +19,7 @@ }; }; nixpkgs = { - overlays = [ ]; + overlays = []; config = { allowUnfree = true; }; @@ -54,6 +53,7 @@ pkgs.xdg-utils pkgs.xdg-user-dirs pkgs.udiskie + pkgs.wlroots ]; }; } diff --git a/hosts/extra/steam/default.nix b/hosts/extra/steam/default.nix index 6d919295..cd8a30c2 100644 --- a/hosts/extra/steam/default.nix +++ b/hosts/extra/steam/default.nix @@ -1,23 +1,52 @@ -{ pkgs, ... }: -{ - programs.steam = { - enable = true; - package = pkgs.steam.override { - extraPkgs = - pkgs: with pkgs; [ - xorg.libXcursor - xorg.libXi - xorg.libXinerama - xorg.libXScrnSaver - libpng - libpulseaudio - libvorbis - stdenv.cc.cc.lib - libkrb5 - keyutils - gamescope - mangohud - ]; +{pkgs, ...}: { + programs = { + steam = { + enable = true; + extraCompatPackages = [ + pkgs.proton-ge-bin + pkgs.vkd3d-proton + ]; + gamescopeSession.enable = true; + package = pkgs.steam.override { + extraPkgs = pkgs: + with pkgs; [ + xorg.libXcursor + xorg.libXi + xorg.libXinerama + xorg.libXScrnSaver + libpng + libpulseaudio + libvorbis + stdenv.cc.cc.lib + libkrb5 + keyutils + mangohud + SDL2 + SDL2_image + ]; + }; + }; + gamescope = { + enable = true; + capSysNice = true; + }; + gamemode = { + enable = true; + settings = { + general = { + renice = 10; + }; + gpu = { + apply_gpu_optimisations = "accept-responsibility"; + gpu_device = 1; + amd_performance_level = "high"; + }; + custom = { + start = "${pkgs.libnotify}/bin/notify-send 'GameMode started'"; + end = "${pkgs.libnotify}/bin/notify-send 'GameMode ended'"; + }; + }; }; }; + environment.variables.AMD_VULKAN_ICD = "RADV"; } diff --git a/hosts/hardware/cnix.nix b/hosts/hardware/cnix.nix index 3fc02a75..5115072e 100644 --- a/hosts/hardware/cnix.nix +++ b/hosts/hardware/cnix.nix @@ -4,9 +4,7 @@ config, inputs, ... -}: let - _nvtop = pkgs.nvtopPackages.amd; -in { +}: { zramSwap.enable = true; security.rtkit.enable = true; @@ -21,12 +19,14 @@ in { }; graphics = { enable = true; + enable32Bit = true; extraPackages = with pkgs; [ - _nvtop lact libva vaapiVdpau libvdpau-va-gl + vkd3d + vkd3d-proton ]; }; };