mirror of
https://github.com/LnL7/nix-darwin.git
synced 2024-12-14 11:57:34 +00:00
activate-system: remove enable
option
Disabling this is not supported as `/run` gets cleared out on every reboot so it is necessary for ensuring that the `/run/current-system` symlink exists.
This commit is contained in:
parent
6c71c49e24
commit
dae702993d
5 changed files with 7 additions and 23 deletions
|
@ -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.
|
> NOTE: `darwin-option` is only available to non-flake installations.
|
||||||
|
|
||||||
```
|
```
|
||||||
$ darwin-option services.activate-system.enable
|
$ darwin-option nix.linux-builder.enable
|
||||||
Value:
|
Value:
|
||||||
true
|
true
|
||||||
|
|
||||||
|
@ -180,10 +180,10 @@ Default:
|
||||||
false
|
false
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
no example
|
true
|
||||||
|
|
||||||
Description:
|
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
|
There's also a small wiki https://github.com/LnL7/nix-darwin/wiki about
|
||||||
|
|
|
@ -774,7 +774,6 @@ in
|
||||||
|
|
||||||
# Not in NixOS module
|
# Not in NixOS module
|
||||||
warnings = [
|
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.")
|
(mkIf (!cfg.distributedBuilds && cfg.buildMachines != []) "nix.distributedBuilds is not enabled, build machines won't be configured.")
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -1,22 +1,11 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
let
|
|
||||||
cfg = config.services.activate-system;
|
|
||||||
in
|
|
||||||
|
|
||||||
{
|
{
|
||||||
options = {
|
imports = [
|
||||||
services.activate-system.enable = mkOption {
|
(lib.mkRemovedOptionModule [ "services" "activate-system" "enable" ] "The `activate-system` service is now always enabled as it is necessary for a working `nix-darwin` setup.")
|
||||||
type = types.bool;
|
];
|
||||||
default = true;
|
|
||||||
description = "Whether to activate system at boot time.";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
|
|
||||||
|
config = {
|
||||||
launchd.daemons.activate-system = {
|
launchd.daemons.activate-system = {
|
||||||
script = ''
|
script = ''
|
||||||
set -e
|
set -e
|
||||||
|
@ -41,6 +30,5 @@ in
|
||||||
serviceConfig.RunAtLoad = true;
|
serviceConfig.RunAtLoad = true;
|
||||||
serviceConfig.KeepAlive.SuccessfulExit = false;
|
serviceConfig.KeepAlive.SuccessfulExit = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
services.activate-system.enable = true;
|
|
||||||
launchd.labelPrefix = "org.nix-darwin";
|
launchd.labelPrefix = "org.nix-darwin";
|
||||||
|
|
||||||
test = ''
|
test = ''
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
services.activate-system.enable = true;
|
|
||||||
|
|
||||||
test = ''
|
test = ''
|
||||||
echo checking activation service in /Library/LaunchDaemons >&2
|
echo checking activation service in /Library/LaunchDaemons >&2
|
||||||
grep "org.nixos.activate-system" ${config.out}/Library/LaunchDaemons/org.nixos.activate-system.plist
|
grep "org.nixos.activate-system" ${config.out}/Library/LaunchDaemons/org.nixos.activate-system.plist
|
||||||
|
|
Loading…
Reference in a new issue