diff --git a/flake.lock b/flake.lock index bd07fb4..5f2d2b8 100644 --- a/flake.lock +++ b/flake.lock @@ -29,11 +29,11 @@ ] }, "locked": { - "lastModified": 1712136515, - "narHash": "sha256-LpjQJYC24S5P5XhJsZX6HqsQT1pohcFzM6N42I6qo/U=", + "lastModified": 1713259062, + "narHash": "sha256-WTO84hUL8IlNuHDK2yOCeJ38EewFzGt5E0kzBjNWxa8=", "owner": "Kirottu", "repo": "anyrun", - "rev": "be6728884d543665e7bd137bbef62dc1d04a210b", + "rev": "f9d30e34fa4ccb2797c6becec37e8bcff6585d39", "type": "github" }, "original": { @@ -95,11 +95,11 @@ ] }, "locked": { - "lastModified": 1711099426, - "narHash": "sha256-HzpgM/wc3aqpnHJJ2oDqPBkNsqWbW0WfWUO8lKu8nGk=", + "lastModified": 1713532798, + "narHash": "sha256-wtBhsdMJA3Wa32Wtm1eeo84GejtI43pMrFrmwLXrsEc=", "owner": "numtide", "repo": "devshell", - "rev": "2d45b54ca4a183f2fdcf4b19c895b64fbf620ee8", + "rev": "12e914740a25ea1891ec619bb53cf5e6ca922e40", "type": "github" }, "original": { @@ -116,11 +116,11 @@ "rust-analyzer-src": "rust-analyzer-src" }, "locked": { - "lastModified": 1712903033, - "narHash": "sha256-KcvsEm0h1mIwBHFAzWFBjGihnbf2fxpAaXOdVbUfAI4=", + "lastModified": 1713680591, + "narHash": "sha256-3pbv7UgAgetwz9YdjzIT/lZ6Rgj6wj6MR4mphBLyDjU=", "owner": "nix-community", "repo": "fenix", - "rev": "c739f83545e625227f4d0af7fe2a71e69931fa4c", + "rev": "19aaa94a73cc670a4d87e84f0909966cd8f8cd79", "type": "github" }, "original": { @@ -320,11 +320,11 @@ ] }, "locked": { - "lastModified": 1706830856, - "narHash": "sha256-a0NYyp+h9hlb7ddVz4LUn1vT/PLwqfrWYcHMvFB1xYg=", + "lastModified": 1712014858, + "narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "b253292d9c0a5ead9bc98c4e9a26c6312e27d69f", + "rev": "9126214d0a59633752a136528f5f3b9aa8565b7d", "type": "github" }, "original": { @@ -356,11 +356,11 @@ "systems": "systems_2" }, "locked": { - "lastModified": 1701680307, - "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", "owner": "numtide", "repo": "flake-utils", - "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", "type": "github" }, "original": { @@ -522,11 +522,11 @@ ] }, "locked": { - "lastModified": 1712759992, - "narHash": "sha256-2APpO3ZW4idlgtlb8hB04u/rmIcKA8O7pYqxF66xbNY=", + "lastModified": 1713682182, + "narHash": "sha256-2RSqVmQMFmn6OjQ21SXnWC+HuSeqDLWLftRv/ZhEDZE=", "owner": "nix-community", "repo": "home-manager", - "rev": "31357486b0ef6f4e161e002b6893eeb4fafc3ca9", + "rev": "4cec20dbf5c0a716115745ae32531e34816ecbbe", "type": "github" }, "original": { @@ -543,11 +543,11 @@ ] }, "locked": { - "lastModified": 1712759992, - "narHash": "sha256-2APpO3ZW4idlgtlb8hB04u/rmIcKA8O7pYqxF66xbNY=", + "lastModified": 1713566308, + "narHash": "sha256-7Y91t8pheIzjJveUMAPyeh5NOq5F49Nq4Hl2532QpJs=", "owner": "nix-community", "repo": "home-manager", - "rev": "31357486b0ef6f4e161e002b6893eeb4fafc3ca9", + "rev": "057117a401a34259c9615ce62218aea7afdee4d3", "type": "github" }, "original": { @@ -564,11 +564,11 @@ ] }, "locked": { - "lastModified": 1708591310, - "narHash": "sha256-8mQGVs8JccWTnORgoLOTh9zvf6Np+x2JzhIc+LDcJ9s=", + "lastModified": 1712759992, + "narHash": "sha256-2APpO3ZW4idlgtlb8hB04u/rmIcKA8O7pYqxF66xbNY=", "owner": "nix-community", "repo": "home-manager", - "rev": "0e0e9669547e45ea6cca2de4044c1a384fd0fe55", + "rev": "31357486b0ef6f4e161e002b6893eeb4fafc3ca9", "type": "github" }, "original": { @@ -577,54 +577,20 @@ "type": "github" } }, - "hyprcursor": { - "inputs": { - "hyprlang": [ - "split-monitor-workspaces", - "hyprland", - "hyprlang" - ], - "nixpkgs": [ - "split-monitor-workspaces", - "hyprland", - "nixpkgs" - ], - "systems": [ - "split-monitor-workspaces", - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1712434681, - "narHash": "sha256-qwmR2p1oc48Bj7gUDvb1oGL19Rjs2PmEmk4ChV01A5o=", - "owner": "hyprwm", - "repo": "hyprcursor", - "rev": "818d8c4b69e0997483d60b75f701fe14b561a7a3", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprcursor", - "type": "github" - } - }, "hyprland": { "inputs": { - "hyprcursor": "hyprcursor", "hyprland-protocols": "hyprland-protocols", - "hyprlang": "hyprlang", "nixpkgs": "nixpkgs_6", - "systems": "systems_6", + "systems": "systems_7", "wlroots": "wlroots", "xdph": "xdph" }, "locked": { - "lastModified": 1712969717, - "narHash": "sha256-vAtfM8lHOLjuHh/CTzSFUaCJp0qlAWttWimin3KoDXM=", + "lastModified": 1694029537, + "narHash": "sha256-TxVjVBkLlVhJ91gCyHfhy0FaJ9Din6/NlO+eAK3QpG4=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "582d6233c802327fea45a14d146e7cbab5fe4b1e", + "rev": "8c83852704ad8d78b839bd532d73b3b9e44724b9", "type": "github" }, "original": { @@ -660,44 +626,17 @@ "type": "github" } }, - "hyprlang": { - "inputs": { - "nixpkgs": [ - "split-monitor-workspaces", - "hyprland", - "nixpkgs" - ], - "systems": [ - "split-monitor-workspaces", - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1711671891, - "narHash": "sha256-C/Wwsy/RLxHP1axFFl+AnwJRWfd8gxDKKoa8nt8Qk3c=", - "owner": "hyprwm", - "repo": "hyprlang", - "rev": "c1402612146ba06606ebf64963a02bc1efe11e74", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprlang", - "type": "github" - } - }, "lib-aggregate": { "inputs": { "flake-utils": "flake-utils_2", "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1712491724, - "narHash": "sha256-E5EcBzf/zaR3hD8g1CDtqqwXXebSWtqOvoaR+LDjTME=", + "lastModified": 1713105314, + "narHash": "sha256-X3URKbcgIy4UaQGrsy3DmY5x+fePQ5IYaa76YewoUE0=", "owner": "nix-community", "repo": "lib-aggregate", - "rev": "2737d0204685c3274390229a09eb8f7eaa1a9e89", + "rev": "f347ed9a1cab12c27541ed4d173e2f2d5c9bc0bb", "type": "github" }, "original": { @@ -716,11 +655,11 @@ }, "locked": { "dir": "contrib", - "lastModified": 1712963920, - "narHash": "sha256-5Rh+bUrpeQLYtvnFlMFmUFkV/H6b+I22Bei8oNa+dBw=", + "lastModified": 1713650988, + "narHash": "sha256-YAbwiZkKxpbM+fdTVcXmp49XtHMDYQNng/wc9L85eZs=", "owner": "neovim", "repo": "neovim", - "rev": "66220d164a40791a5131d4660e6ffbee431070d5", + "rev": "9e1bbb9813e0ea4e37f6325fe00e8f43617ef912", "type": "github" }, "original": { @@ -739,11 +678,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1712966609, - "narHash": "sha256-XkNBbh8x1niHtVILUiNlGJHN9N2JkY+a8MR8w0/mhrI=", + "lastModified": 1713657840, + "narHash": "sha256-O99sOWro/5J4qWyIFZ3vEw+abLnzOv4jrfA7FaRoyrI=", "owner": "nix-community", "repo": "neovim-nightly-overlay", - "rev": "c83e531b908c1fe71a95830bbad6db8a1e5b5b6b", + "rev": "3ad9c1eae733e9ba5cc73c6833e3d62dbc12df9e", "type": "github" }, "original": { @@ -760,11 +699,11 @@ ] }, "locked": { - "lastModified": 1711763326, - "narHash": "sha256-sXcesZWKXFlEQ8oyGHnfk4xc9f2Ip0X/+YZOq3sKviI=", + "lastModified": 1713543876, + "narHash": "sha256-olEWxacm1xZhAtpq+ZkEyQgR4zgfE7ddpNtZNvubi3g=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "36524adc31566655f2f4d55ad6b875fb5c1a4083", + "rev": "9e7c20ffd056e406ddd0276ee9d89f09c5e5f4ed", "type": "github" }, "original": { @@ -844,11 +783,11 @@ ] }, "locked": { - "lastModified": 1708597894, - "narHash": "sha256-KxpKOBDGPJ76k37vLukYHp/wd7U4DoUVIvy8atHfy/k=", + "lastModified": 1709985524, + "narHash": "sha256-29ZwMJBErP41ZPis1MskhdheDRgt+reDuf53jONSkc8=", "owner": "nixpak", "repo": "nixpak", - "rev": "535dd408c4b19f407bc22e42eb32ccb9256e5865", + "rev": "b0862a125da8fe5d179633d6cc7aed57d5316871", "type": "github" }, "original": { @@ -875,11 +814,11 @@ }, "nixpkgs-lib": { "locked": { - "lastModified": 1712450863, - "narHash": "sha256-K6IkdtMtq9xktmYPj0uaYc8NsIqHuaAoRBaMgu9Fvrw=", + "lastModified": 1713055793, + "narHash": "sha256-vIrZQykYW32RnlI2lT/gCcB59BOIqqrAmPirBdiirrc=", "owner": "nix-community", "repo": "nixpkgs.lib", - "rev": "3c62b6a12571c9a7f65ab037173ee153d539905f", + "rev": "361d8a4f443bbfab20bd6d222f9022b8c6665906", "type": "github" }, "original": { @@ -914,11 +853,11 @@ "nixpkgs": "nixpkgs_5" }, "locked": { - "lastModified": 1712942143, - "narHash": "sha256-pTpvq5EXPD9noOBkmTEa7mkwMpeda8+8u3anmjxhRAI=", + "lastModified": 1713691001, + "narHash": "sha256-yq3AR19+XQoBhN+nY+VEfuCEnllexcnjtuFxx7Q92lY=", "owner": "nix-community", "repo": "nixpkgs-wayland", - "rev": "8ed6e0db00db83e5a598afa6cdf32c9b41f083bd", + "rev": "04fd0059bcf112c76ed7e69837b5dc19bc212f14", "type": "github" }, "original": { @@ -929,11 +868,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1712849433, - "narHash": "sha256-flQtf/ZPJgkLY/So3Fd+dGilw2DKIsiwgMEn7BbBHL0=", + "lastModified": 1713596654, + "narHash": "sha256-LJbHQQ5aX1LVth2ST+Kkse/DRzgxlVhTL1rxthvyhZc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "f173d0881eff3b21ebb29a2ef8bedbc106c86ea5", + "rev": "fd16bb6d3bcca96039b11aa52038fafeb6e4f4be", "type": "github" }, "original": { @@ -945,11 +884,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1712791164, - "narHash": "sha256-3sbWO1mbpWsLepZGbWaMovSO7ndZeFqDSdX0hZ9nVyw=", + "lastModified": 1713537308, + "narHash": "sha256-XtTSSIB2DA6tOv+l0FhvfDMiyCmhoRbNB+0SeInZkbk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1042fd8b148a9105f3c0aca3a6177fd1d9360ba5", + "rev": "5c24cf2f0a12ad855f444c30b2421d044120c66f", "type": "github" }, "original": { @@ -977,11 +916,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1712791164, - "narHash": "sha256-3sbWO1mbpWsLepZGbWaMovSO7ndZeFqDSdX0hZ9nVyw=", + "lastModified": 1713537308, + "narHash": "sha256-XtTSSIB2DA6tOv+l0FhvfDMiyCmhoRbNB+0SeInZkbk=", "owner": "nixos", "repo": "nixpkgs", - "rev": "1042fd8b148a9105f3c0aca3a6177fd1d9360ba5", + "rev": "5c24cf2f0a12ad855f444c30b2421d044120c66f", "type": "github" }, "original": { @@ -993,11 +932,11 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1712439257, - "narHash": "sha256-aSpiNepFOMk9932HOax0XwNxbA38GOUVOiXfUVPOrck=", + "lastModified": 1693158576, + "narHash": "sha256-aRTTXkYvhXosGx535iAFUaoFboUrZSYb1Ooih/auGp0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ff0dbd94265ac470dda06a657d5fe49de93b4599", + "rev": "a999c1cc0c9eb2095729d5aa03e0d8f7ed256780", "type": "github" }, "original": { @@ -1020,11 +959,11 @@ "pre-commit-hooks": "pre-commit-hooks" }, "locked": { - "lastModified": 1713008785, - "narHash": "sha256-fblaj6/83OQYrD1UHBjLapxjGQaC4edouX4g2X8CVhk=", + "lastModified": 1713652174, + "narHash": "sha256-/eCtK6kZIMpOx3qXWP9SJC3BZ8Cb0hth5xftb9Qw0L0=", "owner": "nix-community", "repo": "nixvim", - "rev": "21c233919d747d3375e3a173b65f7f26ccf01256", + "rev": "9a24838aac6b55a865dd30f1b5885ac4f62c78e1", "type": "github" }, "original": { @@ -1035,11 +974,11 @@ }, "nur": { "locked": { - "lastModified": 1712918680, - "narHash": "sha256-luYW6W6PQ491E/fIaHwVNhjpgoEZYjyiotWr7p+mtTY=", + "lastModified": 1713692778, + "narHash": "sha256-F5rAsavZtY2epAl4DAz2KmYWii4gQ39uB8sqrLSWuO8=", "owner": "nix-community", "repo": "NUR", - "rev": "67d041f54e20ba1abf70069400e6637a3655b9b5", + "rev": "5edf97f8cb76f16b6d7f3a53cfac7d2e3f40c510", "type": "github" }, "original": { @@ -1094,11 +1033,11 @@ "rust-analyzer-src": { "flake": false, "locked": { - "lastModified": 1712818880, - "narHash": "sha256-VDxsvgj/bNypHq48tQWtc3VRbWvzlFjzKf9ZZIVO10Y=", + "lastModified": 1713628977, + "narHash": "sha256-iN5QUlUq527lswmBC+RopfXdu6Xx7mmTaBSH2l59FtM=", "owner": "rust-lang", "repo": "rust-analyzer", - "rev": "657b33b0cb9bd49085202e91ad5b4676532c9140", + "rev": "55d9a533b309119c8acd13061581b43ae8840823", "type": "github" }, "original": { @@ -1117,14 +1056,15 @@ "nixpkgs": [ "nixpkgs" ], - "searx-randomizer": "searx-randomizer" + "searx-randomizer": "searx-randomizer", + "systems": "systems_6" }, "locked": { - "lastModified": 1710502118, - "narHash": "sha256-kPzvCwGVuLlPDVRD35dMnudWPpEzRXfU/9DHsG12PaY=", + "lastModified": 1713551575, + "narHash": "sha256-6XVKzjdTgPreYApjWMBEWr8ew6IaM1dLDsJNNEdeOFs=", "owner": "schizofox", "repo": "schizofox", - "rev": "8dde2033a6f448c48a48d4d0aeb22bf2da840b7d", + "rev": "6e006ab97adcf1492d9080793d7abc787eb5f738", "type": "github" }, "original": { @@ -1162,11 +1102,11 @@ "nix-filter": "nix-filter" }, "locked": { - "lastModified": 1712527107, - "narHash": "sha256-stmJqifOWf8oXxKwHvCo3RaVapXSk1n/+Sf9nKNENEA=", + "lastModified": 1713693088, + "narHash": "sha256-42x8C984A46FHybQh6+RTbfUDuOz0iTa+HaAUNLA06U=", "owner": "Duckonaut", "repo": "split-monitor-workspaces", - "rev": "c5696000777f6586aaa255bd0a9b0627d5da911f", + "rev": "65d4cb11a27f8c0e6aa976e5d1c17d9086469938", "type": "github" }, "original": { @@ -1265,6 +1205,21 @@ "type": "github" } }, + "systems_7": { + "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } + }, "treefmt-nix": { "inputs": { "nixpkgs": [ @@ -1290,18 +1245,20 @@ "wlroots": { "flake": false, "locked": { - "lastModified": 1712935342, - "narHash": "sha256-zzIbTFNFd/as42jyGx23fil2uBDYYv+8GA5JmRq5y9c=", - "owner": "hyprwm", - "repo": "wlroots-hyprland", - "rev": "62eeffbe233d199f520a5755c344e85f8eab7940", - "type": "github" + "host": "gitlab.freedesktop.org", + "lastModified": 1692976565, + "narHash": "sha256-eBKkG7tMxg92NskEn8dHRFY245JwjirWRoOZzW6DnUw=", + "owner": "wlroots", + "repo": "wlroots", + "rev": "717ded9bb0191ea31bf4368be32e7a15fe1b8294", + "type": "gitlab" }, "original": { - "owner": "hyprwm", - "repo": "wlroots-hyprland", - "rev": "62eeffbe233d199f520a5755c344e85f8eab7940", - "type": "github" + "host": "gitlab.freedesktop.org", + "owner": "wlroots", + "repo": "wlroots", + "rev": "717ded9bb0191ea31bf4368be32e7a15fe1b8294", + "type": "gitlab" } }, "xdph": { @@ -1311,11 +1268,6 @@ "hyprland", "hyprland-protocols" ], - "hyprlang": [ - "split-monitor-workspaces", - "hyprland", - "hyprlang" - ], "nixpkgs": [ "split-monitor-workspaces", "hyprland", @@ -1328,11 +1280,11 @@ ] }, "locked": { - "lastModified": 1709299639, - "narHash": "sha256-jYqJM5khksLIbqSxCLUUcqEgI+O2LdlSlcMEBs39CAU=", + "lastModified": 1691841170, + "narHash": "sha256-RCTm1/MVWYPnReMgyp7tr2ogGYo/pvw38jZaFwemgPU=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "2d2fb547178ec025da643db57d40a971507b82fe", + "rev": "57a3a41ba6b358109e4fc25c6a4706b5f7d93c6b", "type": "github" }, "original": { diff --git a/hosts/lars/default.nix b/hosts/lars/default.nix index 39987bb..fc0fb51 100644 --- a/hosts/lars/default.nix +++ b/hosts/lars/default.nix @@ -3,6 +3,7 @@ imports = [ ./hyprland.nix ./programs.nix + # ./xwayland.nix ]; nixpkgs.config.allowUnfree = true; @@ -119,6 +120,14 @@ # services.flatpak.enable = true; services = { twingate.enable = true; + pcscd.enable = true; + }; + + security.pam.yubico = { + enable = true; + debug = false; + mode = "challenge-response"; + id = [ "28067815" "28067816" ]; }; # SSH AGENT diff --git a/hosts/lars/kronos/configuration.nix b/hosts/lars/kronos/configuration.nix index 01cc83c..40e90e7 100644 --- a/hosts/lars/kronos/configuration.nix +++ b/hosts/lars/kronos/configuration.nix @@ -18,6 +18,11 @@ enable = true; gamescope = true; }; + + minecraft = { + enable = true; + wayland = true; + }; }; hyprland = { @@ -37,4 +42,5 @@ }; services.getty.autologinUser = "lars"; + services.flatpak.enable = true; } diff --git a/hosts/lars/kronos/profile.nix b/hosts/lars/kronos/profile.nix index e567018..3e07756 100644 --- a/hosts/lars/kronos/profile.nix +++ b/hosts/lars/kronos/profile.nix @@ -3,7 +3,7 @@ _: { ../../../options/boot/grub-boot.nix ../../../options/desktop/fonts.nix ../../../options/common/networking.nix - ../../../options/common/gpu/nvidia.nix + ../../../options/common/gpu/nvidia_wayland.nix ../../../options/common/pin-registry.nix ../../../options/common/preserve-system.nix ../../../options/common/bluetooth.nix diff --git a/hosts/lars/kronos/programs.nix b/hosts/lars/kronos/programs.nix index 8877ef2..3341de5 100644 --- a/hosts/lars/kronos/programs.nix +++ b/hosts/lars/kronos/programs.nix @@ -1,41 +1,6 @@ -{ config, inputs, pkgs, lib, ... }: -let - username = config.modules.other.system.username; +{ config, lib, pkgs, ... }: - # Fetch the GLFW with Wayland patches for Minecraft - customGLFW = let - mcWaylandPatchRepo = pkgs.fetchFromGitHub { - owner = "Admicos"; - repo = "minecraft-wayland"; - rev = "370ce5b95e3ae9bc4618fb45113bc641fbb13867"; - sha256 = "sha256-RPRg6Gd7N8yyb305V607NTC1kUzvyKiWsh6QlfHW+JE="; - }; - mcWaylandPatches = map (name: "${mcWaylandPatchRepo}/${name}") - (lib.naturalSort (builtins.attrNames (lib.filterAttrs - (name: type: - type == "regular" && lib.hasSuffix ".patch" name) - (builtins.readDir mcWaylandPatchRepo)))); - in pkgs.glfw.overrideAttrs (previousAttrs: { - patches = previousAttrs.patches ++ mcWaylandPatches; - buildInputs = previousAttrs.buildInputs ++ [ pkgs.wayland ]; - }); - - # Minecraft launcher with the custom GLFW - minecraftPrismLauncher = pkgs.prismlauncher.override { - glfw = customGLFW; - }; - -in { - home-manager.users.${username} = { - home.packages = let - fenix = inputs.fenix.packages.${pkgs.system}; - - in with pkgs; [ - ]; - }; - - # System-wide installation of Minecraft PrismLauncher - environment.systemPackages = [ - minecraftPrismLauncher - ]; +{ + environment.systemPackages = with pkgs; [ + ]; } diff --git a/hosts/lars/programs.nix b/hosts/lars/programs.nix index 2d52b7f..ed78f81 100644 --- a/hosts/lars/programs.nix +++ b/hosts/lars/programs.nix @@ -64,6 +64,7 @@ in { yubioath-flutter fzf tldr + feh ]; }; } diff --git a/hosts/lars/xwayland.nix b/hosts/lars/xwayland.nix new file mode 100644 index 0000000..847aafd --- /dev/null +++ b/hosts/lars/xwayland.nix @@ -0,0 +1,53 @@ +{ inputs, outputs, lib, pkgs, pkg-config, ... }: + +let +newer_xwayland = self: super: { + xwayland = super.xwayland.overrideAttrs (prev: { + version = "23.2.6-HEAD"; + src = pkgs.fetchFromGitLab { + domain = "gitlab.freedesktop.org"; + owner = "xorg"; + repo = "xserver"; + rev = "43f47e8e6597f06cf2082514c10a71965fa6d3c8"; + sha256 = "93DzgA8nXVodDvllCOIuTtOYWpUdXwzPIGpi2SUSNqo="; + + }; + mesonFlags = [ + # (lib.mesonBool "xwayland_eglstream" true) + (lib.mesonBool "xcsecurity" true) + # (lib.mesonOption "default_font_path" defaultFontPath) + # (lib.mesonOption "xkb_bin_dir" "${xkbcomp}/bin") + # (lib.mesonOption "xkb_dir" "${xkeyboard_config}/etc/X11/xkb") + # (lib.mesonOption "xkb_output_dir" "${placeholder "out"}/share/X11/xkb/compiled") + # (lib.mesonBool "libunwind" withLibunwind) + ]; + }); +}; + +newer_xorgproto = self: super: { + xorg.xorgproto = super.xorg.xorgproto.overrideAttrs (prev: { + pname = "xorgproto"; + version = "2023.2"; + builder = ./builder.sh; + src = pkgs.fetchurl { + url = "mirror://xorg/individual/proto/xorgproto-2023.2.tar.xz"; + sha256 = "0b4c27aq25w1fccks49p020avf9jzh75kaq5qwnww51bp1yvq7xn"; + }; + hardeningDisable = [ "bindnow" "relro" ]; + strictDeps = true; + nativeBuildInputs = [ pkg-config pkgs.python3 ]; + buildInputs = [ pkgs.libXt ]; + # passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; + meta = { + pkgConfigModules = [ "applewmproto" "bigreqsproto" "compositeproto" "damageproto" "dmxproto" "dpmsproto" "dri2proto" "dri3proto" "evieproto" "fixesproto" "fontcacheproto" "fontsproto" "glproto" "inputproto" "kbproto" "lg3dproto" "presentproto" "printproto" "randrproto" "recordproto" "renderproto" "resourceproto" "scrnsaverproto" "trapproto" "videoproto" "windowswmproto" "xcalibrateproto" "xcmiscproto" "xextproto" "xf86bigfontproto" "xf86dgaproto" "xf86driproto" "xf86miscproto" "xf86rushproto" "xf86vidmodeproto" "xineramaproto" "xproto" "xproxymngproto" "xwaylandproto" ]; + platforms = lib.platforms.unix; + }; + }); +}; +in +{ + nixpkgs.overlays = [ + newer_xwayland + newer_xorgproto + ]; +} diff --git a/modules/gui/default.nix b/modules/gui/default.nix index 6296fc3..5506af3 100644 --- a/modules/gui/default.nix +++ b/modules/gui/default.nix @@ -16,5 +16,6 @@ _: { ./alacritty.nix ./firefox.nix ./steam.nix + ./minecraft.nix ]; } diff --git a/modules/gui/minecraft.nix b/modules/gui/minecraft.nix new file mode 100644 index 0000000..72c4aa7 --- /dev/null +++ b/modules/gui/minecraft.nix @@ -0,0 +1,28 @@ +{ config, lib, inputs, pkgs, ... }: +with lib; let + username = config.modules.other.system.username; + cfg = config.modules.programs.minecraft; +in { + options.modules.programs.minecraft = { + enable = mkEnableOption "minecraft"; + wayland = mkEnableOption "wayland"; + }; + + config = mkIf cfg.enable { + # Set wayland environment flag + environment.variables = mkIf cfg.wayland { + __GL_THREADED_OPTIMIZATIONS=0; + }; + # Install glfw-wayland-minecraft + environment.systemPackages = with pkgs; mkIf cfg.wayland [ + glfw-wayland-minecraft # Use these parameters in the prism launcher: -Dfml.earlyprogresswindow=false -Dorg.lwjgl.glfw.libname=/nix/store/ypkdx5844pp1vdw2z2nmnf2nb9kgl0mp-glfw-wayland-minecraft-unstable-2023-06-01/lib/libglfw.so + ]; + + home-manager.users.${username} = { + # Install minecraft + home.packages = with pkgs; [ + prismlauncher + ]; + }; + }; +} diff --git a/options/common/gpu/nvidia_535_wayland.nix b/options/common/gpu/nvidia_535_wayland.nix new file mode 100644 index 0000000..30108f4 --- /dev/null +++ b/options/common/gpu/nvidia_535_wayland.nix @@ -0,0 +1,59 @@ +{ pkgs, config, libs, ... }: + +{ + + environment.variables = { + GBM_BACKEND = "nvidia-drm"; + WLR_NO_HARDWARE_CURSORS = "1"; + LIBVA_DRIVER_NAME = "nvidia"; + __GLX_VENDOR_LIBRARY_NAME = "nvidia"; + }; + + environment.systemPackages = with pkgs; [ + vulkan-loader + vulkan-validation-layers + vulkan-tools + ]; + +# Enable OpenGL + hardware.opengl = { + enable = true; + driSupport = true; + driSupport32Bit = true; + extraPackages = with pkgs; [ nvidia-vaapi-driver ]; + }; + +# Load nvidia driver for Xorg and Wayland + services.xserver.videoDrivers = ["nvidia"]; + + hardware.nvidia.modesetting.enable = true; + hardware.nvidia.powerManagement.enable = false; + hardware.nvidia.powerManagement.finegrained = false; + hardware.nvidia.open = false; + hardware.nvidia.nvidiaSettings = true; + hardware.nvidia.forceFullCompositionPipeline = false; + # package = config.boot.kernelPackages.nvidiaPackages.beta; +# Special config to load the latest (535 or 550) driver for the support of the 4070 SUPER + hardware.nvidia.package = let + rcu_patch = pkgs.fetchpatch { + url = "https://github.com/gentoo/gentoo/raw/c64caf53/x11-drivers/nvidia-drivers/files/nvidia-drivers-470.223.02-gpl-pfn_valid.patch"; + hash = "sha256-eZiQQp2S/asE7MfGvfe6dA/kdCvek9SYa/FFGp24dVg="; + }; + in config.boot.kernelPackages.nvidiaPackages.mkDriver { + version = "535.154.05"; + sha256_64bit = "sha256-fpUGXKprgt6SYRDxSCemGXLrEsIA6GOinp+0eGbqqJg="; + sha256_aarch64 = "sha256-G0/GiObf/BZMkzzET8HQjdIcvCSqB1uhsinro2HLK9k="; + openSha256 = "sha256-wvRdHguGLxS0mR06P5Qi++pDJBCF8pJ8hr4T8O6TJIo="; + settingsSha256 = "sha256-9wqoDEWY4I7weWW05F4igj1Gj9wjHsREFMztfEmqm10="; + persistencedSha256 = "sha256-d0Q3Lk80JqkS1B54Mahu2yY/WocOqFFbZVBh+ToGhaE="; + + #version = "550.40.07"; + #sha256_64bit = "sha256-KYk2xye37v7ZW7h+uNJM/u8fNf7KyGTZjiaU03dJpK0="; + #sha256_aarch64 = "sha256-AV7KgRXYaQGBFl7zuRcfnTGr8rS5n13nGUIe3mJTXb4="; + #openSha256 = "sha256-mRUTEWVsbjq+psVe+kAT6MjyZuLkG2yRDxCMvDJRL1I="; + #settingsSha256 = "sha256-c30AQa4g4a1EHmaEu1yc05oqY01y+IusbBuq+P6rMCs="; + #persistencedSha256 = "sha256-11tLSY8uUIl4X/roNnxf5yS2PQvHvoNjnd2CB67e870="; + + patches = [ rcu_patch ]; + }; +}