diff options
-rw-r--r-- | flake.nix | 6 | ||||
-rw-r--r-- | flake/nixosConfigurations/default.nix | 2 | ||||
-rw-r--r-- | sys/desktop/hyprland/default.nix | 7 | ||||
-rw-r--r-- | sys/nix/default.nix | 4 | ||||
-rw-r--r-- | users/sils/hyprland/default.nix | 28 |
5 files changed, 34 insertions, 13 deletions
diff --git a/flake.nix b/flake.nix index b1d430d..97eead5 100644 --- a/flake.nix +++ b/flake.nix @@ -146,6 +146,10 @@ url = "git+https://git.project-insanity.org/onny/wl-togglescreens.git?ref=main"; inputs.nixpkgs.follows = "nixpkgs"; }; + hyprland = { + url = "github:hyprwm/hyprland"; + inputs.systems.follows = "systems"; + }; }; #}}} outputs = { @@ -161,6 +165,7 @@ flake-utils, agenix, ragenix, + hyprland, ... } @ attrs: flake-utils.lib.eachDefaultSystem (system: let @@ -209,6 +214,7 @@ flake-utils agenix ragenix + hyprland ; }; }; diff --git a/flake/nixosConfigurations/default.nix b/flake/nixosConfigurations/default.nix index 60f33b1..81f3f1c 100644 --- a/flake/nixosConfigurations/default.nix +++ b/flake/nixosConfigurations/default.nix @@ -11,6 +11,7 @@ flake-utils, agenix, ragenix, + hyprland, } @ attrs: let defaultModules = [ impermanence.nixosModules.impermanence @@ -42,6 +43,7 @@ (import ../../sys) (import ../../secrets) (import ./basesystem.nix) + {home-manager.extraSpecialArgs = attrs // conf;} ] ++ defaultModules; }; diff --git a/sys/desktop/hyprland/default.nix b/sys/desktop/hyprland/default.nix index f7c3ab1..fbbf933 100644 --- a/sys/desktop/hyprland/default.nix +++ b/sys/desktop/hyprland/default.nix @@ -1,6 +1,11 @@ -{...}: { +{ + hyprland, + system, + ... +}: { programs.hyprland = { enable = true; + package = hyprland.packages.${system}.hyprland; xwayland.enable = true; }; } diff --git a/sys/nix/default.nix b/sys/nix/default.nix index 9014f5f..71dab10 100644 --- a/sys/nix/default.nix +++ b/sys/nix/default.nix @@ -29,11 +29,13 @@ settings = { auto-optimise-store = true; experimental-features = ["nix-command" "flakes"]; - trusted-substituters = [ + substituters = [ "https://cache.garnix.io" + "https://hyprland.cachix.org" ]; trusted-public-keys = [ "cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g=" + "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" ]; }; }; diff --git a/users/sils/hyprland/default.nix b/users/sils/hyprland/default.nix index ff1278e..85affb9 100644 --- a/users/sils/hyprland/default.nix +++ b/users/sils/hyprland/default.nix @@ -1,6 +1,12 @@ -{pkgs, ...}: { +{ + pkgs, + hyprland, + system, + ... +}: { wayland.windowManager.hyprland = { enable = true; + package = hyprland.packages.${system}.hyprland; settings = { # See https://wiki.hyprland.org/Configuring/Monitors/ monitor = ",preferred,auto,auto"; @@ -134,16 +140,16 @@ "$mainMod, down, movefocus, d" # Switch workspaces with mainMod + [0-9] - "$mainMod, 1, workspace, 1" - "$mainMod, 2, workspace, 2" - "$mainMod, 3, workspace, 3" - "$mainMod, 4, workspace, 4" - "$mainMod, 5, workspace, 5" - "$mainMod, 6, workspace, 6" - "$mainMod, 7, workspace, 7" - "$mainMod, 8, workspace, 8" - "$mainMod, 9, workspace, 9" - "$mainMod, 0, workspace, 10" + "$mainMod, 1, focusworkspaceoncurrentmonitor, 1" + "$mainMod, 2, focusworkspaceoncurrentmonitor, 2" + "$mainMod, 3, focusworkspaceoncurrentmonitor, 3" + "$mainMod, 4, focusworkspaceoncurrentmonitor, 4" + "$mainMod, 5, focusworkspaceoncurrentmonitor, 5" + "$mainMod, 6, focusworkspaceoncurrentmonitor, 6" + "$mainMod, 7, focusworkspaceoncurrentmonitor, 7" + "$mainMod, 8, focusworkspaceoncurrentmonitor, 8" + "$mainMod, 9, focusworkspaceoncurrentmonitor, 9" + "$mainMod, 0, focusworkspaceoncurrentmonitor, 10" # Move active window to a workspace with mainMod + SHIFT + [0-9] "$mainMod SHIFT, 1, movetoworkspace, 1" |