mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 19:46:05 +01:00
aerospace: add extraConfig
This commit is contained in:
parent
5c54b182ab
commit
64020f453b
1 changed files with 31 additions and 10 deletions
|
|
@ -81,6 +81,23 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extraConfig = mkOption {
|
||||||
|
type = types.lines;
|
||||||
|
default = "";
|
||||||
|
description = ''
|
||||||
|
Extra configuration to append to the aerospace.toml file.
|
||||||
|
This allows you to add raw TOML content, including multiline strings.
|
||||||
|
'';
|
||||||
|
example = lib.literalExpression ''
|
||||||
|
alt-enter = ''''exec-and-forget osascript -e '
|
||||||
|
tell application "Terminal"
|
||||||
|
do script
|
||||||
|
activate
|
||||||
|
end tell'
|
||||||
|
''''
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
userSettings = mkOption {
|
userSettings = mkOption {
|
||||||
type = types.submodule {
|
type = types.submodule {
|
||||||
freeformType = tomlFormat.type;
|
freeformType = tomlFormat.type;
|
||||||
|
|
@ -303,16 +320,20 @@ in
|
||||||
home = {
|
home = {
|
||||||
packages = lib.mkIf (cfg.package != null) [ cfg.package ];
|
packages = lib.mkIf (cfg.package != null) [ cfg.package ];
|
||||||
|
|
||||||
file.".config/aerospace/aerospace.toml".source = tomlFormat.generate "aerospace" (
|
file.".config/aerospace/aerospace.toml".text =
|
||||||
filterNulls (
|
let
|
||||||
cfg.userSettings
|
generatedConfig = tomlFormat.generate "aerospace" (
|
||||||
// lib.optionalAttrs cfg.launchd.enable {
|
filterNulls (
|
||||||
# Override these to avoid launchd conflicts
|
cfg.userSettings
|
||||||
start-at-login = false;
|
// lib.optionalAttrs cfg.launchd.enable {
|
||||||
after-login-command = [ ];
|
# Override these to avoid launchd conflicts
|
||||||
}
|
start-at-login = false;
|
||||||
)
|
after-login-command = [ ];
|
||||||
);
|
}
|
||||||
|
)
|
||||||
|
);
|
||||||
|
in
|
||||||
|
builtins.readFile generatedConfig + lib.optionalString (cfg.extraConfig != "") "${cfg.extraConfig}";
|
||||||
};
|
};
|
||||||
|
|
||||||
launchd.agents.aerospace = {
|
launchd.agents.aerospace = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue