Skip to content

Commit

Permalink
hyprland: standardize hyprland package across hm and nixos
Browse files Browse the repository at this point in the history
  • Loading branch information
khaneliman committed Jan 30, 2025
1 parent a13a527 commit 22061fd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 4 additions & 4 deletions modules/home/programs/graphical/wms/hyprland/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "";
Expand Down Expand Up @@ -140,15 +140,15 @@ 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)\"" ];
};

# 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"
Expand Down
6 changes: 4 additions & 2 deletions modules/nixos/programs/graphical/wms/hyprland/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.";
Expand All @@ -50,6 +50,8 @@ in
hyprland = {
enable = true;
withUWSM = true;

package = pkgs.hyprland.override { debug = cfg.enableDebug; };
};
};

Expand Down

0 comments on commit 22061fd

Please sign in to comment.