1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-03-05 16:27:03 +00:00

linux-builder: fix evaluation errors

- `modules` cannot be a nested list
- `nix.settings.extra-trusted-users` might not be set
This commit is contained in:
Michael Hoang 2023-07-09 13:07:03 +10:00
parent 4272af4079
commit d9e825f121

View file

@ -8,7 +8,7 @@ let
cfg = config.nix.linux-builder; cfg = config.nix.linux-builder;
builderWithOverrides = cfg.package.override { builderWithOverrides = cfg.package.override {
modules = [ cfg.modules ]; inherit (cfg) modules;
}; };
in in
@ -46,7 +46,7 @@ in
config = mkIf cfg.enable { config = mkIf cfg.enable {
assertions = [ { assertions = [ {
assertion = config.nix.settings.trusted-users != [ "root" ] || config.nix.settings.extra-trusted-users != [ ]; assertion = config.nix.settings.trusted-users != [ "root" ] || (config.nix.settings.extra-trusted-users or [ ]) != [ ];
message = '' message = ''
Your user or group (@admin) needs to be added to `nix.settings.trusted-users` or `nix.settings.extra-trusted-users` Your user or group (@admin) needs to be added to `nix.settings.trusted-users` or `nix.settings.extra-trusted-users`
to use the Linux builder. to use the Linux builder.