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 {
|
||||
type = types.submodule {
|
||||
freeformType = tomlFormat.type;
|
||||
|
|
@ -303,16 +320,20 @@ in
|
|||
home = {
|
||||
packages = lib.mkIf (cfg.package != null) [ cfg.package ];
|
||||
|
||||
file.".config/aerospace/aerospace.toml".source = tomlFormat.generate "aerospace" (
|
||||
filterNulls (
|
||||
cfg.userSettings
|
||||
// lib.optionalAttrs cfg.launchd.enable {
|
||||
# Override these to avoid launchd conflicts
|
||||
start-at-login = false;
|
||||
after-login-command = [ ];
|
||||
}
|
||||
)
|
||||
);
|
||||
file.".config/aerospace/aerospace.toml".text =
|
||||
let
|
||||
generatedConfig = tomlFormat.generate "aerospace" (
|
||||
filterNulls (
|
||||
cfg.userSettings
|
||||
// lib.optionalAttrs cfg.launchd.enable {
|
||||
# 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 = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue