diff --git a/flake.lock b/flake.lock index df275aa..be9a746 100644 --- a/flake.lock +++ b/flake.lock @@ -358,6 +358,44 @@ "type": "github" } }, + "millennium": { + "inputs": { + "millennium-src": "millennium-src", + "nixpkgs": "nixpkgs" + }, + "locked": { + "dir": "packages/nix", + "lastModified": 1784860807, + "narHash": "sha256-nznQFS9H8er9bTwxKG4LSa2D0lGsxIPUqDuWa1rbJkA=", + "owner": "SteamClientHomebrew", + "repo": "Millennium", + "rev": "266e41ea8924c41e51145ae986a9bdf68f9415d9", + "type": "github" + }, + "original": { + "dir": "packages/nix", + "owner": "SteamClientHomebrew", + "repo": "Millennium", + "type": "github" + } + }, + "millennium-src": { + "flake": false, + "locked": { + "lastModified": 1783268941, + "narHash": "sha256-MJLJ0I48HXgfOpISTAbDMYMUdWj9A6M+jGQz4uAvwyw=", + "owner": "SteamClientHomebrew", + "repo": "Millennium", + "rev": "f37f05bdbd4727d873a1ad83ce72d062ef9a0c48", + "type": "github" + }, + "original": { + "owner": "SteamClientHomebrew", + "repo": "Millennium", + "rev": "f37f05bdbd4727d873a1ad83ce72d062ef9a0c48", + "type": "github" + } + }, "niri": { "inputs": { "niri-stable": "niri-stable", @@ -422,7 +460,7 @@ "cachyos-kernel-patches": "cachyos-kernel-patches", "flake-compat": "flake-compat", "flake-parts": "flake-parts", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs_2" }, "locked": { "lastModified": 1785004507, @@ -463,7 +501,7 @@ "inputs": { "flake-compat": "flake-compat_2", "flake-parts": "flake-parts_2", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_3", "nixpkgs-nixcord": "nixpkgs-nixcord" }, "locked": { @@ -502,17 +540,17 @@ }, "nixpkgs": { "locked": { - "lastModified": 1784966893, - "narHash": "sha256-WCrs/9bdH+gzSZit3UrSa4sWdyZ8+uC5x5bymPgBHMg=", - "owner": "NixOS", + "lastModified": 1781577229, + "narHash": "sha256-lrp67w8AulE9Ks53n27I45ADSzbOCn4H+CNW1Ck8B+8=", + "owner": "nixos", "repo": "nixpkgs", - "rev": "328e42b4f861ae88cf3643962ed5c4ff918f2ba8", + "rev": "567a49d1913ce81ac6e9582e3553dd90a955875f", "type": "github" }, "original": { - "owner": "NixOS", - "ref": "nixos-unstable-small", + "owner": "nixos", "repo": "nixpkgs", + "rev": "567a49d1913ce81ac6e9582e3553dd90a955875f", "type": "github" } }, @@ -579,6 +617,22 @@ } }, "nixpkgs_2": { + "locked": { + "lastModified": 1784966893, + "narHash": "sha256-WCrs/9bdH+gzSZit3UrSa4sWdyZ8+uC5x5bymPgBHMg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "328e42b4f861ae88cf3643962ed5c4ff918f2ba8", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable-small", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { "locked": { "lastModified": 1784432872, "narHash": "sha256-n3gKTBIV4ZA5VQpUakffBe3KGu4+mhPoA34rrqS0GkA=", @@ -594,7 +648,7 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_4": { "locked": { "lastModified": 1784796856, "narHash": "sha256-wWFrV5/Qbm+lyt5x20E/bSbfJiGKMo4RCxZV8cl/WZI=", @@ -610,7 +664,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_5": { "locked": { "lastModified": 1784007870, "narHash": "sha256-djcLt/JJphyNt4eDY9XTly+/WbCK5lqWq9lSgCmJkkQ=", @@ -696,7 +750,7 @@ "inputs": { "flake-parts": "flake-parts_4", "git-hooks-nix": "git-hooks-nix", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_5", "treefmt-nix": "treefmt-nix" }, "locked": { @@ -732,12 +786,13 @@ "inputs": { "disko": "disko", "home-manager": "home-manager", + "millennium": "millennium", "niri": "niri", "nix-cachyos-kernel": "nix-cachyos-kernel", "nix-vscode-extensions": "nix-vscode-extensions", "nixcord": "nixcord", "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_4", "noctalia": "noctalia", "nur": "nur", "pedantix": "pedantix", diff --git a/flake.nix b/flake.nix index 7e0e690..be9da71 100644 --- a/flake.nix +++ b/flake.nix @@ -10,6 +10,7 @@ inputs.nixpkgs.follows = "nixpkgs"; url = "github:nix-community/home-manager"; }; + millennium.url = "github:SteamClientHomebrew/Millennium?dir=packages/nix"; niri = { inputs.nixpkgs.follows = "nixpkgs"; url = "github:sodiboo/niri-flake"; diff --git a/home/desktop/niri.nix b/home/desktop/niri.nix index 807e60f..e5a517d 100644 --- a/home/desktop/niri.nix +++ b/home/desktop/niri.nix @@ -1,6 +1,7 @@ { config, lib, + pkgs, ... }: { options.modules.desktop.niri.enable = lib.mkOption { @@ -12,15 +13,16 @@ config = lib.mkIf config.modules.desktop.niri.enable { programs.niri.settings = { environment = { + ELECTRON_OZONE_PLATFORM_HINT = "auto"; NIXOS_OZONE_WL = "1"; + QT_QPA_PLATFORM = "wayland"; QT_QPA_PLATFORMTHEME = "qt6ct"; + QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; }; - hotkey-overlay = { hide-not-bound = true; skip-at-startup = true; }; - input = { keyboard = { numlock = true; @@ -36,7 +38,6 @@ tap = true; }; }; - layer-rules = [ { matches = [{namespace = "^noctalia-wallpaper*";}]; @@ -47,7 +48,6 @@ matches = [{namespace = "^notification$";}]; } ]; - layout = { default-column-width.proportion = 1.0; empty-workspace-above-first = true; @@ -63,8 +63,10 @@ top = 8; }; }; - prefer-no-csd = true; + spawn-at-startup = [ + {command = ["${pkgs.xwayland-satellite}/bin/xwayland-satellite"];} + ]; }; }; } diff --git a/home/desktop/xdg.nix b/home/desktop/xdg.nix index c72a38a..f62eee5 100644 --- a/home/desktop/xdg.nix +++ b/home/desktop/xdg.nix @@ -16,6 +16,7 @@ config.common.default = ["gtk"]; enable = true; extraPortals = [pkgs.xdg-desktop-portal-gtk]; + xdgOpenUsePortal = true; }; }; }; diff --git a/modules/hardware.nix b/modules/hardware.nix index faf5162..a032c3c 100644 --- a/modules/hardware.nix +++ b/modules/hardware.nix @@ -4,7 +4,12 @@ ... }: { config = lib.mkMerge [ - {hardware.graphics.enable = true;} + { + hardware.graphics = { + enable = true; + enable32Bit = true; + }; + } (lib.mkIf config.modules.desktop.enable { hardware.bluetooth.enable = true; }) diff --git a/modules/steam.nix b/modules/steam.nix new file mode 100644 index 0000000..4603749 --- /dev/null +++ b/modules/steam.nix @@ -0,0 +1,42 @@ +{ + config, + lib, + pkgs, + inputs, + username, + ... +}: { + options.modules.apps.steam.enable = lib.mkOption { + default = config.modules.desktop.enable; + description = "Whether to enable Steam (with Millennium)."; + type = lib.types.bool; + }; + + config = lib.mkIf config.modules.apps.steam.enable { + environment.sessionVariables = { + PROTON_ENABLE_WAYLAND = "1"; + PROTON_USE_WAYLAND = "1"; + SDL_VIDEODRIVER = "wayland,x11"; + SDL_VIDEO_DRIVER = "wayland,x11"; + }; + programs = { + gamemode.enable = true; + gamescope = { + enable = true; + args = [ + "--rt" + "--expose-wayland" + ]; + capSysNice = false; + }; + steam = { + enable = true; + package = inputs.millennium.packages.${pkgs.stdenv.hostPlatform.system}.millennium-steam; + extraCompatPackages = [pkgs.proton-ge-bin]; + gamescopeSession.enable = true; + protontricks.enable = true; + }; + }; + users.users.${username}.extraGroups = ["gamemode"]; + }; +}