mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-03 07:31:03 +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 { };
|
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.
|
# filterAttrsRecursive supporting lists, as well.
|
||||||
filterListAndAttrsRecursive =
|
filterListAndAttrsRecursive =
|
||||||
pred: set:
|
pred: set:
|
||||||
|
|
@ -180,7 +186,7 @@ in
|
||||||
home = {
|
home = {
|
||||||
packages = lib.mkIf (cfg.package != null) [ cfg.package ];
|
packages = lib.mkIf (cfg.package != null) [ cfg.package ];
|
||||||
|
|
||||||
file.".config/aerospace/aerospace.toml" = {
|
file.${configPath} = lib.mkIf (cfg.settings != { }) {
|
||||||
source = tomlFormat.generate "aerospace" (
|
source = tomlFormat.generate "aerospace" (
|
||||||
filterNulls (
|
filterNulls (
|
||||||
cfg.settings
|
cfg.settings
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue