From 5f73badc470c11ba7e179ecaadff3b515cd06095 Mon Sep 17 00:00:00 2001 From: Mark Dickie Date: Sun, 4 Jan 2026 22:13:43 +0100 Subject: [PATCH] Working on tidying up the config. --- config.nix | 14 +- flake.lock | 235 +++++++-------------- flake.nix | 2 +- modules/home-manager/hyprland/bindings.nix | 10 - modules/home-manager/hyprland/envs.nix | 2 - modules/home-manager/hyprland/windows.nix | 19 +- modules/home-manager/pyprland.nix | 27 +-- 7 files changed, 94 insertions(+), 215 deletions(-) diff --git a/config.nix b/config.nix index c2d5dc7..6617d8e 100644 --- a/config.nix +++ b/config.nix @@ -48,11 +48,6 @@ lib: { type = lib.types.listOf lib.types.str; default = [ ]; }; - scale = lib.mkOption { - type = lib.types.int; - default = 2; - description = "Display scale factor (1 for 1x displays, 2 for 2x displays)"; - }; quick_app_bindings = lib.mkOption { type = lib.types.listOf lib.types.str; description = "A list of single keystroke key bindings to launch common apps."; @@ -71,6 +66,15 @@ lib: { "SUPER, slash, exec, $passwordManager" ]; }; + window_rules = lib.mkOption { + type = lib.types.listOf lib.types.str; + default = [ ]; + description = "A list of window rules to apply to windows"; + }; + pyprland_config = lib.mkOption { + type = lib.types.str; + default = ""; + }; exclude_packages = lib.mkOption { type = lib.types.listOf lib.types.package; default = [ ]; diff --git a/flake.lock b/flake.lock index 351ea55..232bda8 100644 --- a/flake.lock +++ b/flake.lock @@ -20,11 +20,11 @@ ] }, "locked": { - "lastModified": 1764714051, - "narHash": "sha256-AjcMlM3UoavFoLzr0YrcvsIxALShjyvwe+o7ikibpCM=", + "lastModified": 1765900596, + "narHash": "sha256-+hn8v9jkkLP9m+o0Nm5SiEq10W0iWDSotH2XfjU45fA=", "owner": "hyprwm", "repo": "aquamarine", - "rev": "a43bedcceced5c21ad36578ed823e6099af78214", + "rev": "d83c97f8f5c0aae553c1489c7d9eff3eadcadace", "type": "github" }, "original": { @@ -81,24 +81,6 @@ "type": "github" } }, - "flake-utils": { - "inputs": { - "systems": "systems_2" - }, - "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" - } - }, "gitignore": { "inputs": { "nixpkgs": [ @@ -128,11 +110,11 @@ ] }, "locked": { - "lastModified": 1766682973, - "narHash": "sha256-GKO35onS711ThCxwWcfuvbIBKXwriahGqs+WZuJ3v9E=", + "lastModified": 1767556355, + "narHash": "sha256-RDTUBDQBi9D4eD9iJQWtUDN/13MDLX+KmE+TwwNUp2s=", "owner": "nix-community", "repo": "home-manager", - "rev": "91cdb0e2d574c64fae80d221f4bf09d5592e9ec2", + "rev": "f894bc4ffde179d178d8deb374fcf9855d1a82b7", "type": "github" }, "original": { @@ -208,23 +190,24 @@ "hyprland-protocols": "hyprland-protocols", "hyprlang": "hyprlang", "hyprutils": "hyprutils", - "hyprwayland-scanner": "hyprwayland-scanner_2", + "hyprwayland-scanner": "hyprwayland-scanner", + "hyprwire": "hyprwire", "nixpkgs": "nixpkgs", "pre-commit-hooks": "pre-commit-hooks", "systems": "systems", "xdph": "xdph" }, "locked": { - "lastModified": 1764802770, - "narHash": "sha256-Rncrk4730flMTSczFG/MQFRgYcTaSdsJr3DGDlKEG48=", + "lastModified": 1767388857, + "narHash": "sha256-h70Tlpce8NEkwWqw/DDpeOKPzPyfq7P2t0HtGM5Z3Cw=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "386376400119dd46a767c9f8c8791fd22c7b6e61", + "rev": "ab1d80f3d6aebd57a0971b53a1993b1c1dfe0b09", "type": "github" }, "original": { "owner": "hyprwm", - "ref": "v0.52.2", + "ref": "v0.53.1", "repo": "Hyprland", "type": "github" } @@ -248,7 +231,10 @@ "hyprland", "hyprutils" ], - "hyprwayland-scanner": "hyprwayland-scanner", + "hyprwayland-scanner": [ + "hyprland", + "hyprwayland-scanner" + ], "nixpkgs": [ "hyprland", "nixpkgs" @@ -259,11 +245,11 @@ ] }, "locked": { - "lastModified": 1764801417, - "narHash": "sha256-9RBShG2FNfBWz4Y+O/w86Iwmgu+JrNkhjsY4fsGpRtw=", + "lastModified": 1765643131, + "narHash": "sha256-CCGohW5EBIRy4B7vTyBMqPgsNcaNenVad/wszfddET0=", "owner": "hyprwm", "repo": "hyprland-guiutils", - "rev": "fff53f22dc3a5926221a00028a85acb18fb65799", + "rev": "e50ae912813bdfa8372d62daf454f48d6df02297", "type": "github" }, "original": { @@ -284,11 +270,11 @@ ] }, "locked": { - "lastModified": 1759610243, - "narHash": "sha256-+KEVnKBe8wz+a6dTLq8YDcF3UrhQElwsYJaVaHXJtoI=", + "lastModified": 1765214753, + "narHash": "sha256-P9zdGXOzToJJgu5sVjv7oeOGPIIwrd9hAUAP3PsmBBs=", "owner": "hyprwm", "repo": "hyprland-protocols", - "rev": "bd153e76f751f150a09328dbdeb5e4fab9d23622", + "rev": "3f3860b869014c00e8b9e0528c7b4ddc335c21ab", "type": "github" }, "original": { @@ -390,11 +376,11 @@ ] }, "locked": { - "lastModified": 1764637132, - "narHash": "sha256-vSyiKCzSY48kA3v39GFu6qgRfigjKCU/9k1KTK475gg=", + "lastModified": 1766160771, + "narHash": "sha256-roINUGikWRqqgKrD4iotKbGj3ZKJl3hjMz5l/SyKrHw=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "2f2413801beee37303913fc3c964bbe92252a963", + "rev": "5ac060bfcf2f12b3a6381156ebbc13826a05b09f", "type": "github" }, "original": { @@ -407,12 +393,10 @@ "inputs": { "nixpkgs": [ "hyprland", - "hyprland-guiutils", "nixpkgs" ], "systems": [ "hyprland", - "hyprland-guiutils", "systems" ] }, @@ -430,8 +414,12 @@ "type": "github" } }, - "hyprwayland-scanner_2": { + "hyprwire": { "inputs": { + "hyprutils": [ + "hyprland", + "hyprutils" + ], "nixpkgs": [ "hyprland", "nixpkgs" @@ -442,16 +430,16 @@ ] }, "locked": { - "lastModified": 1763640274, - "narHash": "sha256-Uan1Nl9i4TF/kyFoHnTq1bd/rsWh4GAK/9/jDqLbY5A=", + "lastModified": 1766253200, + "narHash": "sha256-26qPwrd3od+xoYVywSB7hC2cz9ivN46VPLlrsXyGxvE=", "owner": "hyprwm", - "repo": "hyprwayland-scanner", - "rev": "f6cf414ca0e16a4d30198fd670ec86df3c89f671", + "repo": "hyprwire", + "rev": "1079777525b30a947c8d657fac158e00ae85de9d", "type": "github" }, "original": { "owner": "hyprwm", - "repo": "hyprwayland-scanner", + "repo": "hyprwire", "type": "github" } }, @@ -474,35 +462,13 @@ "type": "github" } }, - "nix-github-actions": { - "inputs": { - "nixpkgs": [ - "pyprland", - "poetry2nix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1703863825, - "narHash": "sha256-rXwqjtwiGKJheXB43ybM8NwWB8rO2dSRrEqes0S7F5Y=", - "owner": "nix-community", - "repo": "nix-github-actions", - "rev": "5163432afc817cf8bd1f031418d1869e4c9d5547", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nix-github-actions", - "type": "github" - } - }, "nixpkgs": { "locked": { - "lastModified": 1764667669, - "narHash": "sha256-7WUCZfmqLAssbDqwg9cUDAXrSoXN79eEEq17qhTNM/Y=", + "lastModified": 1766070988, + "narHash": "sha256-G/WVghka6c4bAzMhTwT2vjLccg/awmHkdKSd2JrycLc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "418468ac9527e799809c900eda37cbff999199b6", + "rev": "c6245e83d836d0433170a16eb185cefe0572f8b8", "type": "github" }, "original": { @@ -529,11 +495,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1766651565, - "narHash": "sha256-QEhk0eXgyIqTpJ/ehZKg9IKS7EtlWxF3N7DXy42zPfU=", + "lastModified": 1767379071, + "narHash": "sha256-EgE0pxsrW9jp9YFMkHL9JMXxcqi/OoumPJYwf+Okucw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3e2499d5539c16d0d173ba53552a4ff8547f4539", + "rev": "fb7944c166a3b630f177938e478f0378e64ce108", "type": "github" }, "original": { @@ -575,31 +541,6 @@ "type": "github" } }, - "poetry2nix": { - "inputs": { - "flake-utils": "flake-utils", - "nix-github-actions": "nix-github-actions", - "nixpkgs": [ - "pyprland", - "nixpkgs" - ], - "systems": "systems_3", - "treefmt-nix": "treefmt-nix" - }, - "locked": { - "lastModified": 1718881664, - "narHash": "sha256-ZULRSiURptz6Da+yECzQDS30IIEAEOYyIAv5rs+p9Fg=", - "owner": "nix-community", - "repo": "poetry2nix", - "rev": "5392004e2b350afda0dd5e92ccd53ab9b1261947", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "poetry2nix", - "type": "github" - } - }, "pre-commit-hooks": { "inputs": { "flake-compat": "flake-compat", @@ -610,11 +551,11 @@ ] }, "locked": { - "lastModified": 1763988335, - "narHash": "sha256-QlcnByMc8KBjpU37rbq5iP7Cp97HvjRP0ucfdh+M4Qc=", + "lastModified": 1765911976, + "narHash": "sha256-t3T/xm8zstHRLx+pIHxVpQTiySbKqcQbK+r+01XVKc0=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "50b9238891e388c9fdc6a5c49e49c42533a1b5ce", + "rev": "b68b780b69702a090c8bb1b973bab13756cc7a27", "type": "github" }, "original": { @@ -627,21 +568,42 @@ "inputs": { "flake-compat": "flake-compat_2", "nixpkgs": "nixpkgs_3", - "poetry2nix": "poetry2nix", - "systems": "systems_4" + "pyproject-nix": "pyproject-nix", + "systems": "systems_2" }, "locked": { - "lastModified": 1764799142, - "narHash": "sha256-dh5F7odsmejflH4zdaY0hX58of+TwmgBgbUNErq52X4=", + "lastModified": 1767543672, + "narHash": "sha256-B40zfGUOZ9x+6RFVj+BoZ4cj8GWx1FHcRZt0xkmRwn4=", "owner": "hyprland-community", "repo": "pyprland", - "rev": "e82637d73207abd634a96ea21fa937455374d131", + "rev": "a05c189f2c2e535f5f7374e7d7212d476fd4b02f", "type": "github" }, "original": { "owner": "hyprland-community", + "ref": "2.6.0", "repo": "pyprland", - "rev": "e82637d73207abd634a96ea21fa937455374d131", + "type": "github" + } + }, + "pyproject-nix": { + "inputs": { + "nixpkgs": [ + "pyprland", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1764134915, + "narHash": "sha256-xaKvtPx6YAnA3HQVp5LwyYG1MaN4LLehpQI8xEdBvBY=", + "owner": "nix-community", + "repo": "pyproject.nix", + "rev": "2c8df1383b32e5443c921f61224b198a2282a657", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "pyproject.nix", "type": "github" } }, @@ -671,35 +633,6 @@ } }, "systems_2": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_3": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "id": "systems", - "type": "indirect" - } - }, - "systems_4": { "locked": { "lastModified": 1689347949, "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", @@ -714,7 +647,7 @@ "type": "github" } }, - "systems_5": { + "systems_3": { "locked": { "lastModified": 1689347949, "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", @@ -729,32 +662,10 @@ "type": "github" } }, - "treefmt-nix": { - "inputs": { - "nixpkgs": [ - "pyprland", - "poetry2nix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1718522839, - "narHash": "sha256-ULzoKzEaBOiLRtjeY3YoGFJMwWSKRYOic6VNw2UyTls=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "68eb1dc333ce82d0ab0c0357363ea17c31ea1f81", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "treefmt-nix", - "type": "github" - } - }, "wiremix": { "inputs": { "nixpkgs": "nixpkgs_4", - "systems": "systems_5" + "systems": "systems_3" }, "locked": { "lastModified": 1763004074, diff --git a/flake.nix b/flake.nix index df93b08..cdda4c9 100644 --- a/flake.nix +++ b/flake.nix @@ -4,7 +4,7 @@ nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; hyprland.url = "github:hyprwm/Hyprland/v0.53.1"; nix-colors.url = "github:misterio77/nix-colors"; - pyprland.url = "github:hyprland-community/pyprland/e82637d73207abd634a96ea21fa937455374d131"; + pyprland.url = "github:hyprland-community/pyprland/2.6.0"; wiremix.url = "github:tsowell/wiremix"; home-manager = { url = "github:nix-community/home-manager"; diff --git a/modules/home-manager/hyprland/bindings.nix b/modules/home-manager/hyprland/bindings.nix index 553b557..dc65f79 100644 --- a/modules/home-manager/hyprland/bindings.nix +++ b/modules/home-manager/hyprland/bindings.nix @@ -17,8 +17,6 @@ in # End active session "SUPER, ESCAPE, exec, hyprlock" "SUPER SHIFT, ESCAPE, exec, ~/.local/share/hyperdeepnix/bin/powermenu.sh" - # "SUPER CTRL, ESCAPE, exec, reboot" - # "SUPER SHIFT CTRL, ESCAPE, exec, systemctl poweroff" "SUPER, K, exec, ~/.local/share/hyperdeepnix/bin/hyperdeepnix-show-keybindings" # Control tiling @@ -85,14 +83,6 @@ in "SUPER ALT, left, movewindoworgroup, l" "SUPER ALT, right, movewindoworgroup, r" - # Scratchpad binds - "SUPER, grave, exec, pypr toggle term" - "SUPER, T, exec, pypr toggle task" - "SUPER, Q, exec, pypr toggle timr" - - # More profiles - "SUPER SHIFT, B, exec, $browser -P Itancan" - # Screenshots ", PRINT, exec, hyprshot -m region -o ~/Pictures/Screenshots" "SHIFT, PRINT, exec, hyprshot -m window -o ~/Pictures/Screenshots" diff --git a/modules/home-manager/hyprland/envs.nix b/modules/home-manager/hyprland/envs.nix index a8336c9..54fcf43 100644 --- a/modules/home-manager/hyprland/envs.nix +++ b/modules/home-manager/hyprland/envs.nix @@ -17,8 +17,6 @@ in wayland.windowManager.hyprland.settings = { # Environment variables env = (lib.optionals hasNvidiaDrivers nvidiaEnv) ++ [ - "GDK_SCALE,${toString cfg.scale}" - # Cursor size "XCURSOR_SIZE,24" "HYPRCURSOR_SIZE,24" diff --git a/modules/home-manager/hyprland/windows.nix b/modules/home-manager/hyprland/windows.nix index 48e749b..427cb5e 100644 --- a/modules/home-manager/hyprland/windows.nix +++ b/modules/home-manager/hyprland/windows.nix @@ -1,25 +1,22 @@ { + config, ... }: +let + cfg = config.hyperdeepnix; +in { wayland.windowManager.hyprland.settings = { - windowrule = [ + windowrule = cfg.window_rules ++ [ # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more "match:class *, suppress_event maximize" - # Settings management "match:class ^(org.pulseaudio.pavucontrol|blueberry.py)$, float on" # Just dash of transparency "match:class *, opacity 0.97 0.9" - # Opacity for scratchpad - "match:class ^(com.markd.termscratch|com.markd.taskscratch|com.markd.timrscratch)$, opacity 0.8 0.8" - - # Zed editor rules - "match:class ^(dev.zed.Zed)$, group set" - # Image viewer rules "match:class swayimg, float on" @@ -27,9 +24,9 @@ #"nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0" # Float in the middle for clipse clipboard manager - "match:class ^(com.markd.clipse|com.markd.nmtui)$, float on" - "match:class ^(com.markd.clipse|com.markd.nmtui)$, size 1433 744" - "match:class ^(com.markd.clipse|com.markd.nmtui)$, stay_focused on" + "match:class ^(com.markd.clipse)$, float on" + "match:class ^(com.markd.clipse)$, size 1433 744" + "match:class ^(com.markd.clipse)$, stay_focused on" ]; layerrule = [ diff --git a/modules/home-manager/pyprland.nix b/modules/home-manager/pyprland.nix index d89e2a4..ccb1ef2 100644 --- a/modules/home-manager/pyprland.nix +++ b/modules/home-manager/pyprland.nix @@ -2,32 +2,11 @@ config, pkgs, ... -}: { +}: +{ home.file = { ".config/hypr/pyprland.toml" = { - text = '' - [pyprland] - plugins = [ "scratchpads" ] - - [scratchpads.term] - command = "kitty --title=scratchpad --class=com.markd.termscratch bash" - class = "com.markd.termscratch" - size = "80% 40%" - animation = "fromTop" - - [scratchpads.task] - command = "kitty --title=scratchpad --class=com.markd.taskscratch taskwarrior-tui" - class = "com.markd.taskscratch" - size = "50% 90%" - animation = "fromRight" - - [scratchpads.timr] - command = "kitty --title=scratchpad --class=com.markd.timrscratch timr-tui --notification on --blink on" - class = "com.markd.timrscratch" - size = "40% 40%" - position = "1% 3%" - animation = "fromLeft" - ''; + text = config.hyperdeepnix.pyprland_config; }; }; } -- 2.51.2