diff --git a/README.md b/README.md index b9e3de7e..eb6228ca 100644 --- a/README.md +++ b/README.md @@ -172,7 +172,7 @@ Furthermore there's `darwin-option` to introspect the settings of a system and i > NOTE: `darwin-option` is only available to non-flake installations. ``` -$ darwin-option services.activate-system.enable +$ darwin-option nix.linux-builder.enable Value: true @@ -180,10 +180,10 @@ Default: false Example: -no example +true Description: -Whether to activate system at boot time. +Whether to enable Linux builder. ``` There's also a small wiki https://github.com/LnL7/nix-darwin/wiki about diff --git a/modules/nix/default.nix b/modules/nix/default.nix index d99aae83..3751e8c4 100644 --- a/modules/nix/default.nix +++ b/modules/nix/default.nix @@ -774,7 +774,6 @@ in # Not in NixOS module warnings = [ - (mkIf (!config.services.activate-system.enable && cfg.distributedBuilds) "services.activate-system is not enabled, a reboot could cause distributed builds to stop working.") (mkIf (!cfg.distributedBuilds && cfg.buildMachines != []) "nix.distributedBuilds is not enabled, build machines won't be configured.") ]; diff --git a/modules/services/activate-system/default.nix b/modules/services/activate-system/default.nix index c41d9637..6a982fe8 100644 --- a/modules/services/activate-system/default.nix +++ b/modules/services/activate-system/default.nix @@ -1,22 +1,11 @@ { config, lib, pkgs, ... }: -with lib; - -let - cfg = config.services.activate-system; -in - { - options = { - services.activate-system.enable = mkOption { - type = types.bool; - default = true; - description = "Whether to activate system at boot time."; - }; - }; - - config = mkIf cfg.enable { + imports = [ + (lib.mkRemovedOptionModule [ "services" "activate-system" "enable" ] "The `activate-system` service is now always enabled as it is necessary for a working `nix-darwin` setup.") + ]; + config = { launchd.daemons.activate-system = { script = '' set -e @@ -41,6 +30,5 @@ in serviceConfig.RunAtLoad = true; serviceConfig.KeepAlive.SuccessfulExit = false; }; - }; } diff --git a/tests/services-activate-system-changed-label-prefix.nix b/tests/services-activate-system-changed-label-prefix.nix index 1ae2bcf5..2c2f6038 100644 --- a/tests/services-activate-system-changed-label-prefix.nix +++ b/tests/services-activate-system-changed-label-prefix.nix @@ -1,7 +1,6 @@ { config, pkgs, ... }: { - services.activate-system.enable = true; launchd.labelPrefix = "org.nix-darwin"; test = '' diff --git a/tests/services-activate-system.nix b/tests/services-activate-system.nix index c519aa89..702bb26a 100644 --- a/tests/services-activate-system.nix +++ b/tests/services-activate-system.nix @@ -1,8 +1,6 @@ { config, pkgs, ... }: { - services.activate-system.enable = true; - test = '' echo checking activation service in /Library/LaunchDaemons >&2 grep "org.nixos.activate-system" ${config.out}/Library/LaunchDaemons/org.nixos.activate-system.plist