From 1d4b80b240650eab84824cb11ba9600bf44b8aaa Mon Sep 17 00:00:00 2001 From: Mikael Voss Date: Sun, 25 Aug 2024 11:11:12 +0200 Subject: [PATCH] Switch compositor to niri --- flake.lock | 1001 ++++++++++++++++++++++++++++++++++- flake.nix | 5 + home/config/nil/home.nix | 5 +- home/config/nil/wayland.nix | 218 +++----- overlay/default.nix | 3 +- 5 files changed, 1086 insertions(+), 146 deletions(-) diff --git a/flake.lock b/flake.lock index edcba0a..e8d1a6b 100644 --- a/flake.lock +++ b/flake.lock @@ -114,6 +114,108 @@ "type": "github" } }, + "cachix": { + "inputs": { + "devenv": [ + "niri", + "crate2nix" + ], + "flake-compat": [ + "niri", + "crate2nix" + ], + "nixpkgs": "nixpkgs", + "pre-commit-hooks": [ + "niri", + "crate2nix" + ] + }, + "locked": { + "lastModified": 1709700175, + "narHash": "sha256-A0/6ZjLmT9qdYzKHmevnEIC7G+GiZ4UCr8v0poRPzds=", + "owner": "cachix", + "repo": "cachix", + "rev": "be97b37989f11b724197b5f4c7ffd78f12c8c4bf", + "type": "github" + }, + "original": { + "owner": "cachix", + "ref": "latest", + "repo": "cachix", + "type": "github" + } + }, + "cachix_2": { + "inputs": { + "devenv": [ + "niri", + "crate2nix", + "crate2nix_stable" + ], + "flake-compat": [ + "niri", + "crate2nix", + "crate2nix_stable" + ], + "nixpkgs": "nixpkgs_2", + "pre-commit-hooks": [ + "niri", + "crate2nix", + "crate2nix_stable" + ] + }, + "locked": { + "lastModified": 1716549461, + "narHash": "sha256-lHy5kgx6J8uD+16SO47dPrbob98sh+W1tf4ceSqPVK4=", + "owner": "cachix", + "repo": "cachix", + "rev": "e2bb269fb8c0828d5d4d2d7b8d09ea85abcacbd4", + "type": "github" + }, + "original": { + "owner": "cachix", + "ref": "latest", + "repo": "cachix", + "type": "github" + } + }, + "cachix_3": { + "inputs": { + "devenv": [ + "niri", + "crate2nix", + "crate2nix_stable", + "crate2nix_stable" + ], + "flake-compat": [ + "niri", + "crate2nix", + "crate2nix_stable", + "crate2nix_stable" + ], + "nixpkgs": "nixpkgs_3", + "pre-commit-hooks": [ + "niri", + "crate2nix", + "crate2nix_stable", + "crate2nix_stable" + ] + }, + "locked": { + "lastModified": 1716549461, + "narHash": "sha256-lHy5kgx6J8uD+16SO47dPrbob98sh+W1tf4ceSqPVK4=", + "owner": "cachix", + "repo": "cachix", + "rev": "e2bb269fb8c0828d5d4d2d7b8d09ea85abcacbd4", + "type": "github" + }, + "original": { + "owner": "cachix", + "ref": "latest", + "repo": "cachix", + "type": "github" + } + }, "colmena": { "inputs": { "flake-compat": "flake-compat", @@ -158,6 +260,174 @@ "type": "github" } }, + "crate2nix": { + "inputs": { + "cachix": "cachix", + "crate2nix_stable": "crate2nix_stable", + "devshell": "devshell_3", + "flake-compat": "flake-compat_5", + "flake-parts": "flake-parts_4", + "nix-test-runner": "nix-test-runner_3", + "nixpkgs": "nixpkgs_6", + "pre-commit-hooks": "pre-commit-hooks_3" + }, + "locked": { + "lastModified": 1723311214, + "narHash": "sha256-xdGZQBEa1AC2us/sY3igS/CucWY6jErXsAvCFRhB2LI=", + "owner": "nix-community", + "repo": "crate2nix", + "rev": "236f6addfd452a48be805819e3216af79e988fd5", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "crate2nix", + "type": "github" + } + }, + "crate2nix_stable": { + "inputs": { + "cachix": "cachix_2", + "crate2nix_stable": "crate2nix_stable_2", + "devshell": "devshell_2", + "flake-compat": "flake-compat_4", + "flake-parts": "flake-parts_3", + "nix-test-runner": "nix-test-runner_2", + "nixpkgs": "nixpkgs_5", + "pre-commit-hooks": "pre-commit-hooks_2" + }, + "locked": { + "lastModified": 1719760004, + "narHash": "sha256-esWhRnt7FhiYq0CcIxw9pvH+ybOQmWBfHYMtleaMhBE=", + "owner": "nix-community", + "repo": "crate2nix", + "rev": "1dee214bb20855fa3e1e7bb98d28922ddaff8c57", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "0.14.1", + "repo": "crate2nix", + "type": "github" + } + }, + "crate2nix_stable_2": { + "inputs": { + "cachix": "cachix_3", + "crate2nix_stable": "crate2nix_stable_3", + "devshell": "devshell", + "flake-compat": "flake-compat_3", + "flake-parts": "flake-parts_2", + "nix-test-runner": "nix-test-runner", + "nixpkgs": "nixpkgs_4", + "pre-commit-hooks": "pre-commit-hooks" + }, + "locked": { + "lastModified": 1712821484, + "narHash": "sha256-rGT3CW64cJS9nlnWPFWSc1iEa3dNZecVVuPVGzcsHe8=", + "owner": "nix-community", + "repo": "crate2nix", + "rev": "42883afcad3823fa5811e967fb7bff54bc3c9d6d", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "0.14.0", + "repo": "crate2nix", + "type": "github" + } + }, + "crate2nix_stable_3": { + "inputs": { + "flake-utils": "flake-utils_3" + }, + "locked": { + "lastModified": 1702842982, + "narHash": "sha256-A9AowkHIjsy1a4LuiPiVP88FMxyCWK41flZEZOUuwQM=", + "owner": "nix-community", + "repo": "crate2nix", + "rev": "75ac2973affa6b9b4f661a7b592cba6e4f51d426", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "0.12.0", + "repo": "crate2nix", + "type": "github" + } + }, + "devshell": { + "inputs": { + "flake-utils": "flake-utils_4", + "nixpkgs": [ + "niri", + "crate2nix", + "crate2nix_stable", + "crate2nix_stable", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1717408969, + "narHash": "sha256-Q0OEFqe35fZbbRPPRdrjTUUChKVhhWXz3T9ZSKmaoVY=", + "owner": "numtide", + "repo": "devshell", + "rev": "1ebbe68d57457c8cae98145410b164b5477761f4", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "devshell", + "type": "github" + } + }, + "devshell_2": { + "inputs": { + "flake-utils": "flake-utils_5", + "nixpkgs": [ + "niri", + "crate2nix", + "crate2nix_stable", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1717408969, + "narHash": "sha256-Q0OEFqe35fZbbRPPRdrjTUUChKVhhWXz3T9ZSKmaoVY=", + "owner": "numtide", + "repo": "devshell", + "rev": "1ebbe68d57457c8cae98145410b164b5477761f4", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "devshell", + "type": "github" + } + }, + "devshell_3": { + "inputs": { + "flake-utils": "flake-utils_6", + "nixpkgs": [ + "niri", + "crate2nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1711099426, + "narHash": "sha256-HzpgM/wc3aqpnHJJ2oDqPBkNsqWbW0WfWUO8lKu8nGk=", + "owner": "numtide", + "repo": "devshell", + "rev": "2d45b54ca4a183f2fdcf4b19c895b64fbf620ee8", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "devshell", + "type": "github" + } + }, "flake-compat": { "flake": false, "locked": { @@ -191,6 +461,48 @@ } }, "flake-compat_3": { + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "revCount": 57, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" + } + }, + "flake-compat_4": { + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "revCount": 57, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" + } + }, + "flake-compat_5": { + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "revCount": 57, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" + } + }, + "flake-compat_6": { "flake": false, "locked": { "lastModified": 1673956053, @@ -227,6 +539,93 @@ "type": "github" } }, + "flake-parts_2": { + "inputs": { + "nixpkgs-lib": [ + "niri", + "crate2nix", + "crate2nix_stable", + "crate2nix_stable", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1719745305, + "narHash": "sha256-xwgjVUpqSviudEkpQnioeez1Uo2wzrsMaJKJClh+Bls=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "c3c5ecc05edc7dafba779c6c1a61cd08ac6583e9", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_3": { + "inputs": { + "nixpkgs-lib": [ + "niri", + "crate2nix", + "crate2nix_stable", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1719745305, + "narHash": "sha256-xwgjVUpqSviudEkpQnioeez1Uo2wzrsMaJKJClh+Bls=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "c3c5ecc05edc7dafba779c6c1a61cd08ac6583e9", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_4": { + "inputs": { + "nixpkgs-lib": [ + "niri", + "crate2nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1712014858, + "narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "9126214d0a59633752a136528f5f3b9aa8565b7d", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_5": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1722555600, + "narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "8471fe90ad337a8074e957b69ca4d0089218391d", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "flake-utils": { "locked": { "lastModified": 1659877975, @@ -261,6 +660,96 @@ } }, "flake-utils_3": { + "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" + } + }, + "flake-utils_4": { + "inputs": { + "systems": "systems_3" + }, + "locked": { + "lastModified": 1701680307, + "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_5": { + "inputs": { + "systems": "systems_4" + }, + "locked": { + "lastModified": 1701680307, + "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_6": { + "inputs": { + "systems": "systems_5" + }, + "locked": { + "lastModified": 1701680307, + "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_7": { + "inputs": { + "systems": "systems_6" + }, + "locked": { + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_8": { "inputs": { "systems": [ "stylix", @@ -334,6 +823,78 @@ "type": "github" } }, + "gitignore_2": { + "inputs": { + "nixpkgs": [ + "niri", + "crate2nix", + "crate2nix_stable", + "crate2nix_stable", + "pre-commit-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, + "gitignore_3": { + "inputs": { + "nixpkgs": [ + "niri", + "crate2nix", + "crate2nix_stable", + "pre-commit-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, + "gitignore_4": { + "inputs": { + "nixpkgs": [ + "niri", + "crate2nix", + "pre-commit-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, "gnome-shell": { "flake": false, "locked": { @@ -431,6 +992,65 @@ "url": "https://git.lix.systems/lix-project/nixos-module/archive/2.91.0.tar.gz" } }, + "niri": { + "inputs": { + "crate2nix": "crate2nix", + "flake-parts": "flake-parts_5", + "niri-stable": "niri-stable", + "niri-unstable": "niri-unstable", + "nixpkgs": [ + "nixpkgs" + ], + "nixpkgs-stable": "nixpkgs-stable_2", + "xwayland-satellite": "xwayland-satellite" + }, + "locked": { + "lastModified": 1724537228, + "narHash": "sha256-KdJskKn2w5WPuZRa0vAr+XpEfiFOvx0GIrltCOGjXh0=", + "owner": "sodiboo", + "repo": "niri-flake", + "rev": "d4f6eb418333fdbb3bb51dd6bfc472a750060acd", + "type": "github" + }, + "original": { + "owner": "sodiboo", + "repo": "niri-flake", + "type": "github" + } + }, + "niri-stable": { + "flake": false, + "locked": { + "lastModified": 1723290956, + "narHash": "sha256-13xynDWoOqogUKZTf6lz267hEQGdCE+BE6acs2G3j8k=", + "owner": "YaLTeR", + "repo": "niri", + "rev": "9063a5dbdc0d4470dc1e13ce5749838e32af6a44", + "type": "github" + }, + "original": { + "owner": "YaLTeR", + "ref": "v0.1.8", + "repo": "niri", + "type": "github" + } + }, + "niri-unstable": { + "flake": false, + "locked": { + "lastModified": 1724485772, + "narHash": "sha256-aBxMEp2Xv03zSiqcocNWGwGYj5Qi/VzFSQS98vFlgzc=", + "owner": "YaLTeR", + "repo": "niri", + "rev": "b2c7d3ad401574a3db01ed20acd67ebc8d331cbc", + "type": "github" + }, + "original": { + "owner": "YaLTeR", + "repo": "niri", + "type": "github" + } + }, "nix-index-database": { "inputs": { "nixpkgs": [ @@ -451,6 +1071,54 @@ "type": "github" } }, + "nix-test-runner": { + "flake": false, + "locked": { + "lastModified": 1588761593, + "narHash": "sha256-FKJykltAN/g3eIceJl4SfDnnyuH2jHImhMrXS2KvGIs=", + "owner": "stoeffel", + "repo": "nix-test-runner", + "rev": "c45d45b11ecef3eb9d834c3b6304c05c49b06ca2", + "type": "github" + }, + "original": { + "owner": "stoeffel", + "repo": "nix-test-runner", + "type": "github" + } + }, + "nix-test-runner_2": { + "flake": false, + "locked": { + "lastModified": 1588761593, + "narHash": "sha256-FKJykltAN/g3eIceJl4SfDnnyuH2jHImhMrXS2KvGIs=", + "owner": "stoeffel", + "repo": "nix-test-runner", + "rev": "c45d45b11ecef3eb9d834c3b6304c05c49b06ca2", + "type": "github" + }, + "original": { + "owner": "stoeffel", + "repo": "nix-test-runner", + "type": "github" + } + }, + "nix-test-runner_3": { + "flake": false, + "locked": { + "lastModified": 1588761593, + "narHash": "sha256-FKJykltAN/g3eIceJl4SfDnnyuH2jHImhMrXS2KvGIs=", + "owner": "stoeffel", + "repo": "nix-test-runner", + "rev": "c45d45b11ecef3eb9d834c3b6304c05c49b06ca2", + "type": "github" + }, + "original": { + "owner": "stoeffel", + "repo": "nix-test-runner", + "type": "github" + } + }, "nixos-hardware": { "locked": { "lastModified": 1724495652, @@ -468,20 +1136,32 @@ }, "nixpkgs": { "locked": { - "lastModified": 1724395761, - "narHash": "sha256-zRkDV/nbrnp3Y8oCADf5ETl1sDrdmAW6/bBVJ8EbIdQ=", + "lastModified": 1700612854, + "narHash": "sha256-yrQ8osMD+vDLGFX7pcwsY/Qr5PUd6OmDMYJZzZi0+zc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ae815cee91b417be55d43781eb4b73ae1ecc396c", + "rev": "19cbff58383a4ae384dea4d1d0c823d72b49d614", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixpkgs-unstable", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } }, + "nixpkgs-lib": { + "locked": { + "lastModified": 1722555339, + "narHash": "sha256-uFf2QeW7eAHlYXuDktm9c25OxOyCoUOQmh5SZ9amE5Q=", + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz" + } + }, "nixpkgs-stable": { "locked": { "lastModified": 1720386169, @@ -498,6 +1178,110 @@ "type": "github" } }, + "nixpkgs-stable_2": { + "locked": { + "lastModified": 1724316499, + "narHash": "sha256-Qb9MhKBUTCfWg/wqqaxt89Xfi6qTD3XpTzQ9eXi3JmE=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "797f7dc49e0bc7fab4b57c021cdf68f595e47841", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-24.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1715534503, + "narHash": "sha256-5ZSVkFadZbFP1THataCaSf0JH2cAH3S29hU9rrxTEqk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "2057814051972fa1453ddfb0d98badbea9b83c06", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1715534503, + "narHash": "sha256-5ZSVkFadZbFP1THataCaSf0JH2cAH3S29hU9rrxTEqk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "2057814051972fa1453ddfb0d98badbea9b83c06", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { + "locked": { + "lastModified": 1719506693, + "narHash": "sha256-C8e9S7RzshSdHB7L+v9I51af1gDM5unhJ2xO1ywxNH8=", + "path": "/nix/store/4p0avw1s3vf27hspgqsrqs37gxk4i83i-source", + "rev": "b2852eb9365c6de48ffb0dc2c9562591f652242a", + "type": "path" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "nixpkgs_5": { + "locked": { + "lastModified": 1719506693, + "narHash": "sha256-C8e9S7RzshSdHB7L+v9I51af1gDM5unhJ2xO1ywxNH8=", + "path": "/nix/store/4p0avw1s3vf27hspgqsrqs37gxk4i83i-source", + "rev": "b2852eb9365c6de48ffb0dc2c9562591f652242a", + "type": "path" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "nixpkgs_6": { + "locked": { + "lastModified": 1712026416, + "narHash": "sha256-N/3VR/9e1NlN49p7kCiATiEY6Tzdo+CbrAG8kqCQKcI=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "080a4a27f206d07724b88da096e27ef63401a504", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "nixpkgs_7": { + "locked": { + "lastModified": 1724395761, + "narHash": "sha256-zRkDV/nbrnp3Y8oCADf5ETl1sDrdmAW6/bBVJ8EbIdQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "ae815cee91b417be55d43781eb4b73ae1ecc396c", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nur": { "locked": { "lastModified": 1724513920, @@ -513,6 +1297,45 @@ "type": "github" } }, + "pre-commit-hooks": { + "inputs": { + "flake-compat": [ + "niri", + "crate2nix", + "crate2nix_stable", + "crate2nix_stable", + "flake-compat" + ], + "gitignore": "gitignore_2", + "nixpkgs": [ + "niri", + "crate2nix", + "crate2nix_stable", + "crate2nix_stable", + "nixpkgs" + ], + "nixpkgs-stable": [ + "niri", + "crate2nix", + "crate2nix_stable", + "crate2nix_stable", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1719259945, + "narHash": "sha256-F1h+XIsGKT9TkGO3omxDLEb/9jOOsI6NnzsXFsZhry4=", + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "rev": "0ff4381bbb8f7a52ca4a851660fc7a437a4c6e07", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "type": "github" + } + }, "pre-commit-hooks-nix": { "inputs": { "flake-compat": [ @@ -540,15 +1363,86 @@ "type": "github" } }, + "pre-commit-hooks_2": { + "inputs": { + "flake-compat": [ + "niri", + "crate2nix", + "crate2nix_stable", + "flake-compat" + ], + "gitignore": "gitignore_3", + "nixpkgs": [ + "niri", + "crate2nix", + "crate2nix_stable", + "nixpkgs" + ], + "nixpkgs-stable": [ + "niri", + "crate2nix", + "crate2nix_stable", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1719259945, + "narHash": "sha256-F1h+XIsGKT9TkGO3omxDLEb/9jOOsI6NnzsXFsZhry4=", + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "rev": "0ff4381bbb8f7a52ca4a851660fc7a437a4c6e07", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "type": "github" + } + }, + "pre-commit-hooks_3": { + "inputs": { + "flake-compat": [ + "niri", + "crate2nix", + "flake-compat" + ], + "flake-utils": "flake-utils_7", + "gitignore": "gitignore_4", + "nixpkgs": [ + "niri", + "crate2nix", + "nixpkgs" + ], + "nixpkgs-stable": [ + "niri", + "crate2nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1712055707, + "narHash": "sha256-4XLvuSIDZJGS17xEwSrNuJLL7UjDYKGJSbK1WWX2AK8=", + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "rev": "e35aed5fda3cc79f88ed7f1795021e559582093a", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "type": "github" + } + }, "root": { "inputs": { "colmena": "colmena", "home-manager": "home-manager", "lanzaboote": "lanzaboote", "lix-module": "lix-module", + "niri": "niri", "nix-index-database": "nix-index-database", "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs", + "nixpkgs": "nixpkgs_7", "nur": "nur", "rust-overlay": "rust-overlay_2", "stylix": "stylix" @@ -620,8 +1514,8 @@ "base16-kitty": "base16-kitty", "base16-tmux": "base16-tmux", "base16-vim": "base16-vim", - "flake-compat": "flake-compat_3", - "flake-utils": "flake-utils_3", + "flake-compat": "flake-compat_6", + "flake-utils": "flake-utils_8", "gnome-shell": "gnome-shell", "home-manager": [ "home-manager" @@ -629,7 +1523,7 @@ "nixpkgs": [ "nixpkgs" ], - "systems": "systems_2" + "systems": "systems_7" }, "locked": { "lastModified": 1724444244, @@ -674,6 +1568,97 @@ "repo": "default", "type": "github" } + }, + "systems_3": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_4": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_5": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_6": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_7": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "xwayland-satellite": { + "flake": false, + "locked": { + "lastModified": 1723095288, + "narHash": "sha256-cUlTHg/F0tUpjS/uAIYKwrIRaKwuzdyFo3IiST6E7Fc=", + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "rev": "95afa163a60167cd97bf6afa870bc117a1be3d03", + "type": "github" + }, + "original": { + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index fba3756..10c4777 100644 --- a/flake.nix +++ b/flake.nix @@ -41,6 +41,11 @@ url = "github:oxalica/rust-overlay"; inputs.nixpkgs.follows = "nixpkgs"; }; + + niri = { + url = "github:sodiboo/niri-flake"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; nixConfig = { diff --git a/home/config/nil/home.nix b/home/config/nil/home.nix index 37d73b5..2b2066f 100644 --- a/home/config/nil/home.nix +++ b/home/config/nil/home.nix @@ -1,4 +1,4 @@ -{ self, nur, stylix, nix-index-database, ... }: { config, lib, pkgs, ... }@args: +{ self, nur, stylix, nix-index-database, niri, ... }: { config, lib, pkgs, ... }@args: let osConfig = args.osConfig or { }; in { @@ -7,6 +7,9 @@ in { self.homeModules.locale-en_EU nix-index-database.hmModules.nix-index stylix.homeManagerModules.stylix + + niri.homeModules.config + niri.homeModules.stylix ] ++ self.lib.mods [ ./firefox.nix ./wayland.nix diff --git a/home/config/nil/wayland.nix b/home/config/nil/wayland.nix index 1aaab50..dc876de 100644 --- a/home/config/nil/wayland.nix +++ b/home/config/nil/wayland.nix @@ -17,6 +17,7 @@ let cmd = { brightnessctl = "${pkgs.brightnessctl}/bin/brightnessctl"; fish = "${osConfig.programs.fish.package}/bin/fish"; + fuzzel = "${config.programs.fuzzel.package}/bin/fuzzel"; grim = "${pkgs.grim}/bin/grim -l 9"; jq = "${config.programs.jq.package}/bin/jq"; keepassxc = "${pkgs.keepassxc}/bin/keepassxc"; @@ -30,8 +31,6 @@ let pwvucontrol = "${pkgs.pwvucontrol}/bin/pwvucontrol"; slurp = "${pkgs.slurp}/bin/slurp"; swaylock = "${config.programs.swaylock.package}/bin/swaylock"; - swaymsg = "${config.wayland.windowManager.sway.package}/bin/swaymsg"; - tofi-drun = "${config.programs.tofi.package}/bin/tofi-drun"; waybar = "${config.programs.waybar.package}/bin/waybar"; wl-copy = "${pkgs.wl-clipboard}/bin/wl-copy"; wpctl = "${osConfig.services.pipewire.wireplumber.package}/bin/wpctl"; @@ -146,6 +145,10 @@ in lib.mkIf (osConfig.hardware.graphics.enable or false) { programs.eza.extraOptions = lib.mkAfter [ "--hyperlink" ]; + programs.fuzzel = { + enable = true; + }; + programs.imv.enable = true; programs.kitty = { @@ -263,6 +266,82 @@ in lib.mkIf (osConfig.hardware.graphics.enable or false) { }; }; + programs.niri = { + settings = { + prefer-no-csd = true; + + input = { + keyboard = { + xkb = with config.home.keyboard; { + inherit layout; + options = lib.concatStringsSep "," options; + }; + }; + + focus-follows-mouse.enable = true; + + touchpad = { + dwt = true; + dwtp = true; + }; + }; + + outputs = { + eDP-1 = { + scale = 1; + variable-refresh-rate = true; + }; + + DP-6 = { + mode = { width = 5120; height = 2160; }; + scale = 1; + position = { x = 0; y = 0; }; + variable-refresh-rate = true; + }; + }; + + layout = { + border.enable = lib.mkForce false; + focus-ring = { + enable = true; + width = 1; + }; + + default-column-width.proportion = 1. / 3.; + + gaps = 5; + + preset-column-widths = [ + { proportion = 1. / 3.; } + { proportion = 1. / 2.; } + { proportion = 2. / 3.; } + ]; + }; + + binds = with config.lib.niri.actions; with cmd; lib.mkOptionDefault { + "Mod+Return".action = spawn "kitty"; + "Mod+Shift+Return".action = spawn "${kitty} fish --private"; + "Mod+e".action = spawn "${fuzzel}"; + + "Mod+Up".action = focus-window-or-workspace-up; + "Mod+Down".action = focus-window-or-workspace-down; + "Mod+Left".action = focus-column-left; + "Mod+Right".action = focus-column-right; + + "Mod+Ctrl+Up".action = move-window-up-or-to-workspace-up; + "Mod+Ctrl+Down".action = move-window-up-or-to-workspace-up; + "Mod+Ctrl+Left".action = move-column-left; + "Mod+Ctrl+Right".action = move-column-right; + + "Mod+WheelScrollUp".action = focus-window-up-or-column-left; + "Mod+WheelScrollDown".action = focus-window-down-or-column-right; + + "Mod+g".action = consume-window-into-column; + "Mod+b".action = expel-window-from-column; + }; + }; + }; + programs.sioyek = { enable = true; bindings = { @@ -383,11 +462,10 @@ in lib.mkIf (osConfig.hardware.graphics.enable or false) { position = "bottom"; modules-left = [ - "sway/workspaces" "tray" ]; - modules-center = [ "sway/window" ]; + modules-center = [ ]; modules-right = [ "network#down" @@ -409,11 +487,6 @@ in lib.mkIf (osConfig.hardware.graphics.enable or false) { ipc = true; - "sway/window" = { - format = "{title}"; - on-click-right = with cmd; "${swaymsg} -t get_tree | jq -r '.. | select(.focused?) | .pid' | ${xargs} kill --"; - }; - "network#down" = { format = "󰅀 {bandwidthDownBytes}"; }; @@ -653,11 +726,6 @@ in lib.mkIf (osConfig.hardware.graphics.enable or false) { timeout = 240; command = "${loginctl} lock-session"; } - { - timeout = 270; - command = "${swaymsg} output '*' dpms off"; - resumeCommand = "${swaymsg} output '*' dpms on"; - } ]; }; @@ -719,128 +787,6 @@ in lib.mkIf (osConfig.hardware.graphics.enable or false) { }; }); - wayland.windowManager.sway = { - enable = true; - checkConfig = false; - xwayland = false; - - wrapperFeatures = { - base = true; - gtk = true; - }; - - systemd.variables = lib.mkAfter [ "PATH" ]; - - extraSessionCommands = let - env = { - WLR_RENDERER = "vulkan"; - NIXOS_OZONE_WL = 1; - }; - in env - |> lib.mapAttrsToList (n: v: "export ${lib.toShellVar n v}\n") - |> lib.concatStrings; - - config = with cmd; { - input."*" = { - xkb_layout = "us,${config.home.keyboard.layout}"; - xkb_options = lib.concatStringsSep "," - config.home.keyboard.options; - xkb_switch_layout = "1"; - }; - - output = { - "*" = { - scale = "1"; - background = "${./wallpaper.png} fill"; - adaptive_sync = "on"; - }; - - "Lenovo Group Limited P40w-20 V9084N0R" = { - resolution = "5120x2160"; - position = "0 0"; - subpixel = "rgb"; - }; - - "LG Display 0x06AA Unknown" = { - position = "0 2160"; - subpixel = "rgb"; - }; - }; - - bars = [ - { - command = waybar; - fonts = lib.mkForce { - names = [ "monospace" ]; - size = 11.0; - }; - } - ]; - - gaps = { - inner = 4; - outer = null; - }; - - floating = { - border = 1; - titlebar = false; - }; - - window = { - border = 1; - titlebar = false; - }; - - bindkeysToCode = true; - modifier = "Mod4"; - terminal = kitty; - menu = "${tofi-drun} | ${xargs} ${swaymsg} exec --"; - - keybindings = let - mod = config.wayland.windowManager.sway.config.modifier; - in lib.mkOptionDefault { - # Workspaces - "${mod}+Grave" = "workspace number 0"; - "${mod}+Shift+Grave" = "move container to workspace number 0"; - - "${mod}+Shift+Return" = "exec ${kitty} ${fish} --private"; - - # Function keys - XF86MonBrightnessUp = "exec ${brightnessctl} -e set +5%"; - XF86MonBrightnessDown = "exec ${brightnessctl} -e set 5%-"; - XF86AudioRaiseVolume = "exec ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ +2dB"; - XF86AudioLowerVolume = "exec ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ -2dB"; - XF86AudioMute = "exec ${wpctl} set-mute @DEFAULT_AUDIO_SINK@ toggle"; - XF86AudioMicMute = "exec ${wpctl} set-mute @DEFAULT_AUDIO_SOURCE@ toggle"; - XF86AudioNext = "exec ${playerctl} next"; - XF86AudioPrev = "exec ${playerctl} previous"; - XF86AudioPlay = "exec ${playerctl} play"; - XF86AudioStop = "exec ${playerctl} pause"; - XF86Explorer = "exec ${xdg-open} https:"; - - # Screenshots - "${mod}+Print" = "exec ${grim} -g - - | ${wl-copy}"; - "${mod}+Shift+Print" = "exec ${slurp} | ${grim} -g - - | ${wl-copy}"; - "${mod}+Ctrl+Print" = '' - exec ${swaymsg} -t get_tree \ - | ${jq} -r '.. | select(.focused?) | .rect | "\(.x),\(.y) \(.width)x\(.height)"' \ - | ${grim} -g - - \ - | ${wl-copy} - ''; - }; - - startup = [ - { command = "${swaymsg} input '*' xkb_switch_layout 1"; always = true; } - { command = "${keepassxc}"; } - ]; - }; - - extraConfig = '' - force_display_urgency_hint 500 - ''; - }; - xdg.configFile."fontconfig/conf.d/80-fira-code.conf".text = '' diff --git a/overlay/default.nix b/overlay/default.nix index cb28d35..cf8e1b6 100644 --- a/overlay/default.nix +++ b/overlay/default.nix @@ -1,4 +1,4 @@ -{ self, nixpkgs, lix-module, colmena, rust-overlay, ... }: +{ self, nixpkgs, lix-module, colmena, rust-overlay, niri, ... }: final: prev: @@ -6,6 +6,7 @@ nixpkgs.lib.composeManyExtensions [ lix-module.overlays.default colmena.overlays.default rust-overlay.overlays.default + niri.overlays.niri self.overlays.no-x self.overlays.no-alsa self.overlays.no-jemalloc