diff --git a/flake.lock b/flake.lock index 501e85c..0d8b09b 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1711625603, - "narHash": "sha256-W+9dfqA9bqUIBV5u7jaIARAzMe3kTq/Hp2SpSVXKRQw=", + "lastModified": 1712317700, + "narHash": "sha256-rnkQ6qMhlxfjpCECkTMlFXHU/88QvC5KpdJWq5H6F1E=", "owner": "nix-community", "repo": "home-manager", - "rev": "c0ef0dab55611c676ad7539bf4e41b3ec6fa87d2", + "rev": "782eed8bb64b27acaeb7c17be4a095c85e65717f", "type": "github" }, "original": { @@ -79,11 +79,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1711768162, - "narHash": "sha256-TFXPKrAwobDQ13TyBwrc2W81RRisAG338CgNO7bLGuQ=", + "lastModified": 1712333769, + "narHash": "sha256-OmD11ljYCvr/13ShvxebUfebRT8QbSngH6okJe4SIMo=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "6fb8f502050c269597636c3b0bfcf046f7f6a947", + "rev": "965a2e5b213eee595808bc7bff28e7df59442720", "type": "github" }, "original": { @@ -104,11 +104,11 @@ ] }, "locked": { - "lastModified": 1711847900, - "narHash": "sha256-7lnDcHDZooMw6kTUuJOOHGGd4/VMfBiAgA+xx9qXr0M=", + "lastModified": 1712281995, + "narHash": "sha256-NoRAAqed5t3b3/Ebt5SW9BWh8dyKRmw9i9KjLcMdLsE=", "owner": "hyprwm", "repo": "hyprland-plugins", - "rev": "e45066d0741a1a4b9298a4c5ec43a5e57b059a4e", + "rev": "a7145f019254a7d953d56945c168d1bc698c35e4", "type": "github" }, "original": { @@ -273,11 +273,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1711703276, - "narHash": "sha256-iMUFArF0WCatKK6RzfUJknjem0H9m4KgorO/p3Dopkk=", + "lastModified": 1712163089, + "narHash": "sha256-Um+8kTIrC19vD4/lUCN9/cU9kcOsD1O1m+axJqQPyMM=", "owner": "nixos", "repo": "nixpkgs", - "rev": "d8fe5e6c92d0d190646fb9f1056741a229980089", + "rev": "fd281bd6b7d3e32ddfa399853946f782553163b5", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 940fabc..34628a2 100644 --- a/flake.nix +++ b/flake.nix @@ -23,7 +23,7 @@ }; }; - outputs = { self, nixpkgs, ... }@inputs: + outputs = { self, nixpkgs, hyprland, ... }@inputs: let system = "x86_64-linux"; pkgs = nixpkgs.legacyPackages.${system}; @@ -33,6 +33,7 @@ default = nixpkgs.lib.nixosSystem { specialArgs = {inherit inputs;}; modules = [ + hyprland.nixosModules.default ./hosts/default/configuration.nix ]; }; diff --git a/hosts/default/configuration.nix b/hosts/default/configuration.nix index a450c26..18e4c20 100644 --- a/hosts/default/configuration.nix +++ b/hosts/default/configuration.nix @@ -128,7 +128,12 @@ nixpkgs.overlays = [ # ]; - nix.settings.trusted-users = [ "root" "@wheel" ]; + nix.settings = { + substituters = ["https://hyprland.cachix.org"]; + trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="]; + trusted-users = [ "root" "@wheel" ]; + }; + nix.gc = { automatic = true; dates = "weekly"; diff --git a/modules/desktop/hyprland.nix b/modules/desktop/hyprland.nix index 4edadc6..3a7d0b6 100644 --- a/modules/desktop/hyprland.nix +++ b/modules/desktop/hyprland.nix @@ -17,12 +17,21 @@ hyprpicker # hyprlock # hypridle - ]; wayland.windowManager.hyprland = { + package = inputs.hyprland.packages.${pkgs.system}.hyprland; enable = true; xwayland.enable = true; - systemd.enable = true; + systemd = { + enable = true; + variables = [ + "--all" + ]; + }; + plugins = [ + inputs.hyprland-plugins.packages.${pkgs.system}.hyprexpo + # hyprland-plugins.packages.${pkgs.system}.hyprbars + ]; settings = { monitor = [ "eDP-1,1920x1080@60,0x0,1" @@ -32,6 +41,7 @@ exec-once = [ "wl-clipboard-history -t" "wl-paste -p --watch wl-copy -p ''" + "swww init" ]; env = [ "HYPRCURSOR_THEME,${config.gtk.cursorTheme.name}" @@ -157,6 +167,7 @@ "$screenshotarea" = "hyprctl keyword animation 'fadeOut,0,0,default'; grimblast --notify copy area; hyprctl keyword animation 'fadeOut,1,4,default'"; bind = [ + "$mainMod, grave, hyprexpo:expo, toggle" # can be: toggle, off/disable or on/enable "$altMod, Return, exec, $HOME/.local/bin/ghostty" "$mainMod, Return, exec, $HOME/.local/bin/ghostty" # for apps that yoink alt- binds "$altMod SHIFT, Return, exec, alacritty" @@ -303,6 +314,16 @@ bind=, escape,submap,reset submap = reset + plugin { + hyprexpo { + columns = 3 + gapSize = 4 + workspace_method = "center current" + enable_gesture = true + gesture_distance = 300 + gesture_negative = true + } + } ''; }; lib.inputMethod.fcitx5.waylandFrontend = true;