diff --git a/flake.lock b/flake.lock index a5cab38..b6f12b4 100755 --- a/flake.lock +++ b/flake.lock @@ -44,11 +44,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1744963141, - "narHash": "sha256-OVdHdvP+5bXSmSYeuYmoVgZOD9miU6vM/5ia4c36bxs=", + "lastModified": 1746626503, + "narHash": "sha256-mRnIdJLP+0NSim9ao30ue0Z3ttSuxzXwQG7UN1KuKfU=", "owner": "nix-community", "repo": "buildbot-nix", - "rev": "df395905be3183741bb0d207a958ce454ba5057f", + "rev": "7ad9b4886eccb5eecc0686a16266ddabf6cbefe9", "type": "github" }, "original": { @@ -305,7 +305,7 @@ }, "flake-utils_2": { "inputs": { - "systems": "systems_2" + "systems": "systems_4" }, "locked": { "lastModified": 1731533236, @@ -322,24 +322,6 @@ } }, "flake-utils_3": { - "inputs": { - "systems": "systems_5" - }, - "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_4": { "inputs": { "systems": [ "ngipkgs", @@ -360,9 +342,9 @@ "type": "github" } }, - "flake-utils_5": { + "flake-utils_4": { "inputs": { - "systems": "systems_8" + "systems": "systems_7" }, "locked": { "lastModified": 1731533236, @@ -403,11 +385,11 @@ "zon2nix": "zon2nix" }, "locked": { - "lastModified": 1746309933, - "narHash": "sha256-+NoXOpVFuqIC3EiPBkOT8RVS2RkWSpA5ghBIR3QaGTM=", + "lastModified": 1747243928, + "narHash": "sha256-0Z2ierPsjbg4iDOiwwBW28NapXZFSDyRL9E4XKTYop4=", "owner": "ghostty-org", "repo": "ghostty", - "rev": "b6f338065eb45935627a51a7d9102019aaeae1c0", + "rev": "a090e8eeeda7015f7cadbd4aa0ea4654a8026a71", "type": "github" }, "original": { @@ -483,18 +465,17 @@ }, "helix": { "inputs": { - "flake-utils": "flake-utils_2", "nixpkgs": [ "nixpkgs" ], "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1746193606, - "narHash": "sha256-LD3ce/SlIY8Wr8XG52EI5t9bNa/peBCXykIJBvcGmO8=", + "lastModified": 1747230720, + "narHash": "sha256-Q6cNfZ+uGJ8gE0yerwwljnXCH1qcCaUJeUeNV0jBoVs=", "owner": "helix-editor", "repo": "helix", - "rev": "12139a4c30ad20d9a1b181de69532a57601cf96f", + "rev": "6be38642f4f352a44bc6aabc5f0af6a0d941eecc", "type": "github" }, "original": { @@ -517,11 +498,11 @@ ] }, "locked": { - "lastModified": 1742014779, - "narHash": "sha256-I6fG1zrfdLFcp/imGZElig0BJO3YU0QEXLgvwWoOpJ8=", + "lastModified": 1744693102, + "narHash": "sha256-1Z4WPGVky4w3lrhrgs89OKsLzPdtkbi1bPLNFWsoLfY=", "owner": "hercules-ci", "repo": "hercules-ci-effects", - "rev": "524637ef84c177661690b924bf64a1ce18072a2c", + "rev": "5b6cec51c9ec095a0d3fd4c8eeb53eb5c59ae33e", "type": "github" }, "original": { @@ -537,11 +518,11 @@ ] }, "locked": { - "lastModified": 1746317522, - "narHash": "sha256-/jZ4Wd4HHUEWPSlNj48k1E4Mh+1fUbwI/vSlPPIMG3U=", + "lastModified": 1747225851, + "narHash": "sha256-4IbmZrNOdXP143kZEUzxBS5SqyxUlaSHLgdpeJfP2ZU=", "owner": "nix-community", "repo": "home-manager", - "rev": "621986fed37c5d0cb8df010ed8369694dc47c09b", + "rev": "6bf057fc8326e83bda05a669fc08d106547679fb", "type": "github" }, "original": { @@ -622,15 +603,15 @@ "nixpkgs" ], "pre-commit-hooks": "pre-commit-hooks", - "systems": "systems_3", + "systems": "systems_2", "xdph": "xdph" }, "locked": { - "lastModified": 1746310409, - "narHash": "sha256-iSyQZMaYjVfr+vb7jO0N9Bh8V9m51ZYUqxWd9BimUpQ=", + "lastModified": 1747247479, + "narHash": "sha256-y+S9IsF+VbGPvSh/Xr/Qbz1/xGtpsU4DbEE+PnvKg8I=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "adbae0f74d951e06c575bad3c81a944027dfe413", + "rev": "75f2cb5f6559ca6ca7c6300b270e5ddc3fdabe31", "type": "github" }, "original": { @@ -648,7 +629,7 @@ "nixpkgs": [ "nixpkgs" ], - "systems": "systems_4" + "systems": "systems_3" }, "locked": { "lastModified": 1745871725, @@ -798,11 +779,11 @@ ] }, "locked": { - "lastModified": 1745357019, - "narHash": "sha256-q/C3qj9FWHQenObXuw/nGIT8iIsWFjgmcQYcA+ZfpPs=", + "lastModified": 1746655412, + "narHash": "sha256-kVQ0bHVtX6baYxRWWIh4u3LNJZb9Zcm2xBeDPOGz5BY=", "owner": "hyprwm", "repo": "hyprlang", - "rev": "397600c42b8d7a443a5b4e92aa15f46650a90f18", + "rev": "557241780c179cf7ef224df392f8e67dab6cef83", "type": "github" }, "original": { @@ -852,11 +833,11 @@ ] }, "locked": { - "lastModified": 1745975815, - "narHash": "sha256-s3GzsRxBL/N/xYgUXZhQh4t62uR1BN4zxXgWBtJ3lWM=", + "lastModified": 1746635225, + "narHash": "sha256-W9G9bb0zRYDBRseHbVez0J8qVpD5QbizX67H/vsudhM=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "05878d9470c9e5cbc8807813f9ec2006627a0ca0", + "rev": "674ea57373f08b7609ce93baff131117a0dfe70d", "type": "github" }, "original": { @@ -956,7 +937,7 @@ }, "lix-module": { "inputs": { - "flake-utils": "flake-utils_3", + "flake-utils": "flake-utils_2", "flakey-profile": "flakey-profile", "lix": "lix", "nixpkgs": [ @@ -979,20 +960,20 @@ "inputs": { "buildbot-nix": "buildbot-nix", "dream2nix": "dream2nix", - "flake-utils": "flake-utils_4", + "flake-utils": "flake-utils_3", "nixpkgs": "nixpkgs", "nixpkgs-stable": "nixpkgs-stable_2", "pre-commit-hooks": "pre-commit-hooks_2", "sops-nix": "sops-nix", - "systems": "systems_6", + "systems": "systems_5", "yants": "yants" }, "locked": { - "lastModified": 1746282349, - "narHash": "sha256-2nrI2bq3sOXv3ZyNEXkG9/hezirARjKNJHJxzbAVufY=", + "lastModified": 1747166468, + "narHash": "sha256-tgVvncOtpeSfqiyO0w1PB5yxtzJW0MB9NTJ+lygwdkk=", "owner": "ngi-nix", "repo": "ngipkgs", - "rev": "4af3e5f735e26b68f2b339361cde14274ea37149", + "rev": "4e4d1e3f7b3cacf70712c144bbd288328878df4a", "type": "github" }, "original": { @@ -1013,11 +994,11 @@ "xwayland-satellite-unstable": "xwayland-satellite-unstable" }, "locked": { - "lastModified": 1746142190, - "narHash": "sha256-t36K3TWLMRWoGyjYyo+H8bBquDcp4orZqNZVagWNjwY=", + "lastModified": 1747152040, + "narHash": "sha256-C6xbCOgSAi+a/1Bk1GPdWd5l791neY5YRWxVM/0cYNg=", "owner": "sodiboo", "repo": "niri-flake", - "rev": "af701c1c16c289b1b14f333d844b4f756308d244", + "rev": "fa50b6e56aaf6c9b32aadc44f7a2e47187e9b6ac", "type": "github" }, "original": { @@ -1046,11 +1027,11 @@ "niri-unstable": { "flake": false, "locked": { - "lastModified": 1746124654, - "narHash": "sha256-LmhkAt2KLvf8lp+kEUQuTFmmv7iXO8IkwwSaPasfXJw=", + "lastModified": 1747145615, + "narHash": "sha256-U6MhqL4QXLojCOKH5yc8GbfOF7Fas36e1nqcPQx6/zQ=", "owner": "YaLTeR", "repo": "niri", - "rev": "6c9705dd4b2eaba25f024d1a3efd7943fd393632", + "rev": "0d6843ea67da91aea37b655be5de92dfeea081b5", "type": "github" }, "original": { @@ -1067,11 +1048,11 @@ "rust-overlay": "rust-overlay_2" }, "locked": { - "lastModified": 1746270539, - "narHash": "sha256-TEJGIS4DALrsnU4599WR+XUD67EEY8LeOXcHnMreKw0=", + "lastModified": 1747220948, + "narHash": "sha256-5aNGtHi4mH9ZBB4cFMgRtmuKWH2afNHJHl9RBvt3J3E=", "owner": "lilyinstarlight", "repo": "nixos-cosmic", - "rev": "4a755a6886b93fd8410782172e2356fef0eadccc", + "rev": "b9afbbf3055d46ec2983ce0cc0d59c544fdb746d", "type": "github" }, "original": { @@ -1082,11 +1063,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1744868846, - "narHash": "sha256-5RJTdUHDmj12Qsv7XOhuospjAjATNiTMElplWnJE9Hs=", + "lastModified": 1746576598, + "narHash": "sha256-FshoQvr6Aor5SnORVvh/ZdJ1Sa2U4ZrIMwKBX5k2wu0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ebe4301cbd8f81c4f8d3244b3632338bbeb6d49c", + "rev": "b3582c75c7f21ce0b429898980eddbbf05c68e55", "type": "github" }, "original": { @@ -1114,11 +1095,11 @@ }, "nixpkgs-stable_2": { "locked": { - "lastModified": 1744440957, - "narHash": "sha256-FHlSkNqFmPxPJvy+6fNLaNeWnF1lZSgqVCl/eWaJRc4=", + "lastModified": 1746810718, + "narHash": "sha256-VljtYzyttmvkWUKTVJVW93qAsJsrBbgAzy7DdnJaQfI=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "26d499fc9f1d567283d5d56fcf367edd815dba1d", + "rev": "0c0bf9c057382d5f6f63d54fd61f1abd5e1c2f63", "type": "github" }, "original": { @@ -1130,11 +1111,11 @@ }, "nixpkgs-stable_3": { "locked": { - "lastModified": 1746055187, - "narHash": "sha256-3dqArYSMP9hM7Qpy5YWhnSjiqniSaT2uc5h2Po7tmg0=", + "lastModified": 1746957726, + "narHash": "sha256-k9ut1LSfHCr0AW82ttEQzXVCqmyWVA5+SHJkS5ID/Jo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3e362ce63e16b9572d8c2297c04f7c19ab6725a5", + "rev": "a39ed32a651fdee6842ec930761e31d1f242cb94", "type": "github" }, "original": { @@ -1146,11 +1127,11 @@ }, "nixpkgs-stable_4": { "locked": { - "lastModified": 1746183838, - "narHash": "sha256-kwaaguGkAqTZ1oK0yXeQ3ayYjs8u/W7eEfrFpFfIDFA=", + "lastModified": 1746957726, + "narHash": "sha256-k9ut1LSfHCr0AW82ttEQzXVCqmyWVA5+SHJkS5ID/Jo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "bf3287dac860542719fe7554e21e686108716879", + "rev": "a39ed32a651fdee6842ec930761e31d1f242cb94", "type": "github" }, "original": { @@ -1178,11 +1159,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1746141548, - "narHash": "sha256-IgBWhX7A2oJmZFIrpRuMnw5RAufVnfvOgHWgIdds+hc=", + "lastModified": 1746904237, + "narHash": "sha256-3e+AVBczosP5dCLQmMoMEogM57gmZ2qrVSrmq9aResQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "f02fddb8acef29a8b32f10a335d44828d7825b78", + "rev": "d89fc19e405cb2d55ce7cc114356846a0ee5e956", "type": "github" }, "original": { @@ -1194,11 +1175,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1746232882, - "narHash": "sha256-MHmBH2rS8KkRRdoU/feC/dKbdlMkcNkB5mwkuipVHeQ=", + "lastModified": 1746904237, + "narHash": "sha256-3e+AVBczosP5dCLQmMoMEogM57gmZ2qrVSrmq9aResQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "7a2622e2c0dbad5c4493cb268aba12896e28b008", + "rev": "d89fc19e405cb2d55ce7cc114356846a0ee5e956", "type": "github" }, "original": { @@ -1233,11 +1214,11 @@ "treefmt-nix": "treefmt-nix_2" }, "locked": { - "lastModified": 1746328741, - "narHash": "sha256-Gnvu7NWTMK+oS44upQzgL/F6jd0RPFH7XAvHoIfKz+k=", + "lastModified": 1747251912, + "narHash": "sha256-zgHG2yUpPRkcz0lJNVFFY47ohKYlZ0IIR+y7vmHfQRs=", "owner": "nix-community", "repo": "NUR", - "rev": "16ec340127198ee7ecb4f85fb723d8de47b6d94d", + "rev": "fde7d7ed44baaa2cffcd570c18bb7981d2696d72", "type": "github" }, "original": { @@ -1256,11 +1237,11 @@ ] }, "locked": { - "lastModified": 1742649964, - "narHash": "sha256-DwOTp7nvfi8mRfuL1escHDXabVXFGT1VlPD1JHrtrco=", + "lastModified": 1746537231, + "narHash": "sha256-Wb2xeSyOsCoTCTj7LOoD6cdKLEROyFAArnYoS+noCWo=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "dcf5072734cb576d2b0c59b2ac44f5050b5eac82", + "rev": "fa466640195d38ec97cf0493d6d6882bc4d14969", "type": "github" }, "original": { @@ -1278,11 +1259,11 @@ ] }, "locked": { - "lastModified": 1742649964, - "narHash": "sha256-DwOTp7nvfi8mRfuL1escHDXabVXFGT1VlPD1JHrtrco=", + "lastModified": 1746537231, + "narHash": "sha256-Wb2xeSyOsCoTCTj7LOoD6cdKLEROyFAArnYoS+noCWo=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "dcf5072734cb576d2b0c59b2ac44f5050b5eac82", + "rev": "fa466640195d38ec97cf0493d6d6882bc4d14969", "type": "github" }, "original": { @@ -1301,11 +1282,11 @@ ] }, "locked": { - "lastModified": 1742649964, - "narHash": "sha256-DwOTp7nvfi8mRfuL1escHDXabVXFGT1VlPD1JHrtrco=", + "lastModified": 1746537231, + "narHash": "sha256-Wb2xeSyOsCoTCTj7LOoD6cdKLEROyFAArnYoS+noCWo=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "dcf5072734cb576d2b0c59b2ac44f5050b5eac82", + "rev": "fa466640195d38ec97cf0493d6d6882bc4d14969", "type": "github" }, "original": { @@ -1371,7 +1352,7 @@ "nur": "nur", "pre-commit-hooks-nix": "pre-commit-hooks-nix", "sops-nix": "sops-nix_2", - "systems": "systems_7", + "systems": "systems_6", "waybar": "waybar", "yazi": "yazi", "zed-editor": "zed-editor" @@ -1406,11 +1387,11 @@ ] }, "locked": { - "lastModified": 1746239644, - "narHash": "sha256-wMvMBMlpS1H8CQdSSgpLeoCWS67ciEkN/GVCcwk7Apc=", + "lastModified": 1747190175, + "narHash": "sha256-s33mQ2s5L/2nyllhRTywgECNZyCqyF4MJeM3vG/GaRo=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "bd32e88bef6da0e021a42fb4120a8df2150e9b8c", + "rev": "58160be7abad81f6f8cb53120d5b88c16e01c06d", "type": "github" }, "original": { @@ -1492,11 +1473,11 @@ ] }, "locked": { - "lastModified": 1744669848, - "narHash": "sha256-pXyanHLUzLNd3MX9vsWG+6Z2hTU8niyphWstYEP3/GU=", + "lastModified": 1746485181, + "narHash": "sha256-PxrrSFLaC7YuItShxmYbMgSuFFuwxBB+qsl9BZUnRvg=", "owner": "Mic92", "repo": "sops-nix", - "rev": "61154300d945f0b147b30d24ddcafa159148026a", + "rev": "e93ee1d900ad264d65e9701a5c6f895683433386", "type": "github" }, "original": { @@ -1512,11 +1493,11 @@ ] }, "locked": { - "lastModified": 1745310711, - "narHash": "sha256-ePyTpKEJTgX0gvgNQWd7tQYQ3glIkbqcW778RpHlqgA=", + "lastModified": 1746485181, + "narHash": "sha256-PxrrSFLaC7YuItShxmYbMgSuFFuwxBB+qsl9BZUnRvg=", "owner": "Mic92", "repo": "sops-nix", - "rev": "5e3e92b16d6fdf9923425a8d4df7496b2434f39c", + "rev": "e93ee1d900ad264d65e9701a5c6f895683433386", "type": "github" }, "original": { @@ -1542,16 +1523,16 @@ }, "systems_2": { "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", "type": "github" }, "original": { "owner": "nix-systems", - "repo": "default", + "repo": "default-linux", "type": "github" } }, @@ -1571,21 +1552,6 @@ } }, "systems_4": { - "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" - } - }, - "systems_5": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -1600,7 +1566,7 @@ "type": "github" } }, - "systems_6": { + "systems_5": { "locked": { "lastModified": 1689347949, "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", @@ -1615,7 +1581,7 @@ "type": "github" } }, - "systems_7": { + "systems_6": { "locked": { "lastModified": 1680978846, "narHash": "sha256-Gtqg8b/v49BFDpDetjclCYXm8mAnTrUzR0JnE2nv5aw=", @@ -1630,7 +1596,7 @@ "type": "github" } }, - "systems_8": { + "systems_7": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -1654,11 +1620,11 @@ ] }, "locked": { - "lastModified": 1743748085, - "narHash": "sha256-uhjnlaVTWo5iD3LXics1rp9gaKgDRQj6660+gbUU3cE=", + "lastModified": 1746216483, + "narHash": "sha256-4h3s1L/kKqt3gMDcVfN8/4v2jqHrgLIe4qok4ApH5x4=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "815e4121d6a5d504c0f96e5be2dd7f871e4fd99d", + "rev": "29ec5026372e0dec56f890e50dbe4f45930320fd", "type": "github" }, "original": { @@ -1770,11 +1736,11 @@ "xwayland-satellite-unstable": { "flake": false, "locked": { - "lastModified": 1745730655, - "narHash": "sha256-Tdsw5lD/XM8i1GnQr7ombqnEaCpt/voPs2AbjuYBbjI=", + "lastModified": 1747111562, + "narHash": "sha256-GAqhWoxaBIk0tgoecZPa8gTHDHxNc0JtlwWHZN2iOOo=", "owner": "Supreeeme", "repo": "xwayland-satellite", - "rev": "56a681bfecc5831f41f8eb0ec8c7e96c6b277153", + "rev": "ec9ff64c1e0cbec42710b580b7c0f759b1694e72", "type": "github" }, "original": { @@ -1801,16 +1767,16 @@ }, "yazi": { "inputs": { - "flake-utils": "flake-utils_5", + "flake-utils": "flake-utils_4", "nixpkgs": "nixpkgs_4", "rust-overlay": "rust-overlay_3" }, "locked": { - "lastModified": 1746209831, - "narHash": "sha256-1R1MRxHmTbNUASTCdJTaaIEUevx18+XpVVxEcb0q7VM=", + "lastModified": 1747211481, + "narHash": "sha256-zSngC85d2dy8aGWsjqjY+LzHU6an/KVzjaw1DO77dPk=", "owner": "sxyazi", "repo": "yazi", - "rev": "a201c93419bede1f35c69a6b8b21ebbf4a752e6e", + "rev": "9a0ef6bb20fc405fa58ee52e22e3db58468519c1", "type": "github" }, "original": { @@ -1829,11 +1795,11 @@ "rust-overlay": "rust-overlay_4" }, "locked": { - "lastModified": 1746316904, - "narHash": "sha256-+ly8e0TcFGDgQevzgkq6oyzK5bZQUGm4RktKwsmSKKA=", + "lastModified": 1747244659, + "narHash": "sha256-LNQJKIs67Nd916NhHzlWig+eX2NNFzCmzvtwebsxlto=", "owner": "zed-industries", "repo": "zed", - "rev": "425f32e068f7a7a04a0248a06452a2b3ae8c193f", + "rev": "6420df39757171e1e18f147472315f4ff0233064", "type": "github" }, "original": { diff --git a/modules/home/gui/desktop/niri/config/binds.nix b/modules/home/gui/desktop/niri/config/binds.nix new file mode 100755 index 0000000..f04d3fc --- /dev/null +++ b/modules/home/gui/desktop/niri/config/binds.nix @@ -0,0 +1,88 @@ +{ + config, + flake, + osConfig, + workspaceStrings, + ... +}: +let + niri = config.lib.niri.actions; + + inherit (flake.config.machines) devices; + + mars = devices.mars.name; + deimos = devices.deimos.name; + host = osConfig.networking.hostName; + + deviceLogic = + d: m: + if host == deimos then + "${d}" + else if host == mars then + "${m}" + else + ""; +in +{ + binds = { + "Super+z".action = niri.spawn "obsidian"; + "Super+l".action = niri.spawn "slack"; + "Super+h".action = niri.spawn "feishin"; + "Super+g".action = niri.spawn "scrcpy"; + "Super+k".action = niri.spawn "ghostty -e nu -e y"; + "Super+s".action = niri.spawn "steam"; + "Super+r".action = niri.spawn "ghostty -e zellij a dotfiles"; + "Super+n".action = niri.spawn "signal-desktop"; + "Super+t".action = niri.spawn "zeditor"; + "Super+b".action = niri.spawn "floorp"; + "Super+x".action = niri.spawn "freetube"; + "Super+v".action = niri.spawn "vesktop"; + "Super+m".action = niri.spawn "element-desktop"; + "Super+d".action = niri.spawn "ghostty"; + "Super+p".action = niri.spawn "bitwarden"; + "Super+Space".action = niri.spawn "fuzzel"; + "Super+Tab".action = niri.close-window; + "Super+u".action = niri.maximize-column; + "Super+comma".action = niri.focus-workspace-down; + "Super+period".action = niri.focus-workspace-up; + "Super+f".action = niri.swap-window-left; + "Super+o".action = niri.swap-window-right; + + "Super+w".action = niri.switch-preset-column-width; + + # "Ctrl+Alt+1".action = niri.move-window-to-workspace workspaceStrings.workspace0 + # "Ctrl+Alt+2".action = niri.move-window-to-workspace workspaceStrings.workspace1 + # "Ctrl+Alt+3".action = niri.move-window-to-workspace workspaceStrings.workspace2 + # "Ctrl+Alt+4".action = niri.move-window-to-workspace workspaceStrings.workspace3 + # "Ctrl+Alt+5".action = niri.move-window-to-workspace workspaceStrings.workspace4 + # "Super+Enter".action = niri.toggle-overview; + + # "Super+1".action = niri.focus-workspace workspaceStrings.workspace0; + # "Super+2".action = niri.focus-workspace workspaceStrings.workspace1; + # "Super+3".action = niri.focus-workspace workspaceStrings.workspace2; + # "Super+4".action = niri.focus-workspace workspaceStrings.workspace3; + # "Super+5".action = niri.focus-workspace workspaceStrings.workspace4; + + "Super+1".action = niri.focus-column-or-monitor-left; + "Super+2".action = niri.focus-window-or-workspace-up; + "Super+3".action = niri.focus-window-or-workspace-down; + "Super+4".action = niri.focus-column-or-monitor-right; + + "Super+Shift+t".action = niri.spawn "ghostty"; + "Super+Shift+s".action = niri.spawn "flameshot gui"; + "Super+Shift+period".action = niri.spawn "emote"; + "Super+Shift+Tab".action = niri.fullscreen-window; + + "Ctrl+Alt+c".action = niri.move-column-left; + "Ctrl+Alt+i".action = niri.move-column-right; + "Ctrl+Alt+f".action = niri.set-column-width "-10%"; + "Ctrl+Alt+o".action = niri.set-column-width "+10%"; + + "XF86MonBrightnessUp".action = niri.spawn "brightnessctl -d ${deviceLogic "amdgpu_bl1" ""} s +10%"; + "XF86MonBrightnessDown".action = + niri.spawn "brightnessctl -d ${deviceLogic "amdgpu_bl1" ""} s 10%-"; + "XF86AudioRaiseVolume".action = niri.spawn "pactl set-sink-volume @DEFAULT_SINK@ +5%"; + "XF86AudioLowerVolume".action = niri.spawn "pactl set-sink-volume @DEFAULT_SINK@ -5%"; + "XF86AudioMute".action = niri.spawn "pactl set-sink-mute @DEFAULT_SINK@ toggle"; + }; +} diff --git a/modules/home/gui/desktop/niri/config/layout.nix b/modules/home/gui/desktop/niri/config/layout.nix new file mode 100755 index 0000000..8fad340 --- /dev/null +++ b/modules/home/gui/desktop/niri/config/layout.nix @@ -0,0 +1,29 @@ +{ colourHelpers, ... }: +{ + layout = { + default-column-width = { + proportion = 1.; + }; + preset-column-widths = [ + { proportion = 1. / 3.; } + { proportion = 1. / 2.; } + { proportion = 2. / 3.; } + { proportion = 1.; } + ]; + border = { + enable = true; + width = 2; + active.color = colourHelpers.makeColour colourHelpers.el.base0E; + inactive.color = colourHelpers.makeColour colourHelpers.el.base02; + }; + gaps = 5; + shadow = { + enable = true; + color = colourHelpers.el.base11; + draw-behind-window = true; + offset.x = 0; + offset.y = 0; + spread = 3; + }; + }; +} diff --git a/modules/home/gui/desktop/niri/config/main.nix b/modules/home/gui/desktop/niri/config/main.nix new file mode 100755 index 0000000..ac3a3c0 --- /dev/null +++ b/modules/home/gui/desktop/niri/config/main.nix @@ -0,0 +1,14 @@ +{ + environment = { + DISPLAY = ":0"; + }; + + prefer-no-csd = true; + + hotkey-overlay.skip-at-startup = true; + + input = { + focus-follows-mouse.enable = true; + mouse.accel-profile = "flat"; + }; +} diff --git a/modules/home/gui/desktop/niri/config/outputs.nix b/modules/home/gui/desktop/niri/config/outputs.nix new file mode 100755 index 0000000..b3ac6d9 --- /dev/null +++ b/modules/home/gui/desktop/niri/config/outputs.nix @@ -0,0 +1,39 @@ +{ + colourHelpers, + flake, + osConfig, + ... +}: +let + inherit (flake.config.machines) devices; + + mars = devices.mars.name; + deimos = devices.deimos.name; + host = osConfig.networking.hostName; + + deviceLogic = + d: m: + if host == deimos then + d + else if host == mars then + m + else + null; +in +{ + outputs = { + "${deviceLogic "eDP-1" "DP-1"}" = { + background-color = colourHelpers.makeColour colourHelpers.el.base02; + scale = 1.0; + mode = { + width = deviceLogic 1920 2560; + height = 1080; + refresh = deviceLogic 59.94 199.92; + }; + position = { + x = 0; + y = 0; + }; + }; + }; +} diff --git a/modules/home/gui/desktop/niri/config/startup.nix b/modules/home/gui/desktop/niri/config/startup.nix new file mode 100755 index 0000000..b9ed7c0 --- /dev/null +++ b/modules/home/gui/desktop/niri/config/startup.nix @@ -0,0 +1,25 @@ +{ lib, pkgs, ... }: +{ + spawn-at-startup = [ + { + command = [ + "${lib.getExe pkgs.xwayland-satellite}" + ]; + } + { command = [ "wl-clipboard" ]; } + { command = [ "wpaperd" ]; } + { command = [ "gammastep" ]; } + { command = [ "dunst" ]; } + { command = [ "playerctld" ]; } + { command = [ "waybar" ]; } + { command = [ "nm-applet" ]; } + { command = [ "blueman-applet" ]; } + { command = [ "rfkill block bluetooth" ]; } + { command = [ "rfkill unblock bluetooth" ]; } + { command = [ "easyeffects -r" ]; } + { command = [ "vesktop" ]; } + { command = [ "signal" ]; } + { command = [ "feishin" ]; } + { command = [ "zeditor" ]; } + ]; +} diff --git a/modules/home/gui/desktop/niri/config/style.nix b/modules/home/gui/desktop/niri/config/style.nix new file mode 100755 index 0000000..3f30e24 --- /dev/null +++ b/modules/home/gui/desktop/niri/config/style.nix @@ -0,0 +1,55 @@ +{ flake, ... }: +let + inherit (flake.config.aesthetics.themes) cursor; +in +{ + cursor = { + size = cursor.size; + theme = "catppuccin-macchiato-dark-cursors"; + }; + + animations = { + enable = true; + config-notification-open-close = { + spring = { + damping-ratio = 0.600000; + epsilon = 0.001000; + stiffness = 1000; + }; + }; + horizontal-view-movement = { + spring = { + damping-ratio = 1.000000; + epsilon = 0.000100; + stiffness = 800; + }; + }; + window-close = { + easing = { + curve = "ease-out-quad"; + duration-ms = 150; + }; + }; + window-open = { + spring = { + damping-ratio = 1.000000; + epsilon = 0.000100; + stiffness = 800; + }; + }; + window-resize = { + spring = { + damping-ratio = 1.000000; + epsilon = 0.000100; + stiffness = 800; + }; + }; + workspace-switch = { + spring = { + damping-ratio = 1.000000; + epsilon = 0.000100; + stiffness = 1000; + }; + }; + }; +} diff --git a/modules/home/gui/desktop/niri/config/windowrules.nix b/modules/home/gui/desktop/niri/config/windowrules.nix new file mode 100755 index 0000000..b42c7be --- /dev/null +++ b/modules/home/gui/desktop/niri/config/windowrules.nix @@ -0,0 +1,126 @@ +{ workspaceStrings, ... }: +{ + window-rules = [ + { + open-focused = true; + } + { + matches = + let + windowMatch = c: { + app-id = c; + is-floating = true; + is-focused = true; + }; + appIDs = [ + ".blueman-manager-wrapped" + "org.gnome.Calculator" + "com.github.wwmm.easyeffects" + "emote" + "mpv" + "vlc" + "org.nomacs.ImageLounge" + "flameshot" + "^.protonvpn-app-wrapped$" + "^Picture-in-Picture$" + "^Discord Popout$" + "^Enter name of file to save to…$" + "^File Upload$" + ".scrcpy-wrapped" + "^Battle.net$" + ]; + in + builtins.map windowMatch appIDs; + } + { + matches = + let + windowMatch = c: { + app-id = c; + }; + appIDs = [ + "floop" + "org.kde.kdenlive" + "krita" + "mpv" + "vlc" + "Brave-browser" + "org.kde.okular" + ]; + in + builtins.map windowMatch appIDs; + opacity = 1.0; + } + { + matches = + let + windowMatch = c: { + app-id = c; + }; + appIDs = [ + "signal" + "vesktop" + ]; + in + builtins.map windowMatch appIDs; + open-on-workspace = workspaceStrings.workspace0; + } + { + matches = + let + windowMatch = c: { + app-id = c; + }; + appIDs = [ + "code" + "zeditor" + ]; + in + builtins.map windowMatch appIDs; + open-on-workspace = workspaceStrings.workspace1; + } + { + matches = + let + windowMatch = c: { + app-id = c; + }; + appIDs = [ + "steam" + "org.kde.kdenlive" + ]; + in + builtins.map windowMatch appIDs; + open-on-workspace = workspaceStrings.workspace2; + } + { + matches = + let + windowMatch = c: { + app-id = c; + }; + appIDs = [ + "feishin" + ".scrcpy-wrapped" + ]; + in + builtins.map windowMatch appIDs; + open-on-workspace = workspaceStrings.workspace3; + } + { + # opacity = 0.90; + clip-to-geometry = true; + focus-ring.enable = false; + geometry-corner-radius = + let + radius = 10.0; + in + { + top-left = radius; + top-right = radius; + bottom-left = radius; + bottom-right = radius; + }; + } + ]; +} diff --git a/modules/home/gui/desktop/niri/config/workspaces.nix b/modules/home/gui/desktop/niri/config/workspaces.nix new file mode 100755 index 0000000..d4c6472 --- /dev/null +++ b/modules/home/gui/desktop/niri/config/workspaces.nix @@ -0,0 +1,20 @@ +{ workspaceStrings, ... }: +{ + workspaces = { + ${workspaceStrings.workspace0} = { + name = workspaceStrings.workspace0; + }; + ${workspaceStrings.workspace1} = { + name = workspaceStrings.workspace1; + }; + ${workspaceStrings.workspace2} = { + name = workspaceStrings.workspace2; + }; + ${workspaceStrings.workspace3} = { + name = workspaceStrings.workspace3; + }; + ${workspaceStrings.workspace4} = { + name = workspaceStrings.workspace4; + }; + }; +} diff --git a/modules/home/gui/desktop/niri/default.nix b/modules/home/gui/desktop/niri/default.nix index e26fa88..5af4064 100755 --- a/modules/home/gui/desktop/niri/default.nix +++ b/modules/home/gui/desktop/niri/default.nix @@ -3,367 +3,72 @@ flake, pkgs, lib, + osConfig, ... }: let - inherit (flake.config.aesthetics.themes) currentTheme palettes cursor; + inherit (flake.config.aesthetics.themes) currentTheme palettes; inherit (flake.config.people) user0 user1 user2; user = config.home.username; - niri = config.lib.niri.actions; + colourHelpers = { + themeLogic = + if user == user0 then + currentTheme.theme0 + else if user == user1 then + currentTheme.theme1 + else if user == user2 then + currentTheme.theme2 + else + currentTheme.theme0; - themeLogic = - if user == user0 then - currentTheme.theme0 - else if user == user1 then - currentTheme.theme1 - else if user == user2 then - currentTheme.theme2 - else - currentTheme.theme0; + el = palettes.${colourHelpers.themeLogic}.colours; + + makeColour = c: "#" + c; + }; + + workspaceStrings = { + workspace0 = "messaging"; + workspace1 = "work"; + workspace2 = "gaming"; + workspace3 = "media"; + workspace4 = "extra"; + }; + + configPath = ./config; + + configImports = + let + binds = import (configPath + /binds.nix) { + inherit + config + workspaceStrings + flake + osConfig + ; + }; + layout = import (configPath + /layout.nix) { inherit colourHelpers; }; + main = import (configPath + /main.nix); + outputs = import (configPath + /outputs.nix) { + inherit + flake + osConfig + colourHelpers + ; + }; + startup = import (configPath + /startup.nix) { inherit lib pkgs; }; + style = import (configPath + /style.nix) { inherit flake; }; + windowrules = import (configPath + /windowrules.nix) { inherit workspaceStrings; }; + workspaces = import (configPath + /workspaces.nix) { inherit workspaceStrings; }; + in + binds // layout // main // outputs // startup // style // windowrules // workspaces; - el = palettes.${themeLogic}.colours; - makeColour = c: "#" + c; in { programs.niri = { - settings = - let - workspace0 = "messaging"; - workspace1 = "work"; - workspace2 = "gaming"; - workspace3 = "media"; - workspace4 = "extra"; - in - { - # environment = { - # QT_QPA_PLATFORM = "wayland"; - # DISPLAY = null; - # }; - - prefer-no-csd = true; - - cursor = { - size = cursor.size; - theme = "catppuccin-macchiato-dark-cursors"; - }; - input = { - focus-follows-mouse.enable = true; - mouse.accel-profile = "flat"; - }; - - spawn-at-startup = [ - # { command = [ "xwayland-satellite" ]; } - { command = [ "wl-clipboard" ]; } - { command = [ "wpaperd" ]; } - { command = [ "gammastep" ]; } - { command = [ "dunst" ]; } - { command = [ "playerctld" ]; } - { command = [ "waybar" ]; } - { command = [ "nm-applet" ]; } - { command = [ "blueman-applet" ]; } - { command = [ "rfkill block bluetooth" ]; } - { command = [ "rfkill unblock bluetooth" ]; } - { command = [ "easyeffects -r" ]; } - { command = [ "vesktop" ]; } - { command = [ "signal" ]; } - { command = [ "feishin" ]; } - { command = [ "zeditor" ]; } - ]; - - animations = { - enable = true; - config-notification-open-close = { - spring = { - damping-ratio = 0.600000; - epsilon = 0.001000; - stiffness = 1000; - }; - }; - horizontal-view-movement = { - spring = { - damping-ratio = 1.000000; - epsilon = 0.000100; - stiffness = 800; - }; - }; - window-close = { - easing = { - curve = "ease-out-quad"; - duration-ms = 150; - }; - }; - window-open = { - spring = { - damping-ratio = 1.000000; - epsilon = 0.000100; - stiffness = 800; - }; - }; - window-resize = { - spring = { - damping-ratio = 1.000000; - epsilon = 0.000100; - stiffness = 800; - }; - }; - workspace-switch = { - spring = { - damping-ratio = 1.000000; - epsilon = 0.000100; - stiffness = 1000; - }; - }; - }; - binds = { - "Super+z".action = niri.spawn "obsidian"; - "Super+l".action = niri.spawn "slack"; - "Super+h".action = niri.spawn "feishin"; - "Super+g".action = niri.spawn "scrcpy"; - "Super+k".action = niri.spawn "ghostty -e nu -e y"; - "Super+s".action = niri.spawn "steam"; - "Super+r".action = niri.spawn "ghostty -e zellij a dotfiles"; - "Super+n".action = niri.spawn "signal-desktop"; - "Super+t".action = niri.spawn "zeditor"; - "Super+b".action = niri.spawn "floorp"; - "Super+x".action = niri.spawn "freetube"; - "Super+v".action = niri.spawn "vesktop"; - "Super+m".action = niri.spawn "element-desktop"; - "Super+d".action = niri.spawn "ghostty"; - "Super+p".action = niri.spawn "bitwarden"; - "Super+Space".action = niri.spawn "fuzzel"; - "Super+Tab".action = niri.close-window; - "Super+u".action = niri.maximize-column; - "Super+comma".action = niri.focus-workspace-down; - "Super+period".action = niri.focus-workspace-up; - "Super+f".action = niri.swap-window-left; - "Super+o".action = niri.swap-window-right; - - # "Ctrl+Alt+1".action = niri.move-window-to-workspace workspace0; - # "Ctrl+Alt+2".action = niri.move-window-to-workspace workspace1; - # "Ctrl+Alt+3".action = niri.move-window-to-workspace workspace2; - # "Ctrl+Alt+4".action = niri.move-window-to-workspace workspace3; - # "Ctrl+Alt+5".action = niri.move-window-to-workspace workspace4; - # "Super+Enter".action = niri.toggle-overview; - - "Super+w".action = niri.switch-preset-column-width; - - "Super+1".action = niri.focus-workspace workspace0; - "Super+4".action = niri.focus-workspace workspace1; - "Super+3".action = niri.focus-workspace workspace2; - "Super+2".action = niri.focus-workspace workspace3; - "Super+5".action = niri.focus-workspace workspace4; - - "Super+c".action = niri.focus-column-or-monitor-left; - "Super+a".action = niri.focus-window-or-workspace-up; - "Super+e".action = niri.focus-window-or-workspace-down; - "Super+i".action = niri.focus-column-or-monitor-right; - - "Super+Shift+t".action = niri.spawn "ghostty"; - "Super+Shift+s".action = niri.spawn "flameshot gui"; - "Super+Shift+period".action = niri.spawn "emote"; - "Super+Shift+Tab".action = niri.fullscreen-window; - - "Ctrl+Alt+c".action = niri.move-column-left; - "Ctrl+Alt+i".action = niri.move-column-right; - "Ctrl+Alt+f".action = niri.set-column-width "-10%"; - "Ctrl+Alt+o".action = niri.set-column-width "+10%"; - }; - - hotkey-overlay.skip-at-startup = true; - - outputs = { - "DP-1" = { - background-color = makeColour el.base02; - scale = 1.0; - mode = { - width = 2560; - height = 1080; - refresh = 199.92; - }; - position = { - x = 0; - y = 0; - }; - }; - }; - - window-rules = [ - { - open-focused = true; - } - { - matches = - let - windowMatch = c: { - app-id = c; - is-floating = true; - is-focused = true; - }; - appIDs = [ - ".blueman-manager-wrapped" - "org.gnome.Calculator" - "com.github.wwmm.easyeffects" - "emote" - "mpv" - "vlc" - "org.nomacs.ImageLounge" - "flameshot" - "^.protonvpn-app-wrapped$" - "^Picture-in-Picture$" - "^Discord Popout$" - "^Enter name of file to save to…$" - "^File Upload$" - ".scrcpy-wrapped" - "^Battle.net$" - ]; - in - builtins.map windowMatch appIDs; - } - { - matches = - let - windowMatch = c: { - app-id = c; - }; - appIDs = [ - "floop" - "org.kde.kdenlive" - "krita" - "mpv" - "vlc" - "Brave-browser" - "org.kde.okular" - ]; - in - builtins.map windowMatch appIDs; - opacity = 1.0; - } - { - matches = - let - windowMatch = c: { - app-id = c; - }; - appIDs = [ - "signal" - "vesktop" - ]; - in - builtins.map windowMatch appIDs; - open-on-workspace = workspace0; - } - { - matches = - let - windowMatch = c: { - app-id = c; - }; - appIDs = [ - "code" - "zeditor" - ]; - in - builtins.map windowMatch appIDs; - open-on-workspace = workspace1; - } - { - matches = - let - windowMatch = c: { - app-id = c; - }; - appIDs = [ - "steam" - "org.kde.kdenlive" - ]; - in - builtins.map windowMatch appIDs; - open-on-workspace = workspace2; - } - { - matches = - let - windowMatch = c: { - app-id = c; - }; - appIDs = [ - "feishin" - ".scrcpy-wrapped" - ]; - in - builtins.map windowMatch appIDs; - open-on-workspace = workspace3; - } - { - # opacity = 0.90; - clip-to-geometry = true; - focus-ring.enable = false; - geometry-corner-radius = - let - radius = 10.0; - in - { - top-left = radius; - top-right = radius; - bottom-left = radius; - bottom-right = radius; - }; - } - ]; - - layout = { - default-column-width = { - proportion = 1.; - }; - preset-column-widths = [ - { proportion = 1. / 3.; } - { proportion = 1. / 2.; } - { proportion = 2. / 3.; } - { proportion = 1.; } - ]; - border = { - enable = true; - width = 2; - active.color = makeColour el.base0E; - inactive.color = makeColour el.base02; - }; - gaps = 5; - shadow = { - enable = true; - color = el.base11; - draw-behind-window = true; - offset.x = 0; - offset.y = 0; - spread = 3; - }; - }; - - workspaces = { - ${workspace0} = { - name = workspace0; - }; - ${workspace1} = { - name = workspace1; - }; - ${workspace2} = { - name = workspace2; - }; - ${workspace3} = { - name = workspace3; - }; - ${workspace4} = { - name = workspace4; - }; - }; - }; + settings = configImports; }; - # home.packages = builtins.attrValues { - # inherit (pkgs) - # xwayland-satellite - # ; - # }; } diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index ce689e2..4e3cc51 100755 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -44,6 +44,7 @@ in sddm flatpak xserver + espanso wireGuard ; }; diff --git a/modules/nixos/desktop/sddm/default.nix b/modules/nixos/desktop/sddm/default.nix index 694eb07..f488896 100755 --- a/modules/nixos/desktop/sddm/default.nix +++ b/modules/nixos/desktop/sddm/default.nix @@ -22,5 +22,4 @@ in }) ]; }; - } diff --git a/modules/nixos/services/espanso/default.nix b/modules/nixos/services/espanso/default.nix new file mode 100644 index 0000000..14b8a31 --- /dev/null +++ b/modules/nixos/services/espanso/default.nix @@ -0,0 +1,7 @@ +{ pkgs, ... }: +{ + services.espanso = { + package = pkgs.espanso-wayland; + enable = true; + }; +}