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

Remove import for NixOS/HM modules #277

Merged
merged 1 commit into from
Jul 30, 2024

Commits on Jul 29, 2024

  1. Remove import for NixOS/HM modules

    When using `files` on a NixOS option in the `nix repl` it fails to
    follow the attribute of agenix module.
    
    Discussing with @roberth has explained that this is a "common bug" on
    account of mis-using the `import` for modules.
    
    From what I understand, the `import` statement brings it into the
    current context so you lose the attribute of where it's defined.
    
    Here is what I currently see:
    ```
    nix-repl> options.age.ageBin.files
    [
      "/nix/store/8kpmdb63f5i9mwdyirqki7hvvglgy1va-source/machines/nyx/configuration.nix"
    ]
    
    ```
    
    After this change, the value in agenix is reported instead.
    ```
    ❯ nix repl --extra-experimental-features 'flakes repl-flake' \
               --override-input agenix /home/fmzakari/code/github.com/ryantm/agenix .
    
    nix-repl> options.age.ageBin.files
    [
      "/nix/store/99gc8rhgw43k201k34pshcsygdvbhmpy-source/modules/age.nix"
    ]
    ```
    fzakaria committed Jul 29, 2024
    Configuration menu
    Copy the full SHA
    40012e5 View commit details
    Browse the repository at this point in the history