1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-03 15:41:02 +01:00

aerospace: fallback default settings

This commit is contained in:
damidoug 2025-11-14 21:01:47 +01:00 committed by Austin Horstman
parent 5b8d259ee6
commit b414c94d4e

View file

@ -10,6 +10,12 @@ let
tomlFormat = pkgs.formats.toml { };
configPath =
if config.xdg.enable then
"${lib.removePrefix config.home.homeDirectory config.xdg.configHome}/aerospace/aerospace.toml"
else
".aerospace.toml";
# filterAttrsRecursive supporting lists, as well.
filterListAndAttrsRecursive =
pred: set:
@ -180,7 +186,7 @@ in
home = {
packages = lib.mkIf (cfg.package != null) [ cfg.package ];
file.".config/aerospace/aerospace.toml" = {
file.${configPath} = lib.mkIf (cfg.settings != { }) {
source = tomlFormat.generate "aerospace" (
filterNulls (
cfg.settings