44 lines
899 B
Nix
44 lines
899 B
Nix
{
|
|
config,
|
|
pkgs,
|
|
lib,
|
|
...
|
|
}:
|
|
let
|
|
cfg = config.wayland.windowManager.hyprland;
|
|
in
|
|
{
|
|
options.wayland.windowManager.hyprland =
|
|
with lib;
|
|
with types;
|
|
{
|
|
initExtraConfig = mkOption {
|
|
type = lines;
|
|
default = "";
|
|
description = "Extra configuration lines to add to exec-once";
|
|
};
|
|
|
|
reloadExtraConfig = mkOption {
|
|
type = lines;
|
|
default = "";
|
|
description = "Extra configuration lines to add to exec";
|
|
};
|
|
};
|
|
|
|
config = {
|
|
wayland.windowManager.hyprland.settings.exec-once = lib.meta.getExe (
|
|
pkgs.writeShellApplication {
|
|
name = "init-hyprland";
|
|
text = cfg.initExtraConfig;
|
|
}
|
|
);
|
|
|
|
wayland.windowManager.hyprland.settings.exec = lib.meta.getExe (
|
|
pkgs.writeShellApplication {
|
|
name = "reload-hyprland";
|
|
text = cfg.reloadExtraConfig;
|
|
}
|
|
);
|
|
};
|
|
}
|