From 0458687bfa34199ba099e62ec383f18fd51d90d0 Mon Sep 17 00:00:00 2001 From: Nick Date: Wed, 14 May 2025 14:45:03 -0500 Subject: [PATCH 1/9] feat: added print-manager --- modules/home/gui/desktop/wayland/printManager/default.nix | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 modules/home/gui/desktop/wayland/printManager/default.nix diff --git a/modules/home/gui/desktop/wayland/printManager/default.nix b/modules/home/gui/desktop/wayland/printManager/default.nix old mode 100644 new mode 100755 From 0f80c17f12d721cdd85949df6b051e0f5f472528 Mon Sep 17 00:00:00 2001 From: Nick Date: Wed, 14 May 2025 14:45:23 -0500 Subject: [PATCH 2/9] feat: removed declarative config files --- .../audio/audioPlaying/feishin/default.nix | 48 +++++++++---------- .../messaging/discord/vesktop/default.nix | 26 +++++----- 2 files changed, 37 insertions(+), 37 deletions(-) diff --git a/modules/home/gui/apps/media/audio/audioPlaying/feishin/default.nix b/modules/home/gui/apps/media/audio/audioPlaying/feishin/default.nix index f489a4f..a70096e 100755 --- a/modules/home/gui/apps/media/audio/audioPlaying/feishin/default.nix +++ b/modules/home/gui/apps/media/audio/audioPlaying/feishin/default.nix @@ -8,28 +8,28 @@ feishin ; }; - xdg.configFile."feishin/config.json".text = '' - { - "window_has_frame": true, - "bounds": { - "x": 0, - "y": 0, - "width": 2560, - "height": 1080 - }, - "maximized": true, - "fullscreen": false, - "theme": "system", - "resume": true, - "lyrics": [ - "Genius", - "lrclib.net", - "NetEase" - ], - "window_window_bar_style": "linux", - "window_minimize_to_tray": false, - "window_enable_tray": false,! - "window_start_minimized": false, - "window_exit_to_tray": false - }''; + # xdg.configFile."feishin/config.json".text = '' + # { + # "window_has_frame": true, + # "bounds": { + # "x": 0, + # "y": 0, + # "width": 2560, + # "height": 1080 + # }, + # "maximized": true, + # "fullscreen": false, + # "theme": "system", + # "resume": true, + # "lyrics": [ + # "Genius", + # "lrclib.net", + # "NetEase" + # ], + # "window_window_bar_style": "linux", + # "window_minimize_to_tray": false, + # "window_enable_tray": false,! + # "window_start_minimized": false, + # "window_exit_to_tray": false + # }''; } diff --git a/modules/home/gui/apps/messaging/discord/vesktop/default.nix b/modules/home/gui/apps/messaging/discord/vesktop/default.nix index 4e7ec10..fc8a16c 100755 --- a/modules/home/gui/apps/messaging/discord/vesktop/default.nix +++ b/modules/home/gui/apps/messaging/discord/vesktop/default.nix @@ -8,17 +8,17 @@ vesktop ; }; - xdg.configFile."vesktop/settings.json".text = '' - { - "discordBranch": "stable", - "minimizeToTray": false, - "arRPC": true, - "splashColor": "rgb(202, 211, 245)", - "splashBackground": "rgb(36, 39, 58)", - "customTitleBar": false, - "tray": false, - "staticTitle": false, - "enableMenu": false - } - ''; + # xdg.configFile."vesktop/settings.json".text = '' + # { + # "discordBranch": "stable", + # "minimizeToTray": false, + # "arRPC": true, + # "splashColor": "rgb(202, 211, 245)", + # "splashBackground": "rgb(36, 39, 58)", + # "customTitleBar": false, + # "tray": false, + # "staticTitle": false, + # "enableMenu": false + # } + # ''; } From 22142974fb6b9c5c8432b25ec0a75b349d65c0eb Mon Sep 17 00:00:00 2001 From: Nick Date: Wed, 14 May 2025 14:47:01 -0500 Subject: [PATCH 3/9] feat: added function keys to hyprland binds --- .../gui/desktop/hypr/land/config/bind.nix | 30 +++++++++++++++++-- .../home/gui/desktop/hypr/land/default.nix | 3 +- 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/modules/home/gui/desktop/hypr/land/config/bind.nix b/modules/home/gui/desktop/hypr/land/config/bind.nix index a6b5eaa..9fdd505 100755 --- a/modules/home/gui/desktop/hypr/land/config/bind.nix +++ b/modules/home/gui/desktop/hypr/land/config/bind.nix @@ -1,4 +1,21 @@ +{ 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 + ""; + superBinds = builtins.map (x: "SUPER, " + x) [ # Apps "Z, exec, obsidian" @@ -31,8 +48,8 @@ let "F, splitratio, 0.33" "O, splitratio, -0.33" # Audio - "PageUp, exec, playerctl next" - "PageDown, exec, playerctl previous" + "Page_Up, exec, playerctl next" + "Page_Down, exec, playerctl previous" "Home, exec, playerctl play-pause" "Space, exec, fuzzel" ]; @@ -85,6 +102,14 @@ let # Ctrl+shift binds # "End, exec, shutdown now" ]; + + functionBinds = builtins.map (x: " , " + x) [ + "XF86MonBrightnessUp, exec, brightnessctl -d ${deviceLogic "amdgpu_bl1" ""} s +10%" + "XF86MonBrightnessDown, exec, brightnessctl -d ${deviceLogic "amdgpu_bl1" ""} s 10%-" + "XF86AudioRaiseVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ +5%" + "XF86AudioLowerVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ -5%" + "XF86AudioMute, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle" + ]; in superBinds ++ superShiftBinds @@ -93,5 +118,6 @@ superBinds ++ ctrlBinds ++ ctrlShiftBinds ++ shiftBinds +++ functionBinds # Docs # https://wiki.hyprland.org/Getting-Started/Master-Tutorial/ diff --git a/modules/home/gui/desktop/hypr/land/default.nix b/modules/home/gui/desktop/hypr/land/default.nix index 8af489c..879c095 100755 --- a/modules/home/gui/desktop/hypr/land/default.nix +++ b/modules/home/gui/desktop/hypr/land/default.nix @@ -1,13 +1,14 @@ { flake, config, + osConfig, ... }: let configPath = ./config; configImports = { animations = import (configPath + /animations.nix); - bind = import (configPath + /bind.nix); + bind = import (configPath + /bind.nix) { inherit flake osConfig; }; bindm = import (configPath + /bindm.nix); binds = import (configPath + /binds.nix); # bindl = import (configPath + /bindl.nix); From 079bdf853e0294720d7a9e0d16f9eb44cb7f2465 Mon Sep 17 00:00:00 2001 From: Nick Date: Wed, 14 May 2025 14:47:27 -0500 Subject: [PATCH 4/9] feat: added finamp --- modules/home/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/home/default.nix b/modules/home/default.nix index 72ca965..f2eaa28 100755 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -70,6 +70,7 @@ in wayland theming printManager + finamp ; }; }; @@ -195,6 +196,8 @@ in dolphin espanso zotero + printManager + finamp ; }; }; From 2b91a4d407bc0105ae9947c29d0acfb02b1668e2 Mon Sep 17 00:00:00 2001 From: Nick Date: Wed, 14 May 2025 14:47:44 -0500 Subject: [PATCH 5/9] feat: removed cosmic greeter --- modules/nixos/desktop/cosmic/default.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/nixos/desktop/cosmic/default.nix b/modules/nixos/desktop/cosmic/default.nix index 2c4be49..cb0e762 100755 --- a/modules/nixos/desktop/cosmic/default.nix +++ b/modules/nixos/desktop/cosmic/default.nix @@ -10,7 +10,10 @@ environment.sessionVariables.COSMIC_DATA_CONTROL_ENABLED = 1; services = { - desktopManager.cosmic.enable = true; - displayManager.cosmic-greeter.enable = true; + desktopManager.cosmic = { + enable = true; + xwayland.enable = true; + }; + # displayManager.cosmic-greeter.enable = true; }; } From ee42e007a78e7cff1250e666cd3d59c1fd14450d Mon Sep 17 00:00:00 2001 From: Nick Date: Fri, 16 May 2025 20:03:42 -0500 Subject: [PATCH 6/9] feat: updated niri --- flake.lock | 244 +++++------ .../home/gui/desktop/niri/config/binds.nix | 88 ++++ .../home/gui/desktop/niri/config/layout.nix | 29 ++ modules/home/gui/desktop/niri/config/main.nix | 14 + .../home/gui/desktop/niri/config/outputs.nix | 39 ++ .../home/gui/desktop/niri/config/startup.nix | 25 ++ .../home/gui/desktop/niri/config/style.nix | 55 +++ .../gui/desktop/niri/config/windowrules.nix | 126 ++++++ .../gui/desktop/niri/config/workspaces.nix | 20 + modules/home/gui/desktop/niri/default.nix | 401 +++--------------- modules/nixos/default.nix | 1 + modules/nixos/desktop/sddm/default.nix | 1 - modules/nixos/services/espanso/default.nix | 7 + 13 files changed, 562 insertions(+), 488 deletions(-) create mode 100755 modules/home/gui/desktop/niri/config/binds.nix create mode 100755 modules/home/gui/desktop/niri/config/layout.nix create mode 100755 modules/home/gui/desktop/niri/config/main.nix create mode 100755 modules/home/gui/desktop/niri/config/outputs.nix create mode 100755 modules/home/gui/desktop/niri/config/startup.nix create mode 100755 modules/home/gui/desktop/niri/config/style.nix create mode 100755 modules/home/gui/desktop/niri/config/windowrules.nix create mode 100755 modules/home/gui/desktop/niri/config/workspaces.nix create mode 100644 modules/nixos/services/espanso/default.nix 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; + }; +} From c8b1538b0b89bad8b7472d13c6b8ae15c4f125c1 Mon Sep 17 00:00:00 2001 From: Nick Date: Fri, 16 May 2025 20:04:10 -0500 Subject: [PATCH 7/9] feat: added some stuff to espanso --- modules/home/gui/apps/tools/espanso/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/home/gui/apps/tools/espanso/default.nix b/modules/home/gui/apps/tools/espanso/default.nix index 2423bf4..631396f 100755 --- a/modules/home/gui/apps/tools/espanso/default.nix +++ b/modules/home/gui/apps/tools/espanso/default.nix @@ -5,6 +5,13 @@ { services.espanso = { enable = true; + configs = { + default = { + pre_paste_delay = 0; + show_notifications = false; + }; + }; + package = pkgs.espanso-wayland; matches = { base = { From 8b2e4bc428bc9bceccb5be6a01e8b3daf66e285b Mon Sep 17 00:00:00 2001 From: Nick Date: Fri, 16 May 2025 20:04:24 -0500 Subject: [PATCH 8/9] chore: lock n load --- flake.lock | 109 ++++++++++++++++++++++------------------------------- 1 file changed, 46 insertions(+), 63 deletions(-) diff --git a/flake.lock b/flake.lock index b6f12b4..c08cabd 100755 --- a/flake.lock +++ b/flake.lock @@ -385,11 +385,11 @@ "zon2nix": "zon2nix" }, "locked": { - "lastModified": 1747243928, - "narHash": "sha256-0Z2ierPsjbg4iDOiwwBW28NapXZFSDyRL9E4XKTYop4=", + "lastModified": 1747349124, + "narHash": "sha256-X7fd+JEuWQ65OBI733KHtgjelyBm6EgDqMU6mvH5+Jw=", "owner": "ghostty-org", "repo": "ghostty", - "rev": "a090e8eeeda7015f7cadbd4aa0ea4654a8026a71", + "rev": "e1de7a99e8b5a758fc9e768d13ab15d707edea0a", "type": "github" }, "original": { @@ -471,11 +471,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1747230720, - "narHash": "sha256-Q6cNfZ+uGJ8gE0yerwwljnXCH1qcCaUJeUeNV0jBoVs=", + "lastModified": 1747313582, + "narHash": "sha256-mCH0h4IytOzW1kc/zyJh6MPfsIbfY0Rsi+lXFsCMo0M=", "owner": "helix-editor", "repo": "helix", - "rev": "6be38642f4f352a44bc6aabc5f0af6a0d941eecc", + "rev": "f157a918a334b6f84730ffa358d766562f81727b", "type": "github" }, "original": { @@ -518,11 +518,11 @@ ] }, "locked": { - "lastModified": 1747225851, - "narHash": "sha256-4IbmZrNOdXP143kZEUzxBS5SqyxUlaSHLgdpeJfP2ZU=", + "lastModified": 1747340209, + "narHash": "sha256-tUiXrwlJoG3dzJ+fSwv1S3VPU5ODSPZJHoBmlu4t344=", "owner": "nix-community", "repo": "home-manager", - "rev": "6bf057fc8326e83bda05a669fc08d106547679fb", + "rev": "098e365dd83311cc8236f83ea6be42abb49a6c76", "type": "github" }, "original": { @@ -607,11 +607,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1747247479, - "narHash": "sha256-y+S9IsF+VbGPvSh/Xr/Qbz1/xGtpsU4DbEE+PnvKg8I=", + "lastModified": 1747301504, + "narHash": "sha256-GAI36RNzF9yC0JOauS1+h681ElwdbD9q/qxxuIqcejQ=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "75f2cb5f6559ca6ca7c6300b270e5ddc3fdabe31", + "rev": "a5c9b3e49047b4f03f79c5146d8925363eab3072", "type": "github" }, "original": { @@ -965,15 +965,14 @@ "nixpkgs-stable": "nixpkgs-stable_2", "pre-commit-hooks": "pre-commit-hooks_2", "sops-nix": "sops-nix", - "systems": "systems_5", - "yants": "yants" + "systems": "systems_5" }, "locked": { - "lastModified": 1747166468, - "narHash": "sha256-tgVvncOtpeSfqiyO0w1PB5yxtzJW0MB9NTJ+lygwdkk=", + "lastModified": 1747343697, + "narHash": "sha256-7WDWTrkb23XYwwzuMZIe2HDDGZOzzv59DW4njuuVTrY=", "owner": "ngi-nix", "repo": "ngipkgs", - "rev": "4e4d1e3f7b3cacf70712c144bbd288328878df4a", + "rev": "c58ebe6dc8ce7a513b2b941df601ca1e78c88567", "type": "github" }, "original": { @@ -994,11 +993,11 @@ "xwayland-satellite-unstable": "xwayland-satellite-unstable" }, "locked": { - "lastModified": 1747152040, - "narHash": "sha256-C6xbCOgSAi+a/1Bk1GPdWd5l791neY5YRWxVM/0cYNg=", + "lastModified": 1747304844, + "narHash": "sha256-aLS9HqdtAtioT2JJSWQ7cgWKozBmCtxzYWIEZb1RzkA=", "owner": "sodiboo", "repo": "niri-flake", - "rev": "fa50b6e56aaf6c9b32aadc44f7a2e47187e9b6ac", + "rev": "b8326b5bfb204d7b57802a218de1ebbb743bf8dc", "type": "github" }, "original": { @@ -1027,11 +1026,11 @@ "niri-unstable": { "flake": false, "locked": { - "lastModified": 1747145615, - "narHash": "sha256-U6MhqL4QXLojCOKH5yc8GbfOF7Fas36e1nqcPQx6/zQ=", + "lastModified": 1747289333, + "narHash": "sha256-S2xNTAo0e87rK+sNDQCxOsBKtQEBAAVwgkzdpnWoQC0=", "owner": "YaLTeR", "repo": "niri", - "rev": "0d6843ea67da91aea37b655be5de92dfeea081b5", + "rev": "46a8f81160708d05e9609c318cce64e3e5ac2538", "type": "github" }, "original": { @@ -1048,11 +1047,11 @@ "rust-overlay": "rust-overlay_2" }, "locked": { - "lastModified": 1747220948, - "narHash": "sha256-5aNGtHi4mH9ZBB4cFMgRtmuKWH2afNHJHl9RBvt3J3E=", + "lastModified": 1747308097, + "narHash": "sha256-indU9vouoMSHMuB9TTZMsXywj8N5UNOVnCwuA9xh9LM=", "owner": "lilyinstarlight", "repo": "nixos-cosmic", - "rev": "b9afbbf3055d46ec2983ce0cc0d59c544fdb746d", + "rev": "3c989494b1968ca066f5893401c9cb8e2202a8f2", "type": "github" }, "original": { @@ -1111,11 +1110,11 @@ }, "nixpkgs-stable_3": { "locked": { - "lastModified": 1746957726, - "narHash": "sha256-k9ut1LSfHCr0AW82ttEQzXVCqmyWVA5+SHJkS5ID/Jo=", + "lastModified": 1747209494, + "narHash": "sha256-fLise+ys+bpyjuUUkbwqo5W/UyIELvRz9lPBPoB0fbM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a39ed32a651fdee6842ec930761e31d1f242cb94", + "rev": "5d736263df906c5da72ab0f372427814de2f52f8", "type": "github" }, "original": { @@ -1127,11 +1126,11 @@ }, "nixpkgs-stable_4": { "locked": { - "lastModified": 1746957726, - "narHash": "sha256-k9ut1LSfHCr0AW82ttEQzXVCqmyWVA5+SHJkS5ID/Jo=", + "lastModified": 1747209494, + "narHash": "sha256-fLise+ys+bpyjuUUkbwqo5W/UyIELvRz9lPBPoB0fbM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a39ed32a651fdee6842ec930761e31d1f242cb94", + "rev": "5d736263df906c5da72ab0f372427814de2f52f8", "type": "github" }, "original": { @@ -1159,11 +1158,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1746904237, - "narHash": "sha256-3e+AVBczosP5dCLQmMoMEogM57gmZ2qrVSrmq9aResQ=", + "lastModified": 1747179050, + "narHash": "sha256-qhFMmDkeJX9KJwr5H32f1r7Prs7XbQWtO0h3V0a0rFY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d89fc19e405cb2d55ce7cc114356846a0ee5e956", + "rev": "adaa24fbf46737f3f1b5497bf64bae750f82942e", "type": "github" }, "original": { @@ -1175,11 +1174,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1746904237, - "narHash": "sha256-3e+AVBczosP5dCLQmMoMEogM57gmZ2qrVSrmq9aResQ=", + "lastModified": 1747179050, + "narHash": "sha256-qhFMmDkeJX9KJwr5H32f1r7Prs7XbQWtO0h3V0a0rFY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d89fc19e405cb2d55ce7cc114356846a0ee5e956", + "rev": "adaa24fbf46737f3f1b5497bf64bae750f82942e", "type": "github" }, "original": { @@ -1214,11 +1213,11 @@ "treefmt-nix": "treefmt-nix_2" }, "locked": { - "lastModified": 1747251912, - "narHash": "sha256-zgHG2yUpPRkcz0lJNVFFY47ohKYlZ0IIR+y7vmHfQRs=", + "lastModified": 1747362365, + "narHash": "sha256-8HTlUnY93Lhs82tDb7WLpTdv6pA9I++iwVbLz8auJHY=", "owner": "nix-community", "repo": "NUR", - "rev": "fde7d7ed44baaa2cffcd570c18bb7981d2696d72", + "rev": "ec40131fece2302efdc0f7c7313828e8b7e3e348", "type": "github" }, "original": { @@ -1749,22 +1748,6 @@ "type": "github" } }, - "yants": { - "flake": false, - "locked": { - "lastModified": 1645270620, - "narHash": "sha256-wwkl3K200UbW9Z7BRlVH8HOEXCaVYP2MqZpsF9EhgZg=", - "ref": "refs/heads/canon", - "rev": "efeb6dc11eb1a1e88d41dc2093fc5aa31f7abd35", - "revCount": 15, - "type": "git", - "url": "https://code.tvl.fyi/depot.git:/nix/yants.git" - }, - "original": { - "type": "git", - "url": "https://code.tvl.fyi/depot.git:/nix/yants.git" - } - }, "yazi": { "inputs": { "flake-utils": "flake-utils_4", @@ -1772,11 +1755,11 @@ "rust-overlay": "rust-overlay_3" }, "locked": { - "lastModified": 1747211481, - "narHash": "sha256-zSngC85d2dy8aGWsjqjY+LzHU6an/KVzjaw1DO77dPk=", + "lastModified": 1747290850, + "narHash": "sha256-jx8S0LnBkEonEh3XivYIwpxt+IT/+6/EhPZdAtJgtwI=", "owner": "sxyazi", "repo": "yazi", - "rev": "9a0ef6bb20fc405fa58ee52e22e3db58468519c1", + "rev": "464acfe47b3cbea2713b91d553ff648b8f07ff89", "type": "github" }, "original": { @@ -1795,11 +1778,11 @@ "rust-overlay": "rust-overlay_4" }, "locked": { - "lastModified": 1747244659, - "narHash": "sha256-LNQJKIs67Nd916NhHzlWig+eX2NNFzCmzvtwebsxlto=", + "lastModified": 1747348132, + "narHash": "sha256-19TI2BpVg22ia7MW5A5eA7RsPfeyd5OUFbcwOcsbKF0=", "owner": "zed-industries", "repo": "zed", - "rev": "6420df39757171e1e18f147472315f4ff0233064", + "rev": "0f17e821545c2992bda426243751463c4d6e4826", "type": "github" }, "original": { From 17d2832b063987c969108f4f2fcf8f0da3f4c12b Mon Sep 17 00:00:00 2001 From: Nick Date: Fri, 16 May 2025 20:54:37 -0500 Subject: [PATCH 9/9] feat: fixed hyprland gap --- modules/home/gui/desktop/hypr/land/config/decoration.nix | 2 +- modules/home/gui/desktop/hypr/land/config/general.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/home/gui/desktop/hypr/land/config/decoration.nix b/modules/home/gui/desktop/hypr/land/config/decoration.nix index 0e08c0e..38bba5c 100755 --- a/modules/home/gui/desktop/hypr/land/config/decoration.nix +++ b/modules/home/gui/desktop/hypr/land/config/decoration.nix @@ -2,7 +2,7 @@ active_opacity = 0.95; inactive_opacity = 0.90; fullscreen_opacity = 1; - rounding = 10; + rounding = 20; dim_inactive = 1; dim_strength = 0.05; diff --git a/modules/home/gui/desktop/hypr/land/config/general.nix b/modules/home/gui/desktop/hypr/land/config/general.nix index 95ca3f0..5fcc401 100755 --- a/modules/home/gui/desktop/hypr/land/config/general.nix +++ b/modules/home/gui/desktop/hypr/land/config/general.nix @@ -24,7 +24,7 @@ let el = palettes.${themeLogic}.colours; in { - gaps_in = 5; + gaps_in = 2.5; gaps_out = 5; border_size = 2; "col.active_border" = "rgb(${el.base0E})";