summaryrefslogtreecommitdiff
path: root/modules/system
diff options
context:
space:
mode:
Diffstat (limited to 'modules/system')
-rw-r--r--modules/system/etc.nix14
-rw-r--r--modules/system/launchd.nix20
2 files changed, 19 insertions, 15 deletions
diff --git a/modules/system/etc.nix b/modules/system/etc.nix
index b3d803a..6577aec 100644
--- a/modules/system/etc.nix
+++ b/modules/system/etc.nix
@@ -31,12 +31,14 @@ in
config = {
- system.build.etc = pkgs.runCommand "etc" {} ''
- mkdir -p $out/etc
- cd $out/etc
- ${concatMapStringsSep "\n" (attr: "mkdir -p $(dirname '${attr.target}')") etc}
- ${concatMapStringsSep "\n" (attr: "ln -s '${attr.source}' '${attr.target}'") etc}
- '';
+ system.build.etc = pkgs.runCommandNoCC "etc"
+ { preferLocalBuild = true; }
+ ''
+ mkdir -p $out/etc
+ cd $out/etc
+ ${concatMapStringsSep "\n" (attr: "mkdir -p $(dirname '${attr.target}')") etc}
+ ${concatMapStringsSep "\n" (attr: "ln -s '${attr.source}' '${attr.target}'") etc}
+ '';
system.activationScripts.etc.text = ''
# Set up the statically computed bits of /etc.
diff --git a/modules/system/launchd.nix b/modules/system/launchd.nix
index 5e5b262..dce0523 100644
--- a/modules/system/launchd.nix
+++ b/modules/system/launchd.nix
@@ -84,15 +84,17 @@ in
config = {
- system.build.launchd = pkgs.runCommand "launchd" {} ''
- mkdir -p $out/Library/LaunchAgents $out/Library/LaunchDaemons $out/user/Library/LaunchAgents
- cd $out/Library/LaunchAgents
- ${concatMapStringsSep "\n" (attr: "ln -s '${attr.source}' '${attr.target}'") launchAgents}
- cd $out/Library/LaunchDaemons
- ${concatMapStringsSep "\n" (attr: "ln -s '${attr.source}' '${attr.target}'") launchDaemons}
- cd $out/user/Library/LaunchAgents
- ${concatMapStringsSep "\n" (attr: "ln -s '${attr.source}' '${attr.target}'") userLaunchAgents}
- '';
+ system.build.launchd = pkgs.runCommandNoCC "launchd"
+ { preferLocalBuild = true; }
+ ''
+ mkdir -p $out/Library/LaunchAgents $out/Library/LaunchDaemons $out/user/Library/LaunchAgents
+ cd $out/Library/LaunchAgents
+ ${concatMapStringsSep "\n" (attr: "ln -s '${attr.source}' '${attr.target}'") launchAgents}
+ cd $out/Library/LaunchDaemons
+ ${concatMapStringsSep "\n" (attr: "ln -s '${attr.source}' '${attr.target}'") launchDaemons}
+ cd $out/user/Library/LaunchAgents
+ ${concatMapStringsSep "\n" (attr: "ln -s '${attr.source}' '${attr.target}'") userLaunchAgents}
+ '';
system.activationScripts.launchd.text = ''
# Set up launchd services in /Library/LaunchAgents and /Library/LaunchDaemons