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:
parent
5b8d259ee6
commit
b414c94d4e
1 changed files with 7 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue