mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-11 09:29:41 +08:00
aerospace: fallback default settings
This commit is contained in:
committed by
Austin Horstman
parent
5b8d259ee6
commit
b414c94d4e
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user