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.
This commit is contained in:
parent
4cbfc5bd94
commit
6e5fef359d
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue