34 Commits
Author SHA1 Message Date
andreas 5596fb8a9c remove verbose messaging 2026-09-05 10:14:11 +02:00
andreas dce21780ac cursor patch 2026-09-05 10:12:37 +02:00
andreas 310fc047b2 verbose debug logging 2026-09-04 01:35:39 +02:00
andreas c9725d3b78 mutter tearing patches 2026-09-03 10:10:52 +02:00
andreas 777acf7503 plan 2026-09-03 06:43:34 +02:00
andreas e6fd27f8ee bump and remove GOL 2026-09-03 06:42:53 +02:00
andreas f14680dfbf delete hello test package 2026-09-03 06:19:21 +02:00
andreas ca050d08d3 update package hash 2026-09-03 06:17:32 +02:00
andreas d0f23a0e7f update package hash 2026-09-03 06:17:05 +02:00
andreas 1cdedee438 formatting 2026-09-03 06:16:57 +02:00
andreas eac6e5ca97 fix mullvad on latest nixpkgs 2026-09-03 06:16:41 +02:00
andreas 819cbd3606 fix deprecation warning 2026-09-03 06:16:01 +02:00
andreas 65e6e7f747 enable cinnamon 2026-08-29 00:22:16 +02:00
andreas 36dbc3229d add tigervnc import 2026-08-29 00:22:10 +02:00
andreas 2f3e8c14f2 shader compiler 2026-08-29 00:21:53 +02:00
andreas 14b6e989f6 gnome extensions 2026-08-29 00:21:40 +02:00
andreas 64324ab150 add vscode-modernized 2026-08-29 00:21:23 +02:00
andreas c56a82c0b1 delete mesa-gcc overlay 2026-08-29 00:21:10 +02:00
andreas 9e686b3f8d faugus 2026-08-29 00:20:57 +02:00
andreas a512855fa9 add cinnamon 2026-08-29 00:20:49 +02:00
andreas 4dbe74854f Merge branch 'stableconfig' into trunk 2026-05-30 09:47:56 +02:00
andreas 2a543c6e93 Switch to sddm to fix gdm regression causing plasma x11 to not work properly 2026-05-30 09:47:17 +02:00
andreas 89e04df44a update lock 2026-05-28 17:36:07 +02:00
andreas d0546b20ea remove trilium-next-pr 2026-05-28 17:35:20 +02:00
andreas a652234c7c update flake lock 2026-05-28 17:18:18 +02:00
andreas b867dd12c4 remove unneeded triliumnext flake input 2026-05-28 17:18:12 +02:00
andreas 2fc09a965a upgraded mesa-gcc 2026-05-28 17:17:49 +02:00
andreas e3d7538fa3 "mbedtls" now points to "mbedtls_2", and mbedtls_2 has been removed. Removing overlay. 2026-05-28 17:17:12 +02:00
andreas d64b2f8d6d upgraded mesa with upstream libdrm 2026-05-28 17:16:11 +02:00
andreas 093623dad7 fonts 2026-05-12 23:56:20 +02:00
andreas f6c2c48c7d fonts 2026-05-12 23:56:13 +02:00
andreas b7c6a2fce5 WIP stuff 2026-05-12 23:56:04 +02:00
andreas a692c1353d bump flake and fix problems 2026-05-07 16:58:02 +02:00
andreas 589eefd527 upgrade mesa 2026-05-07 16:57:48 +02:00
20 changed files with 735 additions and 437 deletions
+102
View File
@@ -0,0 +1,102 @@
## CODE GENERATION INSTRUCTIONS
You are tasked with integrating patches into my kernel to make the tearing protocol work on Wayland with my intel B580.
## THINGS TO DO:
Plan out how you're going to do the following. I will inspect your plan and then authorize it.
- Custom build this MR: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3797
- Fix KDE tearing on Intel Graphics using kernel patches for libdrm. Use these resources to research:
- https://bugs.kde.org/show_bug.cgi?id=520549
- https://gitlab.freedesktop.org/drm/xe/kernel/-/work_items/8597#note_3567675
- https://gitlab.freedesktop.org/drm/i915/kernel/-/work_items/13834 (this one has patches that supposedly fix the problem.)
# Plan here:
- [ ] 1. Record the current package and kernel baselines.
- Evaluate the locked versions of Mutter, GNOME Shell, libdrm, and the selected CachyOS kernel.
- Confirm that the Intel Arc B580 (`8086:e20b`) is using the `xe` driver.
- Save the current working kernel and NixOS generation as the rollback baseline.
- [ ] 2. Pin all experimental upstream sources.
- Pin Mutter merge request !3797 to a specific commit instead of following its branch.
- Record the MR base commit and verify whether it is compatible with the Mutter version in the locked nixpkgs input.
- Identify the exact revisions of the Intel async-flip and `IN_FORMATS_ASYNC` kernel patches referenced by the i915 and Xe work items.
- Use fixed-output hashes for every fetched patch or source archive.
- [ ] 3. Determine which Intel DRM patches are still required.
- Inspect the selected CachyOS kernel source for patches that have already been merged or backported.
- Select only the missing patches needed to expose async-capable formats and prevent unchanged or disabled planes from incorrectly rejecting an async atomic commit.
- Confirm that the selected changes affect the Intel display code shared by `xe` and `i915`, and therefore apply to the B580 even when the original report is filed under i915.
- Document the required patch order and each patch's upstream URL and revision.
- [ ] 4. Add a dedicated, reversible Wayland-tearing overlay or module.
- Keep the experimental Mutter and kernel overrides together in a new, clearly named repository file.
- Scope the override to `drivebystation-nix` where practical.
- Provide a single enable switch or isolated import so the experiment can be disabled without editing generated hardware configuration.
- Preserve all unrelated existing worktree changes.
- [ ] 5. Override Mutter with merge request !3797.
- Prefer applying the pinned MR commits to the nixpkgs Mutter derivation so nixpkgs build flags and dependency wiring are retained.
- If the patch series is incompatible, use the pinned MR source only after confirming its Mutter ABI matches the installed GNOME Shell.
- Verify that libdrm is at least version 2.4.120.
- Ensure GNOME Shell and the display-manager session reference the overridden Mutter rather than merely installing it alongside the stock package.
- Enable the experimental feature with `MUTTER_DEBUG_EXPERIMENTAL_FEATURES=tearing` in the session environment.
- [ ] 6. Override the CachyOS kernel with the selected Intel DRM patches.
- Extend the existing `pkgs.cachyosKernels.linuxPackages-cachyos-latest` kernel derivation rather than replacing it with an unrelated kernel package set.
- Apply the pinned patches in their upstream dependency order.
- Verify that every patch applies cleanly to the exact CachyOS kernel source.
- Keep `boot.extraModulePackages` tied to the patched kernel package set so `r8125` and `v4l2loopback` are rebuilt against the correct kernel.
- Do not modify the generated `hardware-configuration.nix` beyond any unavoidable existing kernel selection; place the override in a maintained host module.
- [ ] 7. Validate the Nix expressions without activating the system.
- Run formatting and syntax checks on every changed Nix file.
- Evaluate the complete `drivebystation-nix` configuration.
- Run `nix flake check` and resolve evaluation failures attributable to these changes.
- Confirm that all sources are pinned and reproducible and that no mutable branch names remain.
- [ ] 8. Build each risky component independently.
- Build the overridden Mutter derivation.
- Build the patched kernel derivation.
- Build the matching `r8125` and `v4l2loopback` modules.
- Inspect the build logs for rejected patches, warnings related to async flips, and ABI mismatches.
- [ ] 9. Build the complete NixOS system before switching.
- Build the `drivebystation-nix` toplevel without activating it.
- Verify that the closure contains the pinned patched Mutter and patched CachyOS kernel.
- Confirm that a previous known-good boot generation remains available.
- [ ] 10. Activate the result safely.
- Use `nixos-rebuild boot` first so the new system is selected only after reboot.
- Reboot into the patched generation and verify the running kernel version and `xe` driver binding.
- If the display fails or the system is unstable, boot the previous generation and disable the experimental module.
- [ ] 11. Verify the kernel DRM capabilities.
- Run `drm_info` and confirm atomic async-page-flip capability is reported.
- Confirm `IN_FORMATS_ASYNC` is populated for supported primary planes.
- Confirm its absence on the cursor plane is handled as expected rather than causing the entire commit to fail.
- Capture a DRM debug log while submitting tearing-enabled fullscreen frames.
- [ ] 12. Test KDE Plasma tearing.
- Enable Plasma's "Allow in fullscreen windows" tearing setting.
- Run a fullscreen tearing-aware game or test client with frame rate above the monitor refresh rate.
- Confirm that KWin's async atomic commits no longer fail with `-EINVAL`.
- Confirm that the previous `cursor A: async flip not supported` and `plane 2A: async flip not supported` errors no longer occur for disabled or unchanged planes.
- Check cursor movement, fullscreen entry and exit, direct scanout, VRR enabled and disabled, and all connected monitors.
- [ ] 13. Test GNOME Mutter tearing.
- Start a GNOME Wayland session and confirm the tearing-control protocol is advertised.
- Run `weston-simple-egl -v -f -t` or an equivalent tearing-aware client.
- Confirm that requested asynchronous flips are accepted and visibly tear when the frame rate exceeds the refresh rate.
- Confirm unsupported async commits fall back to synchronized presentation without breaking the session.
- Test cursor movement, fullscreen transitions, VRR, multiple monitors, and suspend/resume.
- [ ] 14. Document results and removal criteria.
- Record the tested hardware, kernel, Mutter, GNOME Shell, Plasma, and libdrm versions.
- Record the exact patches used and the outcome of both compositor tests.
- Document how to disable the overrides and roll back to the previous generation.
- Note which upstream merge or kernel release will allow each local override to be removed.
Generated
+71 -276
View File
@@ -9,11 +9,11 @@
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1774186997,
"narHash": "sha256-hyNVlhAqmwcBPl7XRkxbGcMt1BfCOdvuEfBDUf0k8Oo=",
"lastModified": 1787517695,
"narHash": "sha256-Z119G3qLJx22frNHO3/seMs7fCCvxe9NJJRfN4Jadew=",
"owner": "ezKEa",
"repo": "aagl-gtk-on-nix",
"rev": "546e95f7ec74892a31f883a10b1723c35f2c2edd",
"rev": "4bb57072d963aa47f14894383a5560cf290e296a",
"type": "github"
},
"original": {
@@ -22,66 +22,13 @@
"type": "github"
}
},
"anikki": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1766470910,
"narHash": "sha256-iY0vJAAjY5ZveB6JIAQDHq7lFrkAVGnO0tC7YOYDFsg=",
"owner": "Hion-V",
"repo": "Anikki-flake",
"rev": "95d15448466142126c7fc13ac1dbdaf58a36a3a5",
"type": "github"
},
"original": {
"owner": "Hion-V",
"repo": "Anikki-flake",
"type": "github"
}
},
"cachyos-kernel": {
"flake": false,
"locked": {
"lastModified": 1776608760,
"narHash": "sha256-ehDv8bF7k/2Kf4b8CCoSm51U/MOoFuLsRXqe5wZ57sE=",
"owner": "CachyOS",
"repo": "linux-cachyos",
"rev": "7e06e29005853bbaaa3b1c1067f915d6e0db728a",
"type": "github"
},
"original": {
"owner": "CachyOS",
"repo": "linux-cachyos",
"type": "github"
}
},
"cachyos-kernel-patches": {
"flake": false,
"locked": {
"lastModified": 1776680283,
"narHash": "sha256-wSHtct0KwbhFh9xYYp1ABaBsHE/K/1+oyrqHbIdiWFE=",
"owner": "CachyOS",
"repo": "kernel-patches",
"rev": "21c93f820124a8e7046f1e358739e1a14f6b700b",
"type": "github"
},
"original": {
"owner": "CachyOS",
"repo": "kernel-patches",
"type": "github"
}
},
"crane": {
"locked": {
"lastModified": 1754269165,
"narHash": "sha256-0tcS8FHd4QjbCVoxN9jI+PjHgA4vc/IjkUSp+N3zy0U=",
"lastModified": 1781825982,
"narHash": "sha256-SlXKwIRIhrOSAcTjCB3ftPLzJWZStQIPS7J1FlZPnKk=",
"owner": "ipetkov",
"repo": "crane",
"rev": "444e81206df3f7d92780680e45858e31d2f07a08",
"rev": "469fd08d0bcf6926321fa973c6777fbc87785dd7",
"type": "github"
},
"original": {
@@ -109,15 +56,15 @@
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1747046372,
"narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
"owner": "edolstra",
"lastModified": 1767039857,
"narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=",
"owner": "NixOS",
"repo": "flake-compat",
"rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
"rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab",
"type": "github"
},
"original": {
"owner": "edolstra",
"owner": "NixOS",
"repo": "flake-compat",
"type": "github"
}
@@ -139,22 +86,6 @@
}
},
"flake-compat_4": {
"flake": false,
"locked": {
"lastModified": 1767039857,
"narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_5": {
"flake": false,
"locked": {
"lastModified": 1650374568,
@@ -171,36 +102,15 @@
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
"lanzaboote",
"nixpkgs"
]
},
"locked": {
"lastModified": 1754091436,
"narHash": "sha256-XKqDMN1/Qj1DKivQvscI4vmHfDfvYR2pfuFOJiCeewM=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "67df8c627c2c39c41dbec76a1f201929929ab0bd",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1775087534,
"narHash": "sha256-91qqW8lhL7TLwgQWijoGBbiD4t7/q75KTi8NxjVmSmA=",
"lastModified": 1788306937,
"narHash": "sha256-lbrI1UYVpFgKSsyrU9oeF7FHfnu8nLD9ja0ou9f2rxk=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "3107b77cd68437b9a76194f0f7f9c55f2329ca5b",
"rev": "f16b25b8c3d2809b87925d0b76652d7821a75c68",
"type": "github"
},
"original": {
@@ -214,11 +124,11 @@
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"lastModified": 1694529238,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
"type": "github"
},
"original": {
@@ -229,7 +139,7 @@
},
"flake-utils-plus": {
"inputs": {
"flake-utils": "flake-utils_2"
"flake-utils": "flake-utils"
},
"locked": {
"lastModified": 1715533576,
@@ -246,49 +156,11 @@
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1694529238,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"game-of-life": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1771895942,
"narHash": "sha256-2G212O6uoBCjmyIBux/Kfy/FVlsAY+3mTT4JRstYRZ0=",
"owner": "local-interloper",
"repo": "game-of-life",
"rev": "dd5cba5d873ece0ca5c8a7d74243b3b0199a2194",
"type": "github"
},
"original": {
"owner": "local-interloper",
"repo": "game-of-life",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"lanzaboote",
"pre-commit-hooks-nix",
"pre-commit",
"nixpkgs"
]
},
@@ -313,11 +185,11 @@
]
},
"locked": {
"lastModified": 1776777932,
"narHash": "sha256-0R3Yow/NzSeVGUke5tL7CCkqmss4Vmi6BbV6idHzq/8=",
"lastModified": 1788355065,
"narHash": "sha256-gAz5oTI7ur34CfuakQduiQd/2ZhO62Bn2XXg08nZYYQ=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "5d5640599a0050b994330328b9fd45709c909720",
"rev": "d9d750e4fc11c10cab2da677bdd31e427f3a3a71",
"type": "github"
},
"original": {
@@ -334,11 +206,11 @@
]
},
"locked": {
"lastModified": 1776184304,
"narHash": "sha256-No6QGBmIv5ChiwKCcbkxjdEQ/RO2ZS1gD7SFy6EZ7rc=",
"lastModified": 1788229478,
"narHash": "sha256-G0F2rFORVcFkEvVdE/qWQTnYekIc77YP5/vRF9nZlxU=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "3c7524c68348ef79ce48308e0978611a050089b2",
"rev": "1dc2d1f720ab17fc7981e087346bf54b26d284b1",
"type": "github"
},
"original": {
@@ -350,43 +222,39 @@
"lanzaboote": {
"inputs": {
"crane": "crane",
"flake-compat": "flake-compat_2",
"flake-parts": "flake-parts",
"nixpkgs": [
"nixpkgs"
],
"pre-commit-hooks-nix": "pre-commit-hooks-nix",
"pre-commit": "pre-commit",
"rust-overlay": "rust-overlay_2"
},
"locked": {
"lastModified": 1762205063,
"narHash": "sha256-If6vQ+KvtKs3ARBO9G3l+4wFSCYtRBrwX1z+I+B61wQ=",
"lastModified": 1782141370,
"narHash": "sha256-hqijVSEETttmo8Okql9/LG0Ua34hdciKW1a5zzlj8mU=",
"owner": "nix-community",
"repo": "lanzaboote",
"rev": "88b8a563ff5704f4e8d8e5118fb911fa2110ca05",
"rev": "7c9a54a7f87b4539ddbd8bda09a8a5f5f9361aa9",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "v0.4.3",
"ref": "v1.1.0",
"repo": "lanzaboote",
"type": "github"
}
},
"nix-cachyos-kernel": {
"inputs": {
"cachyos-kernel": "cachyos-kernel",
"cachyos-kernel-patches": "cachyos-kernel-patches",
"flake-compat": "flake-compat_3",
"flake-parts": "flake-parts_2",
"nixpkgs": "nixpkgs_2"
"flake-parts": "flake-parts",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1776710308,
"narHash": "sha256-rrdCcEXukj2CDjsiOVPYb9LpTKzB89sIicBqoOBK3Xs=",
"lastModified": 1788379544,
"narHash": "sha256-EMfRomvn1lAErvY/Q3bQL+PwEi+5hbBwI0ZI5SRC/WM=",
"owner": "xddxdd",
"repo": "nix-cachyos-kernel",
"rev": "8c8219b1f4822932baea710948da7963f50e9739",
"rev": "d1c3cadc796061778cf7f62bdbfaf68cf3c3c654",
"type": "github"
},
"original": {
@@ -396,51 +264,29 @@
"type": "github"
}
},
"nixos-wsl": {
"inputs": {
"flake-compat": "flake-compat_4",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1776692876,
"narHash": "sha256-7Q05rUgwbkJnjxIJyi8bHUG+XnyZqLxFJz7c8RncpeU=",
"owner": "nix-community",
"repo": "NixOS-WSL",
"rev": "51b302c28dbf904a5c341be005eebe0779cf4f16",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "main",
"repo": "NixOS-WSL",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1744536153,
"narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=",
"lastModified": 1788329703,
"narHash": "sha256-fHvRW4JUchuw6QNzQ50BfzeYe0TnjKml1V8PVRjntSI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11",
"rev": "090e478bd64824e2122328df47a7efb74fdaf0c1",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"ref": "nixos-unstable-small",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1774748309,
"narHash": "sha256-+U7gF3qxzwD5TZuANzZPeJTZRHS29OFQgkQ2kiTJBIQ=",
"lastModified": 1788057806,
"narHash": "sha256-DTQSMxzDWmT0zhguthvegnVkn7CFqGCv4IHCzk5ZUpM=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "333c4e0545a6da976206c74db8773a1645b5870a",
"rev": "596e2e3940e09b2abbeb03f75fa1828c57fcd72c",
"type": "github"
},
"original": {
@@ -451,27 +297,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1776635459,
"narHash": "sha256-3UVWm751p/8VAY1Mq+DgSTCv9HpMmdB2byhnRrVKflk=",
"lastModified": 1788179007,
"narHash": "sha256-hn1oU2rue2SYK8dAr8+WNZWtbsz1S2W5mnHlSEuh3bo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "8d8538e67e516362d9d09ee5d3ce73dce944612b",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable-small",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1776548001,
"narHash": "sha256-ZSK0NL4a1BwVbbTBoSnWgbJy9HeZFXLYQizjb2DPF24=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b12141ef619e0a9c1c84dc8c684040326f27cdcc",
"rev": "34ab99075ac4f7e40cf037eef32cb1c360bb85e9",
"type": "github"
},
"original": {
@@ -481,12 +311,9 @@
"type": "github"
}
},
"pre-commit-hooks-nix": {
"pre-commit": {
"inputs": {
"flake-compat": [
"lanzaboote",
"flake-compat"
],
"flake-compat": "flake-compat_2",
"gitignore": "gitignore",
"nixpkgs": [
"lanzaboote",
@@ -494,11 +321,11 @@
]
},
"locked": {
"lastModified": 1750779888,
"narHash": "sha256-wibppH3g/E2lxU43ZQHC5yA/7kIKLGxVEnsnVK1BtRg=",
"lastModified": 1781733627,
"narHash": "sha256-U3yTuGBnmXvXoQI3qkpfEDsn9RovQPAjN7ndRco+3u0=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "16ec914f6fb6f599ce988427d9d94efddf25fe6d",
"rev": "3bbec39bc90eadfa031e6f3b77272f3f60803e39",
"type": "github"
},
"original": {
@@ -510,29 +337,28 @@
"root": {
"inputs": {
"aagl": "aagl",
"anikki": "anikki",
"game-of-life": "game-of-life",
"home-manager": "home-manager",
"lanzaboote": "lanzaboote",
"nix-cachyos-kernel": "nix-cachyos-kernel",
"nixos-wsl": "nixos-wsl",
"nixpkgs": "nixpkgs_3",
"nixpkgs": "nixpkgs_2",
"snowfall-lib": "snowfall-lib",
"sops-nix": "sops-nix",
"trilium-next-pr": "trilium-next-pr",
"zen-browser": "zen-browser"
}
},
"rust-overlay": {
"inputs": {
"nixpkgs": "nixpkgs"
"nixpkgs": [
"aagl",
"nixpkgs"
]
},
"locked": {
"lastModified": 1770952264,
"narHash": "sha256-CjymNrJZWBtpavyuTkfPVPaZkwzIzGaf0E/3WgcwM14=",
"lastModified": 1785476452,
"narHash": "sha256-/CXwCFPS41rb/JI2VitKCgVK6V5E6/sfw5ke3B9zyVQ=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "ec6a3d5cdf14bb5a1dd03652bd3f6351004d2188",
"rev": "6ef009bf4c4873cdc1a621826722bdea7c03e62c",
"type": "github"
},
"original": {
@@ -549,11 +375,11 @@
]
},
"locked": {
"lastModified": 1761791894,
"narHash": "sha256-myRIDh+PxaREz+z9LzbqBJF+SnTFJwkthKDX9zMyddY=",
"lastModified": 1782012058,
"narHash": "sha256-9mWUnReOUXfKjZuJAL/bAFH3LUyECTRtXgSNVjRw3UY=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "59c45eb69d9222a4362673141e00ff77842cd219",
"rev": "8534567325bd8a8d2928e6afd81e0a87d19efd3c",
"type": "github"
},
"original": {
@@ -564,18 +390,18 @@
},
"snowfall-lib": {
"inputs": {
"flake-compat": "flake-compat_5",
"flake-compat": "flake-compat_4",
"flake-utils-plus": "flake-utils-plus",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1765361626,
"narHash": "sha256-kX0Dp/kYSRbQ+yd9e3lmmUWdNbipufvKfL2IzbrSpnY=",
"lastModified": 1784328457,
"narHash": "sha256-4R5WV74NHhPk21ctoPmjL7nQ6txDnoBLwSWULvIw0TY=",
"owner": "snowfallorg",
"repo": "lib",
"rev": "c566ad8b7352c30ec3763435de7c8f1c46ebb357",
"rev": "6ee3542cb459ca4b038cfe50ceb8797f05cdabad",
"type": "github"
},
"original": {
@@ -591,11 +417,11 @@
]
},
"locked": {
"lastModified": 1776771786,
"narHash": "sha256-DRFGPfFV6hbrfO9a1PH1FkCi7qR5FgjSqsQGGvk1rdI=",
"lastModified": 1788337237,
"narHash": "sha256-gkSH8VUtCo6hnysNmb9DbTuDepH2t5pv+QWjP75xKAk=",
"owner": "mic92",
"repo": "sops-nix",
"rev": "bef289e2248991f7afeb95965c82fbcd8ff72598",
"rev": "fbf759290e0cb0a98dfc813a4eb7d53ad1dacb57",
"type": "github"
},
"original": {
@@ -619,37 +445,6 @@
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"trilium-next-pr": {
"locked": {
"lastModified": 1736678965,
"narHash": "sha256-2A687i3Rq0/wqJVvpgaiRPWcfnBBuBhPjKaT8cnd7o0=",
"owner": "FliegendeWurst",
"repo": "nixpkgs",
"rev": "4fcdf706929246476e52e960760b6643cb8395c4",
"type": "github"
},
"original": {
"owner": "FliegendeWurst",
"ref": "trilium-next",
"repo": "nixpkgs",
"type": "github"
}
},
"zen-browser": {
"inputs": {
"home-manager": "home-manager_2",
@@ -658,11 +453,11 @@
]
},
"locked": {
"lastModified": 1776790993,
"narHash": "sha256-TxDU/PFKoOYm+ncWXyI2vurKQPqu54gMlCRzx5sGnZc=",
"lastModified": 1788405419,
"narHash": "sha256-wuGizAVEmY0u15MYrhgy7AoQdHg+4Y2QiC+v/mxA8dc=",
"owner": "0xc000022070",
"repo": "zen-browser-flake",
"rev": "3f4f36b17ceeda27fc4953e8bc29637333508c05",
"rev": "fdb83f8fce835213fab7eab52c375926fe1a32dc",
"type": "github"
},
"original": {
+13 -17
View File
@@ -4,19 +4,19 @@
inputs = {
# nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; # Use nixos-unstable for latest kernel and packages
nixos-wsl = {
url = "github:nix-community/NixOS-WSL/main";
inputs.nixpkgs.follows = "nixpkgs";
};
# nixos-wsl = {
# url = "github:nix-community/NixOS-WSL/main";
# inputs.nixpkgs.follows = "nixpkgs";
# };
# Snowfallorg's Flake utility
snowfall-lib = {
url = "github:snowfallorg/lib";
inputs.nixpkgs.follows = "nixpkgs";
};
game-of-life = {
url = "github:local-interloper/game-of-life";
inputs.nixpkgs.follows = "nixpkgs";
};
# game-of-life = {
# url = "github:local-interloper/game-of-life";
# inputs.nixpkgs.follows = "nixpkgs";
# };
# Add sops-nix for secrets management
sops-nix = {
url = "github:mic92/sops-nix";
@@ -30,16 +30,12 @@
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
trilium-next-pr = {
url = "github:FliegendeWurst/nixpkgs/trilium-next";
# Don't follow nixpkgs as this repo has its own pinned nixpkgs
};
anikki = {
url = "github:Hion-V/Anikki-flake";
inputs.nixpkgs.follows = "nixpkgs";
};
# anikki = {
# url = "github:Hion-V/Anikki-flake";
# inputs.nixpkgs.follows = "nixpkgs";
# };
lanzaboote = {
url = "github:nix-community/lanzaboote/v0.4.3";
url = "github:nix-community/lanzaboote/v1.1.0";
inputs.nixpkgs.follows = "nixpkgs";
};
# kwin-effects-forceblur = { Archived.
+24 -1
View File
@@ -5,6 +5,9 @@ let
in {
options.${namespace}.desktop-environment = {
cinnamon = {
enable = lib.mkEnableOption "Cinnamon desktop environment";
};
xfce = {
enable = lib.mkEnableOption "XFCE desktop environment";
};
@@ -23,6 +26,16 @@ in {
};
config = lib.mkMerge [
(lib.mkIf cfg.xfce.enable {
services.xserver = {
enable = true;
desktopManager = {
cinnamon.enable = true;
};
};
environment.sessionVariables.NIX_GSETTINGS_OVERRIDES_DIR =
lib.mkForce "${pkgs.gnome.nixos-gsettings-overrides}/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas";
})
(lib.mkIf cfg.xfce.enable {
services.xserver = {
enable = true;
@@ -52,7 +65,7 @@ in {
systemd.services.gnome-remote-desktop = {
wantedBy = [ "graphical.target" ]; # for starting the unit automatically at boot
};
services.displayManager.autoLogin.enable = false;
# services.displayManager.autoLogin.enable = false;
networking.firewall.allowedTCPPorts = [
3389
3390
@@ -96,6 +109,16 @@ in {
(lib.mkIf cfg.kde.enable {
services.xserver.enable = true;
services.desktopManager.plasma6.enable = true;
environment.sessionVariables = {
# Forces KWin to use the legacy DRM interface so "Allow Tearing" actually works
# KWIN_DRM_NO_AMS = "1";
# Disables the new triple buffering in Plasma 6.1+ to reduce latency
# KWIN_DRM_DISABLE_TRIPLE_BUFFERING = "1";
# KWIN_USE_HWCURSOR = "0";
# KWIN_DRM_USE_EGL_STREAMS = "0";
# MESA_VK_WSI_PRESENT_MODE = "immediate";
# vblank_mode = "0";
};
environment.systemPackages = with pkgs; [
kdePackages.qtwebsockets
kdePackages.qtwebchannel
+3 -1
View File
@@ -31,13 +31,14 @@
environment.systemPackages = with pkgs; [
protonup-ng # Tool to install and manage Proton-GE
lutris
faugus-launcher
vkd3d
dxvk
corefonts
protontricks
mangohud
vkbasalt
gamescope
corefonts
];
hardware.uinput.enable = true;
@@ -69,6 +70,7 @@
package = pkgs.steam.override {
extraPkgs = pkgs: with pkgs; [
gamemode
noto-fonts-color-emoji
];
extraEnv = {
# SDL_VIDEODRIVER = "wayland,x11";
-11
View File
@@ -1,11 +0,0 @@
{ ... }:
final: prev: {
mbedtls_2 = prev.mbedtls_2.overrideAttrs (oldAttrs: {
doCheck = false; # Skip failing PSA crypto tests
});
haxe = prev.haxe.overrideAttrs (oldAttrs: {
buildInputs = (oldAttrs.buildInputs or []) ++ [ final.mbedtls_2 ];
});
}
-38
View File
@@ -1,38 +0,0 @@
{ ... }:
final: prev: {
mesa = (prev.mesa.overrideAttrs (old: rec {
version = "git-unstable-2026-04-02";
src = prev.fetchFromGitLab {
domain = "gitlab.freedesktop.org";
owner = "mesa";
repo = "mesa";
rev = "72e9f9a760a5dd81a74497f1daef054af1b6b827";
hash = "sha256-81V5RdLSLYeGJ/wh5H8L6vq+QdR6yMkJxDV+6Yf5FPk=";
};
patches = [];
buildInputs = old.buildInputs ++ (with prev.llvmPackages_21; [
clang-unwrapped
libclang
]);
# Create symlinks to clang libraries so meson can find them
preConfigure = (old.preConfigure or "") + ''
mkdir -p $NIX_BUILD_TOP/clang-libs
for lib in ${prev.llvmPackages_21.clang-unwrapped.lib}/lib/*.a; do
ln -sf "$lib" "$NIX_BUILD_TOP/clang-libs/"
done
export LIBRARY_PATH="$NIX_BUILD_TOP/clang-libs:''${LIBRARY_PATH:-}"
export CXXFLAGS="$CXXFLAGS -fno-strict-aliasing"
'';
mesonFlags =
(builtins.filter (flag:
!(prev.lib.hasPrefix "-Dclang-libdir=" flag) &&
flag != "--sysconfdir=/etc"
) old.mesonFlags) ++ [
"-Dsysconfdir=${placeholder "out"}/etc"
] ++ (if prev.stdenv.hostPlatform.is64bit then [ "-Dintel-rt=enabled" ] else [ "-Dintel-rt=disabled" ]);
}));
}
@@ -0,0 +1,7 @@
{ ... }:
final: prev: {
openldap = prev.openldap.overrideAttrs {
doCheck = !prev.stdenv.hostPlatform.isi686;
};
}
+100
View File
@@ -0,0 +1,100 @@
# overlays/vscode-modernized/default.nix
{ ... }:
final: prev:
let
modernized = prev.fetchFromGitHub {
owner = "Sukarth";
repo = "VS-Code-Modernized";
# Pin this once working.
rev = "main";
hash = "sha256-QSmdmCoF2L42ZUxYpJXq6REOdNObK9DBI6c0GEQ32rQ=";
};
injectModernized = vscodePkg:
vscodePkg.overrideAttrs (old: {
postInstall = (old.postInstall or "") + ''
(
set -euo pipefail
candidates=(
"$out/lib/vscode/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html"
"$out/lib/vscode/resources/app/out/vs/code/electron-sandbox/workbench/workbench.esm.html"
"$out/lib/vscode/resources/app/out/vs/code/electron-browser/workbench/workbench.html"
"$out/lib/vscode/resources/app/out/vs/code/electron-browser/workbench/workbench.esm.html"
)
workbench=""
for candidate in "''${candidates[@]}"; do
if [ -f "$candidate" ]; then
workbench="$candidate"
break
fi
done
if [ -z "$workbench" ]; then
echo "VS Code Modernized: could not find workbench.html" >&2
find "$out/lib/vscode/resources/app/out/vs" -name 'workbench*.html' -print >&2 || true
exit 1
fi
# Build one self-contained CSS file.
cat > /tmp/vscode-modernized-inline.css <<'EOF'
/* VS Code Modernized dynamic settings */
:root {
--vscode-modernized-spacing: 0.35rem;
--vscode-modernized-border-radius: 0.5rem;
--vscode-modernized-tab-spacing: 0.2rem;
}
EOF
cat "${modernized}/styles/styles.css" >> /tmp/vscode-modernized-inline.css
# Smoke-test styles. Remove later if you want.
cat >> /tmp/vscode-modernized-inline.css <<'EOF'
/* Nix smoke test: these should be very visible */
.monaco-workbench .part.sidebar,
.monaco-workbench .part.auxiliarybar,
.monaco-workbench .part.panel,
.monaco-workbench .editor-group-container,
.monaco-workbench .tabs-container,
.monaco-workbench .tab,
.monaco-workbench .monaco-list-row,
.monaco-workbench .quick-input-widget {
border-radius: var(--vscode-modernized-border-radius) !important;
overflow: hidden !important;
}
.monaco-workbench .part.sidebar,
.monaco-workbench .part.panel,
.monaco-workbench .editor-group-container {
margin: var(--vscode-modernized-spacing) !important;
}
EOF
css="$(sed \
-e 's/&/\&amp;/g' \
-e 's/</\&lt;/g' \
-e 's/>/\&gt;/g' \
/tmp/vscode-modernized-inline.css)"
inject="
<!-- VS Code Modernized - Nix injected -->
<style id=\"vscode-modernized-nix\">
$css
</style>
<!-- /VS Code Modernized - Nix injected -->
"
substituteInPlace "$workbench" \
--replace-fail '</html>' "$inject
</html>"
)
'';
});
in
{
vscode-modernized = injectModernized prev.vscode;
}
+1 -1
View File
@@ -16,7 +16,7 @@ let
hash = "sha256-REEhqvfYSKD7EyIYJVlbkQu0h5FZcofc8X7Zhu1xZnA="; # You need to add the hash after first build attempt
};
appimageContents = appimageTools.extractType2 {
appimageContents = appimageTools.extract {
inherit pname version src;
};
in
-69
View File
@@ -1,69 +0,0 @@
{
# Snowfall Lib provides a customized `lib` instance with access to your flake's library
# as well as the libraries available from your flake's inputs.
lib,
# You also have access to your flake's inputs.
inputs,
# The namespace used for your flake, defaulting to "internal" if not set.
namespace,
# All other arguments come from NixPkgs. You can use `pkgs` to pull packages or helpers
# programmatically or you may add the named attributes as arguments here.
stdenv,
fetchurl,
nixos,
callPackage,
testers,
versionCheckHook,
hello,
...
}:
stdenv.mkDerivation (finalAttrs: {
pname = "hello";
version = "2.12.1";
src = fetchurl {
url = "mirror://gnu/hello/hello-${finalAttrs.version}.tar.gz";
hash = "sha256-jZkUKv2SV28wsM18tCqNxoCZmLxdYH2Idh9RLibH2yA=";
};
# The GNU Hello `configure` script detects how to link libiconv but fails to actually make use of that.
# Unfortunately, this cannot be a patch to `Makefile.am` because `autoreconfHook` causes a gettext
# infrastructure mismatch error when trying to build `hello`.
env = lib.optionalAttrs stdenv.hostPlatform.isDarwin {
NIX_LDFLAGS = "-liconv";
};
doCheck = true;
doInstallCheck = true;
nativeInstallCheckInputs = [
versionCheckHook
];
# Give hello some install checks for testing purpose.
postInstallCheck = ''
stat "''${!outputBin}/bin/${finalAttrs.meta.mainProgram}"
'';
passthru.tests = {
version = testers.testVersion { package = hello; };
};
passthru.tests.run = callPackage ./test.nix { hello = finalAttrs.finalPackage; };
meta = {
description = "Program that produces a familiar, friendly greeting";
longDescription = ''
GNU Hello is a program that prints "Hello, world!" when you run it.
It is fully customizable.
'';
homepage = "https://www.gnu.org/software/hello/manual/";
changelog = "https://git.savannah.gnu.org/cgit/hello.git/plain/NEWS?h=v${finalAttrs.version}";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ stv0g ];
mainProgram = "hello";
platforms = lib.platforms.all;
};
})
-8
View File
@@ -1,8 +0,0 @@
{ runCommand, hello }:
runCommand "hello-test-run" {
nativeBuildInputs = [ hello ];
} ''
diff -U3 --color=auto <(hello) <(echo 'Hello, world!')
touch $out
''
+89
View File
@@ -0,0 +1,89 @@
{
lib,
stdenv,
fetchFromGitHub,
meson,
ninja,
pkg-config,
gobject-introspection,
glib,
gnome,
mutter,
cairo,
gsettings-desktop-schemas,
wayland,
libglvnd,
libxfixes,
libxi,
atk,
libxkbcommon,
clutter,
cmake,
gnome-shell,
lcms2,
}:
stdenv.mkDerivation {
pname = "gnome-rounded-blur";
version = "unstable-2026-06-11";
src = fetchFromGitHub {
owner = "kancko";
repo = "gnome-rounded-blur";
# Replace this with a fixed commit.
rev = "master";
# Run once with lib.fakeHash, then replace with the real hash.
hash = "sha256-MBeb0/Drt0UQ/K8UaW93ae9OaV3L5nhFZB2tPwj47co=";
};
nativeBuildInputs = [
meson
ninja
pkg-config
gobject-introspection
cmake
];
buildInputs = [
glib
mutter
cairo
gsettings-desktop-schemas
wayland
libglvnd
libxfixes
libxi
atk
libxkbcommon
clutter
(lib.getDev mutter)
(lib.getLib mutter)
(lib.getDev gnome-shell)
(lib.getLib gnome-shell)
lcms2 # required by mutter-clutter
];
postFixup = ''
for libfile in $out/lib/libblur-effect-1.0.so*; do
if [ -f "$libfile" ] && [ ! -L "$libfile" ]; then
patchelf --set-rpath "${
lib.makeLibraryPath [
glib
wayland
(lib.getLib mutter)
]
}:$out/lib" "$libfile"
fi
done
'';
# The upstream meson file installs:
# - libblur-effect-1.0.so*
# - Blur-1.0.gir
# - Blur-1.0.typelib
# See src/meson.build.
meta = {
description = "Rounded blur GObject library for GNOME Shell extensions";
homepage = "https://github.com/kancko/gnome-rounded-blur";
license = lib.licenses.gpl3Plus;
platforms = lib.platforms.linux;
};
}
+53
View File
@@ -0,0 +1,53 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
glib,
}:
stdenvNoCC.mkDerivation rec {
pname = "rounded-windows-bms";
version = "2.2.0-bms-fix";
src = fetchFromGitHub {
owner = "MeguMario";
repo = "rounded-windows";
rev = "bms-fix";
# Put a fake hash first; Nix will tell you the real one.
hash = "sha256-5llnqW1dK3jsMRfvxb1VrSkZ/DSXsfU3PiNmpbb5CLw=";
};
nativeBuildInputs = [
glib
];
installPhase = ''
runHook preInstall
uuid="rounded-windows@marcosgt.github.io"
extension_dir="$out/share/gnome-shell/extensions/$uuid"
mkdir -p "$extension_dir"
cp metadata.json extension.js effect.js prefs.js stylesheet.css "$extension_dir/"
mkdir -p "$extension_dir/schemas"
cp schemas/*.xml "$extension_dir/schemas/"
glib-compile-schemas "$extension_dir/schemas"
runHook postInstall
'';
passthru = {
extensionUuid = "rounded-windows@marcosgt.github.io";
};
meta = {
description = "Rounded Window Corners GNOME extension with Blur-My-Shell compatibility fix";
homepage = "https://github.com/MeguMario/rounded-windows/tree/bms-fix";
license = lib.licenses.gpl3Only;
platforms = lib.platforms.linux;
};
}
@@ -10,6 +10,7 @@
{
imports = [
./tigervnc.nix
./hardware/hardware-configuration.nix
];
@@ -47,11 +48,16 @@
services = {
# Enable Gnome Session
displayManager.gdm.enable = true;
displayManager.sddm.enable = false;
displayManager.sddm.wayland.enable = false;
displayManager.gdm.enable = false;
displayManager.sddm.enable = true;
displayManager.sddm.wayland.enable = true;
displayManager.autoLogin = {
enable = false;
user = "andreas";
};
displayManager.cosmic-greeter.enable = false;
displayManager.defaultSession = "gnome";
displayManager.defaultSession = "cinnamon";
xserver = {
enable = true; # Enable the deprecated X11 teletype terminal connection system.
@@ -234,10 +240,47 @@
}
];
};
services.mullvad-vpn.enable = true;
services.mullvad-vpn.package = pkgs.mullvad-vpn;
# Or disable the firewall altogether.
# networking.firewall.enable = false;
services.mullvad-vpn = {
enable = true;
gui.enable = true;
};
fonts = {
packages = with pkgs; [
noto-fonts
noto-fonts-color-emoji
];
fontconfig = {
enable = true;
defaultFonts = {
sansSerif = [ "DejaVu Sans" "Noto Color Emoji" ];
serif = [ "DejaVu Serif" "Noto Color Emoji" ];
monospace = [ "DejaVu Sans Mono" "Noto Color Emoji" ];
emoji = [ "Noto Color Emoji" ];
};
};
};
services.xrdp = {
enable = true;
openFirewall = true;
defaultWindowManager = "cinnamon-session";
};
### tigervnc
services.tigervnc = {
enable = true;
users = {
andreas = {
localhost = false; # true for SSH-only
};
};
};
### tigervnc END
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
@@ -34,6 +34,7 @@ in
# inherit system;
imports = [
./configuration.nix
./mutter-tearing.nix
./video.nix
inputs.aagl.nixosModules.default
];
@@ -42,6 +43,7 @@ in
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# Define a user account. Don't forget to set a password with ‘passwd’.
# Desktops
my-namespace.desktop-environment.cinnamon.enable = true;
my-namespace.desktop-environment.xfce.enable = true;
my-namespace.desktop-environment.gnome.enable = true;
my-namespace.desktop-environment.kde.enable = true;
@@ -67,16 +69,16 @@ in
];
packages = with pkgs; [
# Packages from inputsq
inputs.game-of-life.packages.x86_64-linux.default
# inputs.game-of-life.packages.x86_64-linux.default
inputs.zen-browser.packages.x86_64-linux.default
inputs.trilium-next-pr.legacyPackages.x86_64-linux.trilium-next-desktop
inputs.anikki.packages.x86_64-linux.default
# inputs.anikki.packages.x86_64-linux.default
# We want flatpak support
flatpak
# GNOME shit
thunderbird
soundwireserver
vscode
# vscode
# discord
spotify
appimage-run
prismlauncher #replaces broken minecraft package
@@ -84,6 +86,7 @@ in
terraform
virt-manager
nil
codex
# thunderbird
];
@@ -100,16 +103,22 @@ in
# Open ports in the firewall.
networking.firewall.allowedTCPPorts = [
59010 #SoundWireServer
5901
5001
11434
3389 #RDP
22 #ssh
];
networking.firewall.allowedUDPPorts = [
59010 #SoundWireServer
5901
5001
11434
3389 #RDP
22 #ssh
];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
networking.firewall.enable = false;
# Install firefox.
@@ -117,6 +126,22 @@ in
nixpkgs.config.allowBroken = true;
powerManagement.cpuFreqGovernor = "performance";
# Set up system Packages
environment.sessionVariables.GI_TYPELIB_PATH =
lib.makeSearchPath "lib/girepository-1.0" [
pkgs.my-namespace.rounded-blur
];
environment.sessionVariables = {
# If you are using Hyprland, labwc, or Sway (wlroots-based):
WLR_DRM_NO_ATOMIC = "1";
KWIN_DRM_DISABLE_TRIPLE_BUFFERING="1";
# If you are using KDE Plasma (KWin):
KWIN_FORCE_SW_CURSOR = "1";
# For modern wlroots (and Aquamarine in Hyprland) to force software cursors:
WLR_NO_HARDWARE_CURSORS = "1";
};
environment.systemPackages = with pkgs; [
git
wine
@@ -127,8 +152,11 @@ in
synergy
mangohud
my-namespace.udev-steelseries
my-namespace.hello
my-namespace.linux-wallpaperengine
my-namespace.rounded-blur
my-namespace.rounded-windows-bms
my-namespace.cs-demo-manager
vscode-modernized
(pkgs.writeShellScriptBin "switch-to-desktop" ''
#!/bin/sh
@@ -39,6 +39,7 @@
intel-vaapi-driver # fallback
intel-compute-runtime # OpenCL/Level Zero
level-zero # Level Zero API for compute
intel-graphics-compiler # Shader compiler for Arc GPUs allgedly needed for XPU
];
};
@@ -127,6 +128,13 @@
clinfo
vulkan-tools
];
services.xserver.config = ''
Section "Device"
Identifier "AMD"
Driver "amdgpu"
Option "TearFree" "false"
EndSection
'';
services.xserver.deviceSection = ''
Option "TearFree" "false"
'';
@@ -0,0 +1,36 @@
diff --git a/src/meson.build b/src/meson.build
--- a/src/meson.build
+++ b/src/meson.build
@@ -1077,5 +1077,6 @@ wayland_protocols = [
['single-pixel-buffer', 'staging', 1, ],
['tablet', 'stable', 2, ],
+ ['tearing-control', 'staging', 1, ],
['text-input-unstable-v3', 'private', ],
['viewporter', 'stable', ],
['xdg-activation', 'staging', 1, ],
diff --git a/src/wayland/meta-wayland-dma-buf.c b/src/wayland/meta-wayland-dma-buf.c
--- a/src/wayland/meta-wayland-dma-buf.c
+++ b/src/wayland/meta-wayland-dma-buf.c
@@ -630,11 +630,22 @@ has_modifier (GArray *modifiers,
}
#ifdef HAVE_NATIVE_BACKEND
+static gboolean
+async_supports_modifier (MetaKmsPlane *plane,
+ uint32_t drm_format,
+ uint64_t drm_modifier)
+{
+ GArray *async_modifiers =
+ meta_kms_plane_get_async_modifiers_for_format (plane, drm_format);
+ return async_modifiers && has_modifier (async_modifiers, drm_modifier);
+}
+
static gboolean
crtc_supports_modifier (MetaCrtcKms *crtc_kms,
uint32_t drm_format,
- uint64_t drm_modifier)
+ uint64_t drm_modifier,
+ gboolean is_async)
{
MetaKmsPlane *plane = meta_crtc_kms_get_assigned_primary_plane (crtc_kms);
GArray *crtc_modifiers;
@@ -0,0 +1,59 @@
{ lib, pkgs, ... }:
let
# GNOME/mutter!3797, pinned because the MR is still under development.
mutterTearingRevision = "a8d56d423edde9e6d76f6b9cab663d82c65cf1a2";
mutterTearingPatch = pkgs.fetchurl {
url = "https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3797.diff";
hash = "sha256-3up5PsHX+BSQRKb9JS5bnJLPaTGmvV55M18tKkepIng=";
};
in
{
nixpkgs.overlays = [
(final: prev: {
mutter = prev.mutter.overrideAttrs (old: {
pname = "mutter-tearing";
# nixpkgs leaves Mutter's verbose topics compiled out by default.
# This is required for MUTTER_DEBUG=kms to emit the async commit flags.
mesonFlags = (old.mesonFlags or [ ]) ++ [ ];
# The MR currently targets Mutter 51. Apply it to the packaged Mutter
# 50 source, then resolve the four small context conflicts separately.
prePatch = ''
${old.prePatch or ""}
set +e
patch --batch -p1 --forward < ${mutterTearingPatch}
mr_status=$?
set -e
if [ "$mr_status" -ne 0 ]; then
reject_count="$(find . -name '*.rej' -type f | wc -l)"
if [ "$reject_count" -ne 3 ]; then
echo "Unexpected number of Mutter !3797 rejects: $reject_count" >&2
exit 1
fi
fi
patch --batch -p1 --forward < ${./mutter-50-tearing-compat.patch}
find . -name '*.rej' -type f -delete
'';
passthru = (old.passthru or { }) // {
tearingMr = 3797;
tearingRevision = mutterTearingRevision;
};
});
})
];
environment.sessionVariables = {
# Mutter keeps tearing support behind an experimental runtime switch.
MUTTER_DEBUG_EXPERIMENTAL_FEATURES = lib.mkDefault "tearing";
# Temporarily expose whether async atomic commits reach KMS or fall back
# to synchronized presentation. Remove this after collecting the log.
MUTTER_DEBUG = lib.mkDefault "kms";
};
}
@@ -0,0 +1,83 @@
{ config, pkgs, lib, ... }:
let
cfg = config.services.tigervnc;
in
{
options.services.tigervnc = {
enable = lib.mkEnableOption "TigerVNC x0vncserver (mirrors :0)";
users = lib.mkOption {
type = lib.types.attrsOf (lib.types.submodule ({ name, config, ... }: {
options = {
enableSharing = lib.mkOption { type = lib.types.bool; default = true; };
port = lib.mkOption { type = lib.types.int; default = 5901; };
localhost = lib.mkOption { type = lib.types.bool; default = false; };
#geometry = lib.mkOption { type = lib.types.str; default = ""; };
};
}));
default = { };
};
};
config = lib.mkIf cfg.enable {
environment.systemPackages = [ pkgs.tigervnc pkgs.xhost pkgs.xauth ];
systemd.user.services = lib.mapAttrs' (user: opts:
let svcName = "tigervnc-x0vncserver-${user}";
in {
name = svcName;
value = lib.mkIf opts.enableSharing {
description = "TigerVNC x0vncserver sharing :0 for ${user}";
after = [ "graphical-session.target" ];
partOf = [ "graphical-session.target" ];
wantedBy = [ "graphical-session.target" ];
path = [ pkgs.tigervnc pkgs.xhost pkgs.xauth pkgs.coreutils ];
script = let
# Build args array to avoid shell escaping hell
vncArgs = [
"-display :0"
"-rfbport ${toString opts.port}"
"-rfbauth $HOME/.vnc/passwd"
"-AcceptSetDesktopSize=0"
"-AlwaysShared"
] #++ lib.optionals (opts.geometry != "") [ "-Geometry ${opts.geometry}" ]
++ lib.optionals opts.localhost [ "-localhost" ];
in ''
set -euxo pipefail
# Password check
mkdir -p "$HOME/.vnc"
if [ ! -r "$HOME/.vnc/passwd" ]; then
echo "ERROR: Run: vncpasswd ~/.vnc/passwd" >&2
### CHANGE THE &gt; in the above line TO A GREATER THAN SIGN! ###
exit 1
fi
# X authority
xhost +local:
# Clean x0vncserver args
${pkgs.tigervnc}/bin/x0vncserver ${lib.concatStringsSep " " (map (arg: "${arg}") vncArgs)}
'';
preStop = ''
xhost -local:
pkill -f "x0vncserver.*${toString opts.port}"
'';
serviceConfig = {
Type = "simple";
Restart = "always";
RestartSec = "5s";
RuntimeDirectory = "vnc-${user}";
};
};
}
) cfg.users;
networking.firewall.allowedTCPPorts =
lib.mapAttrsToList (_: opts: opts.port) cfg.users;
};
}