From 6e5fef359d077cc70cbb62f312e0769e9d4e84e4 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 18 Nov 2024 15:20:40 +0100 Subject: [PATCH] refactor: reorder system defaults after activation script Moved the system defaults configuration block to follow the system activation script definition. This change organizes the code better, improving readability and maintainability. --- modules/darwin/system/interface/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/darwin/system/interface/default.nix b/modules/darwin/system/interface/default.nix index 8bad001..4a245dd 100644 --- a/modules/darwin/system/interface/default.nix +++ b/modules/darwin/system/interface/default.nix @@ -10,9 +10,6 @@ in }; config = mkIf cfg.enable { - system.defaults = { - dock.autohide = true; - system.activationScripts.applications.text = let env = pkgs.buildEnv { name = "system-applications"; @@ -20,19 +17,22 @@ in pathsToLink = "/Applications"; }; in - pkgs.lib.mkForce '' + lib.mkForce '' # Set up applications. echo "setting up /Applications..." >&2 rm -rf /Applications/Nix\ Apps mkdir -p /Applications/Nix\ Apps find ${env}/Applications -maxdepth 1 -type l -exec readlink '{}' + | - while read src; do + while read -r src; do app_name=$(basename "$src") echo "copying $src" >&2 ${pkgs.mkalias}/bin/mkalias "$src" "/Applications/Nix Apps/$app_name" done ''; + system.defaults = { + dock.autohide = true; + finder = { AppleShowAllExtensions = true; FXEnableExtensionChangeWarning = false;