From 22061fd4287c23377192c6ce7e8414fc1542da85 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Thu, 30 Jan 2025 10:31:19 -0600 Subject: [PATCH] hyprland: standardize hyprland package across hm and nixos --- modules/home/programs/graphical/wms/hyprland/default.nix | 8 ++++---- modules/nixos/programs/graphical/wms/hyprland/default.nix | 6 ++++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/modules/home/programs/graphical/wms/hyprland/default.nix b/modules/home/programs/graphical/wms/hyprland/default.nix index 66037dbd..f7f162ca 100644 --- a/modules/home/programs/graphical/wms/hyprland/default.nix +++ b/modules/home/programs/graphical/wms/hyprland/default.nix @@ -28,8 +28,8 @@ let in { options.${namespace}.programs.graphical.wms.hyprland = { - enable = mkEnableOption "Hyprland."; - enableDebug = mkEnableOption "Enable debug mode."; + enable = mkEnableOption "Hyprland"; + enableDebug = mkEnableOption "debug config"; appendConfig = lib.mkOption { type = lib.types.lines; default = ""; @@ -140,7 +140,7 @@ in ${cfg.appendConfig} ''; - package = pkgs.hyprland.override { debug = cfg.enableDebug; }; + inherit (osConfig.programs.hyprland) package; settings = { exec = [ "${getExe pkgs.libnotify} --icon ~/.face -u normal \"Hello $(whoami)\"" ]; @@ -148,7 +148,7 @@ in # systemd = lib.mkIf (!osConfig.programs.uwsm.enable) { systemd = { - enable = (!osConfig.programs.uwsm.enable); + enable = !osConfig.programs.uwsm.enable; enableXdgAutostart = true; extraCommands = [ "${systemctl} --user stop hyprland-session.target" diff --git a/modules/nixos/programs/graphical/wms/hyprland/default.nix b/modules/nixos/programs/graphical/wms/hyprland/default.nix index 1ca9c93d..3b272bf8 100644 --- a/modules/nixos/programs/graphical/wms/hyprland/default.nix +++ b/modules/nixos/programs/graphical/wms/hyprland/default.nix @@ -19,8 +19,7 @@ let programs = makeBinPath ( with pkgs; [ - # TODO: make sure this references same package as home-manager - hyprland + config.programs.hyprland.package coreutils config.services.power-profiles-daemon.package systemd @@ -31,6 +30,7 @@ in { options.${namespace}.programs.graphical.wms.hyprland = with types; { enable = mkBoolOpt false "Whether or not to enable Hyprland."; + enableDebug = lib.mkEnableOption "debug mode"; customConfigFiles = mkOpt attrs { } "Custom configuration files that can be used to override the default files."; @@ -50,6 +50,8 @@ in hyprland = { enable = true; withUWSM = true; + + package = pkgs.hyprland.override { debug = cfg.enableDebug; }; }; };