1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-12-14 11:57:34 +00:00

Merge pull request #1169 from Enzime/push-uktzylymvtyk

activate-system: remove `enable` option
This commit is contained in:
Michael Hoang 2024-11-15 03:53:49 +00:00 committed by GitHub
commit f86f158efd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 7 additions and 23 deletions

View file

@ -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

View file

@ -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.")
];

View file

@ -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;
};
};
}

View file

@ -1,7 +1,6 @@
{ config, pkgs, ... }:
{
services.activate-system.enable = true;
launchd.labelPrefix = "org.nix-darwin";
test = ''

View file

@ -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