Add Hyprland Toggle
This commit is contained in:
@@ -1,29 +1,19 @@
|
||||
{ inputs, pkgs, ... }:
|
||||
{ lib, ... }:
|
||||
let
|
||||
b = builtins;
|
||||
|
||||
module_files =
|
||||
b.readDir ./. |>
|
||||
lib.filterAttrs (name: type:
|
||||
( (lib.strings.hasSuffix ".nix" name
|
||||
&& name != "default.nix"
|
||||
&& type == "regular" )
|
||||
|| ( type == "directory"
|
||||
&& b.pathExists ./${name}/default.nix))
|
||||
) |>
|
||||
b.attrNames |>
|
||||
b.map (f: ./${f});
|
||||
in
|
||||
{
|
||||
programs.kitty.enable = true; # required for the default Hyprland config
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
# set the flake package
|
||||
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
|
||||
# make sure to also set the portal package, so that they are in sync
|
||||
portalPackage = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
|
||||
systemd.enable = true;
|
||||
};
|
||||
|
||||
imports = [
|
||||
./animations.nix
|
||||
./execs.nix
|
||||
./general.nix
|
||||
./hypridle.nix
|
||||
./input.nix
|
||||
./keybinds.nix
|
||||
./misc.nix
|
||||
./monitors.nix
|
||||
./theme.nix
|
||||
./rules/windows.nix
|
||||
./rules/workspaces.nix
|
||||
];
|
||||
|
||||
# xdg.configFile."hypr".source = ./hypr;
|
||||
# home.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
}
|
||||
imports = module_files;
|
||||
}
|
||||
20
home/hyprland/rules/default.nix
Normal file
20
home/hyprland/rules/default.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{ lib, ... }:
|
||||
let
|
||||
b = builtins;
|
||||
|
||||
module_files =
|
||||
b.readDir ./. |>
|
||||
lib.filterAttrs (name: type:
|
||||
( (lib.strings.hasSuffix ".nix" name
|
||||
&& name != "default.nix"
|
||||
&& type == "regular" )
|
||||
|| ( type == "directory"
|
||||
&& b.pathExists ./${name}/default.nix))
|
||||
) |>
|
||||
b.attrNames |>
|
||||
b.map (f: ./${f});
|
||||
in
|
||||
{
|
||||
imports = module_files;
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
}
|
||||
Reference in New Issue
Block a user