39 lines
940 B
Nix
39 lines
940 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 = let name = "init-hyprland"; in
|
|
"${pkgs.writeShellApplication {
|
|
inherit name;
|
|
text = ''
|
|
${cfg.initExtraConfig}
|
|
'';
|
|
}}/bin/${name}";
|
|
|
|
wayland.windowManager.hyprland.settings.exec = let name = "reload-hyprland"; in
|
|
"${pkgs.writeShellApplication {
|
|
inherit name;
|
|
text = ''
|
|
${cfg.reloadExtraConfig}
|
|
'';
|
|
}}/bin/${name}";
|
|
};
|
|
}
|