From 14966282d2cb955ef12bc2c769a0b941bfd0f907 Mon Sep 17 00:00:00 2001 From: Alex van de Sandt Date: Wed, 24 Jun 2026 14:00:44 -0500 Subject: [PATCH] Move hyprland to den module --- flake.lock | 529 +++++++++++++++++- flake.nix | 2 + .../hyprland/_settings.nix | 36 +- modules/hyprland/hyprland.nix | 42 ++ modules/igneous.nix | 1 + 5 files changed, 587 insertions(+), 23 deletions(-) rename _old/desktop/hyprland.nix => modules/hyprland/_settings.nix (92%) create mode 100644 modules/hyprland/hyprland.nix diff --git a/flake.lock b/flake.lock index d0a3dbe..0f0e6d3 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,38 @@ { "nodes": { + "aquamarine": { + "inputs": { + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "hyprwayland-scanner": [ + "hyprland", + "hyprwayland-scanner" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1780756231, + "narHash": "sha256-tXQxKdG5716uB9/LIkLQqQwHKf5mRSpHoZhz3lyI2Cg=", + "owner": "hyprwm", + "repo": "aquamarine", + "rev": "6ecde03f47172753fe5a2f334f9d3facfb7e6784", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "aquamarine", + "type": "github" + } + }, "den": { "locked": { "lastModified": 1781621963, @@ -15,6 +48,22 @@ "type": "github" } }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1767039857, + "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=", + "owner": "NixOS", + "repo": "flake-compat", + "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "flake-compat", + "type": "github" + } + }, "flake-file": { "locked": { "lastModified": 1781217157, @@ -71,6 +120,28 @@ "type": "github" } }, + "gitignore": { + "inputs": { + "nixpkgs": [ + "hyprland", + "pre-commit-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -91,6 +162,343 @@ "type": "github" } }, + "hyprcursor": { + "inputs": { + "hyprlang": [ + "hyprland", + "hyprlang" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1776511930, + "narHash": "sha256-fCpwFiTW0rT7oKJqr3cqHMnkwypSwQKpbtUEtxdkgrM=", + "owner": "hyprwm", + "repo": "hyprcursor", + "rev": "39435900785d0c560c6ae8777d29f28617d031ef", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprcursor", + "type": "github" + } + }, + "hyprcursor-phinger": { + "inputs": { + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1763845612, + "narHash": "sha256-78zH5GrYa35bEkzeVnl8uXFbZ/zsiSHayjxZlNt+Xe8=", + "owner": "jappie3", + "repo": "hyprcursor-phinger", + "rev": "1207a845501a28e0e00d4a8e935ee0c9cab30650", + "type": "github" + }, + "original": { + "owner": "jappie3", + "repo": "hyprcursor-phinger", + "type": "github" + } + }, + "hyprgraphics": { + "inputs": { + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1776426399, + "narHash": "sha256-RUESLKNikIeEq9ymGJ6nmcDXiSFQpUW1IhJ245nL3xM=", + "owner": "hyprwm", + "repo": "hyprgraphics", + "rev": "68d064434787cf1ed4a2fe257c03c5f52f33cf84", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprgraphics", + "type": "github" + } + }, + "hyprland": { + "inputs": { + "aquamarine": "aquamarine", + "hyprcursor": "hyprcursor", + "hyprgraphics": "hyprgraphics", + "hyprland-guiutils": "hyprland-guiutils", + "hyprland-protocols": "hyprland-protocols", + "hyprlang": "hyprlang", + "hyprutils": "hyprutils", + "hyprwayland-scanner": "hyprwayland-scanner", + "hyprwire": "hyprwire", + "nixpkgs": "nixpkgs_2", + "pre-commit-hooks": "pre-commit-hooks", + "systems": "systems", + "xdph": "xdph" + }, + "locked": { + "lastModified": 1782315209, + "narHash": "sha256-xKpodJ++lnLqRpmcH5OSimuo874wmgm3rD85J3GDmUw=", + "owner": "hyprwm", + "repo": "Hyprland", + "rev": "87cd2a5f6697a5923c4f427e9b399d79a354a7b8", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "Hyprland", + "type": "github" + } + }, + "hyprland-guiutils": { + "inputs": { + "aquamarine": [ + "hyprland", + "aquamarine" + ], + "hyprgraphics": [ + "hyprland", + "hyprgraphics" + ], + "hyprlang": [ + "hyprland", + "hyprlang" + ], + "hyprtoolkit": "hyprtoolkit", + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "hyprwayland-scanner": [ + "hyprland", + "hyprwayland-scanner" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1776426575, + "narHash": "sha256-KI6nIfVihn/DPaeB5Et46Xg3dkNHrrEtUd5LBBVomB0=", + "owner": "hyprwm", + "repo": "hyprland-guiutils", + "rev": "a968d211048e3ed538e47b84cb3649299578f19d", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprland-guiutils", + "type": "github" + } + }, + "hyprland-protocols": { + "inputs": { + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1772460177, + "narHash": "sha256-/6G/MsPvtn7bc4Y32pserBT/Z4SUUdBd4XYJpOEKVR4=", + "owner": "hyprwm", + "repo": "hyprland-protocols", + "rev": "1cb6db5fd6bb8aee419f4457402fa18293ace917", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprland-protocols", + "type": "github" + } + }, + "hyprlang": { + "inputs": { + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1777320127, + "narHash": "sha256-Qu+Wf2Bp5qUjyn2YpZNq8a7JyzTGowhT1knrwE38a9U=", + "owner": "hyprwm", + "repo": "hyprlang", + "rev": "090117506ddc3d7f26e650ff344d378c2ec329cc", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprlang", + "type": "github" + } + }, + "hyprtoolkit": { + "inputs": { + "aquamarine": [ + "hyprland", + "hyprland-guiutils", + "aquamarine" + ], + "hyprgraphics": [ + "hyprland", + "hyprland-guiutils", + "hyprgraphics" + ], + "hyprlang": [ + "hyprland", + "hyprland-guiutils", + "hyprlang" + ], + "hyprutils": [ + "hyprland", + "hyprland-guiutils", + "hyprutils" + ], + "hyprwayland-scanner": [ + "hyprland", + "hyprland-guiutils", + "hyprwayland-scanner" + ], + "nixpkgs": [ + "hyprland", + "hyprland-guiutils", + "nixpkgs" + ], + "systems": [ + "hyprland", + "hyprland-guiutils", + "systems" + ] + }, + "locked": { + "lastModified": 1772462885, + "narHash": "sha256-5pHXrQK9zasMnIo6yME6EOXmWGFMSnCITcfKshhKJ9I=", + "owner": "hyprwm", + "repo": "hyprtoolkit", + "rev": "9af245a69fa6b286b88ddfc340afd288e00a6998", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprtoolkit", + "type": "github" + } + }, + "hyprutils": { + "inputs": { + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1780251518, + "narHash": "sha256-fG9xbb1SOAAJ+2kJRakp3ch+BmA/3dEg/K3PoAZTKkw=", + "owner": "hyprwm", + "repo": "hyprutils", + "rev": "40ede2e7bdec80ba5d4c443160d905e9f841ae5f", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprutils", + "type": "github" + } + }, + "hyprwayland-scanner": { + "inputs": { + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1777159683, + "narHash": "sha256-Jxixw6wZphUp+nHYxOKUYSckL17QMBx2d5Zp0rJHr1g=", + "owner": "hyprwm", + "repo": "hyprwayland-scanner", + "rev": "b8632713a6beaf28b56f2a7b0ab2fb7088dbb404", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprwayland-scanner", + "type": "github" + } + }, + "hyprwire": { + "inputs": { + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1778410714, + "narHash": "sha256-o6RzFj4nJXaPRY7EM01siuCQeT41RfwwmcmFQqwFJJg=", + "owner": "hyprwm", + "repo": "hyprwire", + "rev": "85148a8e612808cf5ddb25d0b3c5840f3498a7dc", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprwire", + "type": "github" + } + }, "import-tree": { "locked": { "lastModified": 1778781969, @@ -107,6 +515,38 @@ } }, "nixpkgs": { + "locked": { + "lastModified": 1762977756, + "narHash": "sha256-4PqRErxfe+2toFJFgcRKZ0UI9NSIOJa+7RXVtBhy4KE=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "c5ae371f1a6a7fd27823bc500d9390b38c05fa55", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1780749050, + "narHash": "sha256-3av0pIjlOWQ6rDbNOmpUSvbNnJkGORQKKjb4LtCZsIY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "a799d3e3886da994fa307f817a6bc705ae538eeb", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { "locked": { "lastModified": 1782175435, "narHash": "sha256-8d2wCNWKnd86GzKZvbuqqlS+HqMrheXkvRf0qGJ/oA0=", @@ -119,7 +559,7 @@ "url": "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz" } }, - "nixpkgs_2": { + "nixpkgs_4": { "locked": { "lastModified": 1782175435, "narHash": "sha256-EMzXKmnOtBQ2MnvpiNOm7E+kOMvdPrIKaeg52Tip2Uk=", @@ -138,8 +578,8 @@ "nixvim": { "inputs": { "flake-parts": "flake-parts_2", - "nixpkgs": "nixpkgs_2", - "systems": "systems" + "nixpkgs": "nixpkgs_4", + "systems": "systems_2" }, "locked": { "lastModified": 1782254890, @@ -155,18 +595,58 @@ "type": "github" } }, + "pre-commit-hooks": { + "inputs": { + "flake-compat": "flake-compat", + "gitignore": "gitignore", + "nixpkgs": [ + "hyprland", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1778507602, + "narHash": "sha256-kTwur1wV+01SdqskVMSo6JMEpg71ps3HpbFY2GsflKs=", + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "61ab0e80d9c7ab14c256b5b453d8b3fb0189ba0a", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "git-hooks.nix", + "type": "github" + } + }, "root": { "inputs": { "den": "den", "flake-file": "flake-file", "flake-parts": "flake-parts", "home-manager": "home-manager", + "hyprcursor-phinger": "hyprcursor-phinger", + "hyprland": "hyprland", "import-tree": "import-tree", - "nixpkgs": "nixpkgs", + "nixpkgs": "nixpkgs_3", "nixvim": "nixvim" } }, "systems": { + "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_2": { "locked": { "lastModified": 1774449309, "narHash": "sha256-brhZ8DmuGtzkCYHJg4HEd602amKm89Y9ytsFZ5uWD1w=", @@ -181,6 +661,47 @@ "repo": "default", "type": "github" } + }, + "xdph": { + "inputs": { + "hyprland-protocols": [ + "hyprland", + "hyprland-protocols" + ], + "hyprlang": [ + "hyprland", + "hyprlang" + ], + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "hyprwayland-scanner": [ + "hyprland", + "hyprwayland-scanner" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1780133819, + "narHash": "sha256-0YPKIY3dlnR7SPq7Z8ekFVvzFsfeiAtEj+QUI3KHrlI=", + "owner": "hyprwm", + "repo": "xdg-desktop-portal-hyprland", + "rev": "4a170c0ba96fd37374f93d8f91c9ed91814828ac", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "xdg-desktop-portal-hyprland", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index ddce988..2407cd7 100644 --- a/flake.nix +++ b/flake.nix @@ -14,6 +14,8 @@ url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; + hyprcursor-phinger.url = "github:jappie3/hyprcursor-phinger"; + hyprland.url = "github:hyprwm/Hyprland"; import-tree.url = "github:vic/import-tree"; nixpkgs.url = "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz"; nixvim.url = "github:nix-community/nixvim"; diff --git a/_old/desktop/hyprland.nix b/modules/hyprland/_settings.nix similarity index 92% rename from _old/desktop/hyprland.nix rename to modules/hyprland/_settings.nix index 13a5ccd..0844993 100644 --- a/_old/desktop/hyprland.nix +++ b/modules/hyprland/_settings.nix @@ -1,24 +1,22 @@ { wayland.windowManager.hyprland = { - enable = true; - package = null; - systemd.enable = true; - configType = "hyprlang"; - settings = { # monitor settings https://wiki.hypr.land/0.54.0/Configuring/Monitors/ - monitor = [ "eDP-1, preferred, auto, auto, cm, auto" ]; + monitor = [ + # "HDMI-A-2, 2560x1440@144.00Hz, auto, auto, cm, auto" + # "eDP-1, preferred, auto, auto, cm, auto" + ]; # keywords https://wiki.hypr.land/0.54.0/Configuring/Keywords/ - "$terminal" = "kitty"; - "$browser " = "zen"; - "$menu " = "hyprlauncher"; + # "$terminal" = "kitty"; + # "$browser " = "zen"; + # "$menu " = "hyprlauncher"; "$mainMod" = "SUPER"; # autostart exec-once = [ - "1password --silent &" - "hyprpaper &" + # "1password --silent &" + # "hyprpaper &" ]; # environment variables https://wiki.hypr.land/0.54.0/Configuring/Environment-variables/ @@ -142,8 +140,8 @@ "$mainMod SHIFT, Q, killactive," "$mainMod, M, exit," "$mainMod, V, togglefloating," - "$mainMod, SPACE, exec, $menu" - "$mainMod, F, exec, $browser" + # "$mainMod, SPACE, exec, $menu" + # "$mainMod, F, exec, $browser" "$mainMod, TAB, focuscurrentorlast" # Move focus with mainMod + arrow keys @@ -183,12 +181,12 @@ "$mainMod SHIFT, 0, movetoworkspace, 10" # Switch to app-specific workspaces - "$mainMod , D, workspace, discord" - "$mainMod SHIFT, D, movetoworkspace, discord" - "$mainMod , S, workspace, steam" - "$mainMod SHIFT, S, movetoworkspace, steam" - "$mainMod , P, workspace, spotify" - "$mainMod SHIFT, P, movetoworkspace, spotify" + # "$mainMod , D, workspace, discord" + # "$mainMod SHIFT, D, movetoworkspace, discord" + # "$mainMod , S, workspace, steam" + # "$mainMod SHIFT, S, movetoworkspace, steam" + # "$mainMod , P, workspace, spotify" + # "$mainMod SHIFT, P, movetoworkspace, spotify" # Scroll through existing workspaces with mainMod + scroll "$mainMod, mouse_up, workspace, e+1" diff --git a/modules/hyprland/hyprland.nix b/modules/hyprland/hyprland.nix new file mode 100644 index 0000000..ee2e0ac --- /dev/null +++ b/modules/hyprland/hyprland.nix @@ -0,0 +1,42 @@ +{ inputs, ... }: +let + hyprland = inputs.hyprland; +in +{ + flake-file.inputs = { + hyprcursor-phinger.url = "github:jappie3/hyprcursor-phinger"; + hyprland.url = "github:hyprwm/Hyprland"; + }; + + den.aspects.hyprland = { + nixos = { pkgs, ... }: { + programs.hyprland = { + enable = true; + package = hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland; + portalPackage = hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland; + xwayland.enable = true; + withUWSM = true; + }; + + # Use cachix + nix.settings = { + substituters = [ "https://hyprland.cachix.org" ]; + trusted-substituters = [ "https://hyprland.cachix.org" ]; + trusted-public-keys = [ "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" ]; + }; + }; + + homeManager = { + imports = [ ./_settings.nix ]; + + xdg.portal.config.common.default = "*"; + + wayland.windowManager.hyprland = { + enable = true; + package = null; + systemd.enable = true; + configType = "hyprlang"; + }; + }; + }; +} diff --git a/modules/igneous.nix b/modules/igneous.nix index c71c553..ac0fa38 100644 --- a/modules/igneous.nix +++ b/modules/igneous.nix @@ -7,6 +7,7 @@ den.batteries.primary-user bat + hyprland nixvim shell shell.bash -- 2.51.2