diff --git a/flake.nix b/flake.nix index b993446..5df4563 100644 --- a/flake.nix +++ b/flake.nix @@ -31,7 +31,7 @@ }; }; - outputs = { self, nixpkgs, home-manager, ... } @inputs: + outputs = { self, nixpkgs, home-manager, hyprland, ... } @inputs: let inherit (self) outputs; lib = nixpkgs.lib // home-manager.lib; @@ -77,7 +77,11 @@ extraSpecialArgs = { inherit inputs outputs; }; }; "john@pixnix" = lib.homeManagerConfiguration { - modules = [ ./home/pixnix.nix ]; + modules = [ + ./home/pixnix.nix + hyprland.homeManagerModules.default + {wayland.windowManager.hyprland.enable = true;} + ]; pkgs = pkgsFor.x86_64-linux; extraSpecialArgs = { inherit inputs outputs; }; }; diff --git a/home/features/desktop/hyprland.nix b/home/features/desktop/hyprland.nix index ec05165..15a2fd9 100644 --- a/home/features/desktop/hyprland.nix +++ b/home/features/desktop/hyprland.nix @@ -21,6 +21,5 @@ ) 10)} - # ... ''; } \ No newline at end of file diff --git a/home/pixnix.nix b/home/pixnix.nix index a929a49..37641c0 100644 --- a/home/pixnix.nix +++ b/home/pixnix.nix @@ -3,7 +3,7 @@ ./global ./features/cli/extras ./features/desktop - ./features/desktop/hyprland.nix + # ./features/desktop/hyprland.nix ]; # packages @@ -11,4 +11,28 @@ kitty vagrant ]; + + wayland.windowManager.hyprland.extraConfig = '' + $mod = SUPER + + bind = $mod, F, exec, firefox + bind = , Print, exec, grimblast copy area + bind = $mod, Q, exec, kitty + + # workspaces + # binds $mod + [shift +] {1..10} to [move to] workspace {1..10} + ${builtins.concatStringsSep "\n" (builtins.genList ( + x: let + ws = let + c = (x + 1) / 10; + in + builtins.toString (x + 1 - (c * 10)); + in '' + bind = $mod, ${ws}, workspace, ${toString (x + 1)} + bind = $mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)} + '' + ) + 10)} + + ''; } diff --git a/hosts/pixnix/default.nix b/hosts/pixnix/default.nix index c2009c7..12d0187 100644 --- a/hosts/pixnix/default.nix +++ b/hosts/pixnix/default.nix @@ -10,7 +10,7 @@ ../common/optional/docker.nix #../common/optional/gnome.nix - # ../common/optional/hyprland.nix + ../common/optional/hyprland.nix ../common/optional/libvirtd.nix ../common/optional/pipewire.nix ../common/optional/printing.nix