mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-03-05 16:27:03 +00:00
defaults-write: fix activation script conditionalization
These are lists, not attribute sets, so the condition was always succeeding. As far as I can tell this bug has been present since the function was added.
This commit is contained in:
parent
bd921223ba
commit
f959b8878b
1 changed files with 3 additions and 3 deletions
|
@ -42,7 +42,7 @@ let
|
|||
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
|
||||
|
||||
{
|
||||
|
@ -57,7 +57,7 @@ in
|
|||
else types.float.check x;
|
||||
};
|
||||
|
||||
system.activationScripts.defaults.text = mkIfAttrs [
|
||||
system.activationScripts.defaults.text = mkIfLists [
|
||||
alf
|
||||
loginwindow
|
||||
smb
|
||||
|
@ -74,7 +74,7 @@ in
|
|||
${concatStringsSep "\n" CustomSystemPreferences}
|
||||
'';
|
||||
|
||||
system.activationScripts.userDefaults.text = mkIfAttrs
|
||||
system.activationScripts.userDefaults.text = mkIfLists
|
||||
[
|
||||
GlobalPreferences
|
||||
LaunchServices
|
||||
|
|
Loading…
Add table
Reference in a new issue