Skip to content

Commit

Permalink
Merge pull request LnL7#1272 from emilazy/push-uooytqlwsquo
Browse files Browse the repository at this point in the history
defaults-write: fix activation script conditionalization
  • Loading branch information
emilazy authored Jan 17, 2025
2 parents ca1f666 + f959b88 commit 09414c7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/system/defaults-write.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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

{
Expand All @@ -57,7 +57,7 @@ in
else types.float.check x;
};

system.activationScripts.defaults.text = mkIfAttrs [
system.activationScripts.defaults.text = mkIfLists [
alf
loginwindow
smb
Expand All @@ -74,7 +74,7 @@ in
${concatStringsSep "\n" CustomSystemPreferences}
'';

system.activationScripts.userDefaults.text = mkIfAttrs
system.activationScripts.userDefaults.text = mkIfLists
[
GlobalPreferences
LaunchServices
Expand Down

0 comments on commit 09414c7

Please sign in to comment.