mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-03-06 08:47:00 +00:00
Merge pull request #1272 from emilazy/push-uooytqlwsquo
defaults-write: fix activation script conditionalization
This commit is contained in:
commit
09414c7e2d
1 changed files with 3 additions and 3 deletions
|
@ -42,7 +42,7 @@ let
|
||||||
CustomSystemPreferences = flatten (mapAttrsToList (name: value: defaultsToList name value) cfg.CustomSystemPreferences);
|
CustomSystemPreferences = flatten (mapAttrsToList (name: value: defaultsToList name value) cfg.CustomSystemPreferences);
|
||||||
|
|
||||||
|
|
||||||
mkIfAttrs = list: mkIf (any (attrs: attrs != { }) list);
|
mkIfLists = list: mkIf (any (attrs: attrs != [ ]) list);
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -57,7 +57,7 @@ in
|
||||||
else types.float.check x;
|
else types.float.check x;
|
||||||
};
|
};
|
||||||
|
|
||||||
system.activationScripts.defaults.text = mkIfAttrs [
|
system.activationScripts.defaults.text = mkIfLists [
|
||||||
alf
|
alf
|
||||||
loginwindow
|
loginwindow
|
||||||
smb
|
smb
|
||||||
|
@ -74,7 +74,7 @@ in
|
||||||
${concatStringsSep "\n" CustomSystemPreferences}
|
${concatStringsSep "\n" CustomSystemPreferences}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
system.activationScripts.userDefaults.text = mkIfAttrs
|
system.activationScripts.userDefaults.text = mkIfLists
|
||||||
[
|
[
|
||||||
GlobalPreferences
|
GlobalPreferences
|
||||||
LaunchServices
|
LaunchServices
|
||||||
|
|
Loading…
Add table
Reference in a new issue