nixos-module failing to build on darwin #103

Open
opened 2025-12-22 11:49:58 +00:00 by dibenzepin · 1 comment

#101 uses NixOS-specific settings which prevents it from being built on macOS:

$ sudo darwin-rebuild switch
building the system configuration...
warning: Git tree '/Users/fum/dots' is dirty
warning: updating lock file '/Users/fum/dots/flake.lock':
• Updated input 'lix-module/flake-utils':
    follows 'flake-utils''github:numtide/flake-utils/11707dc2f618dd54ca8739b309ec4fc024de578b' (2024-11-13)
• Added input 'lix-module/flake-utils/systems':
    'github:nix-systems/default/da67096a3b9bf56a91d16901293e51ba5b49a27e' (2023-04-09)
warning: Git tree '/Users/fum/dots' is dirty
error:
       … while evaluating the attribute 'config.system.build.toplevel'
         at /nix/store/h1i4134mxff6pv5zzfkzj3h4qyass2jr-source/lib/modules.nix:361:9:
          360|         options = checked options;
          361|         config = checked (removeAttrs config [ "_module" ]);
             |         ^
          362|         _module = checked (config._module);while evaluating an expression to select 'system' on it
         at /nix/store/4s8pqscjlrhv3jf6gnwd3mhm31kwyr52-source/eval-config.nix:88:35:
           87|     inherit (configuration._module.args) pkgs;
           88|     system = configuration.config.system.build.toplevel;
             |                                   ^
           89|     extendModules = args: withExtraAttrs (configuration.extendModules args);

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: attribute 'systemd' missing
       at /nix/store/fqx55c2c6wcp01al17asszchx13az4ls-source/module.nix:6:25:
            5|   lixModuleMerged = lib.pathExists "${modulesPath}/programs/lix.nix";
            6|   nixDaemonCfg = config.systemd.services.nix-daemon;
             |                         ^
            7| in
       Did you mean system?

see Matrix discussion here.

#101 uses NixOS-specific settings which prevents it from being built on macOS: ```bash $ sudo darwin-rebuild switch building the system configuration... warning: Git tree '/Users/fum/dots' is dirty warning: updating lock file '/Users/fum/dots/flake.lock': • Updated input 'lix-module/flake-utils': follows 'flake-utils' → 'github:numtide/flake-utils/11707dc2f618dd54ca8739b309ec4fc024de578b' (2024-11-13) • Added input 'lix-module/flake-utils/systems': 'github:nix-systems/default/da67096a3b9bf56a91d16901293e51ba5b49a27e' (2023-04-09) warning: Git tree '/Users/fum/dots' is dirty error: … while evaluating the attribute 'config.system.build.toplevel' at /nix/store/h1i4134mxff6pv5zzfkzj3h4qyass2jr-source/lib/modules.nix:361:9: 360| options = checked options; 361| config = checked (removeAttrs config [ "_module" ]); | ^ 362| _module = checked (config._module); … while evaluating an expression to select 'system' on it at /nix/store/4s8pqscjlrhv3jf6gnwd3mhm31kwyr52-source/eval-config.nix:88:35: 87| inherit (configuration._module.args) pkgs; 88| system = configuration.config.system.build.toplevel; | ^ 89| extendModules = args: withExtraAttrs (configuration.extendModules args); (stack trace truncated; use '--show-trace' to show the full trace) error: attribute 'systemd' missing at /nix/store/fqx55c2c6wcp01al17asszchx13az4ls-source/module.nix:6:25: 5| lixModuleMerged = lib.pathExists "${modulesPath}/programs/lix.nix"; 6| nixDaemonCfg = config.systemd.services.nix-daemon; | ^ 7| in Did you mean system? ``` see Matrix discussion [here](https://matrix.to/#/!KCM2lsE0d3vhMQY0:lix.systems/$qSPQusnFF2yHTdZFDJK7iyBDDL1_fXzSBEW-jBtYLC0?via=lix.systems&via=matrix.org&via=catgirl.cloud).
Owner

That's definitely a bug! When someone fixes this, we need to add an evaluation test to the checks that verifies it evaluates on nix-darwin.

That's definitely a bug! When someone fixes this, we need to add an evaluation test to the checks that verifies it evaluates on nix-darwin.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lix-project/nixos-module#103
No description provided.