Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure when parsing foo ? ./${bar} #67

Open
azahi opened this issue Sep 10, 2022 · 0 comments
Open

Failure when parsing foo ? ./${bar} #67

azahi opened this issue Sep 10, 2022 · 0 comments

Comments

@azahi
Copy link

azahi commented Sep 10, 2022

Given this valid Nix expression:

{
  inputs,
  lib,
}:
with lib; let
  mkConfiguration = name: {
    modules ? [],
    configuration ? ./${name},
    this ? my.configurations.${name},
  }:
    nameValuePair name (nixosSystem {
      inherit (this) system;
      modules =
        attrValues inputs.self.nixosModules
        ++ modules
        ++ [(import configuration)];
      specialArgs = {inherit inputs lib this;};
    });
in
  mapAttrs' mkConfiguration {
    melian.modules = with inputs; [
      nixos-hardware.nixosModules.common-pc-laptop-ssd
      nixos-hardware.nixosModules.lenovo-thinkpad-t480
      nixpkgs.nixosModules.notDetected
    ];
};

nix-linter 0.2.0.4 fails with:

Failure when parsing:
configurations/default.nix:8:23:
  |
8 |     configuration ? ./${name},
  |                       ^
unexpected '$'
expecting '!', '-', or path

Not sure if I must report it here or in the hnix repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant