This commit is contained in:
Tomate 06 13 2026-03-22 23:57:17 -03:00 committed by GitHub
commit c0aada8ea8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -12,6 +12,11 @@ self: {
${lib.optionalString cfg.systemd.enable systemdActivation}
${cfg.autostart_sh}
'';
validatedConfig = pkgs.runCommand "mango-config.conf" { } ''
cp ${pkgs.writeText "mango-config.conf" cfg.settings} "$out"
${cfg.package}/bin/mango -c "$out" -p || exit 1
'';
in {
options = {
wayland.windowManager.mango = with lib; {
@ -99,7 +104,7 @@ in {
home.packages = [cfg.package];
xdg.configFile = {
"mango/config.conf" = lib.mkIf (cfg.settings != "") {
text = cfg.settings;
source = validatedConfig;
};
"mango/autostart.sh" = lib.mkIf (cfg.autostart_sh != "") {
source = autostart_sh;