Skip to content

input=path:./<some> does not resolve as flake.nix-relative path if no flake.lock is present (upstream nix issue) #140

Open
@benneti

Description

add an input to pkgs/flake.nix, try to run a nix command from outside the devos/nixos configuration repository.
making it into an absolute path fixes it but will probably provide issues when installing.

sudo nixos-rebuild test --flake "/etc/nixos#$(hostname)" && rm result
[sudo] password for benneti:
warning: Git tree '/etc/nixos' is dirty
building the system configuration...
warning: Git tree '/etc/nixos' is dirty
error: --- SysError ------------------------------------------------------------------------------------------------------------------------------------------------------ nix
getting status of '/home/benneti/pkgs': No such file or directory

This will probably be an easy fix as soon as one of the upstream projects provides a solution; relevant links:
NixOS/nix#4218
edolstra/flake-compat#18

also I think the added convenience for updates even now outweighs the issue to have to cd into the nix store to do updates and so on.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions