vars: fix default group on macOS

This commit is contained in:
Michael Hoang
2025-04-13 13:01:19 +02:00
parent f40ab5c379
commit 20ae80ee49
2 changed files with 4 additions and 1 deletions

View File

@@ -10,6 +10,7 @@ let
submodule = submodule =
module: module:
submoduleWith { submoduleWith {
class = _class;
specialArgs.pkgs = pkgs; specialArgs.pkgs = pkgs;
modules = [ module ]; modules = [ module ];
}; };

View File

@@ -1,4 +1,5 @@
{ {
_class,
lib, lib,
config, config,
pkgs, pkgs,
@@ -271,7 +272,8 @@ in
}; };
group = lib.mkOption { group = lib.mkOption {
description = "The group name or id that will own the file."; description = "The group name or id that will own the file.";
default = "root"; default = if _class == "darwin" then "wheel" else "root";
defaultText = lib.literalExpression ''if _class == "darwin" then "wheel" else "root"'';
}; };
mode = lib.mkOption { mode = lib.mkOption {
type = lib.types.strMatching "^[0-7]{3}$"; type = lib.types.strMatching "^[0-7]{3}$";