Add Hyprland Toggle
This commit is contained in:
@@ -15,6 +15,6 @@ let
|
||||
b.map (f: ./${f});
|
||||
in
|
||||
{
|
||||
imports = module_files;
|
||||
imports = module_files ++ [./hyprland];
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
}
|
||||
15
home/hyprland.nix
Normal file
15
home/hyprland.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{ inputs, pkgs, lib, config, ... }:
|
||||
let
|
||||
cfg = config.my.desktop.hyprland;
|
||||
in
|
||||
{
|
||||
programs.kitty.enable = config.my.desktop.enable; # required for the default Hyprland config
|
||||
wayland.windowManager.hyprland = lib.mkIf cfg.enable {
|
||||
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;
|
||||
};
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -1,12 +1,14 @@
|
||||
# Glib Schemas Fix
|
||||
# https://github.com/thomX75/nixos-modules
|
||||
|
||||
{ pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
config = lib.mkIf config.my.desktop.enable {
|
||||
environment.systemPackages = with pkgs; [ gsettings-desktop-schemas ];
|
||||
|
||||
environment.variables = {
|
||||
GSETTINGS_SCHEMA_DIR="${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}/glib-2.0/schemas";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{ inputs, pkgs, ...}:
|
||||
{ inputs, pkgs, config, lib, ...}:
|
||||
{
|
||||
programs.hyprland = {
|
||||
programs.hyprland = lib.mkIf config.my.desktop.hyprland.enable {
|
||||
enable = true;
|
||||
# set the flake package
|
||||
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
|
||||
|
||||
Reference in New Issue
Block a user