Hello. I’m using NixOS for a while, but i’m new to flakes
I’m trying to build my system structured.
Now I have an issue with updating my system when referencing flake when it’s under directory that contains my system flake.
here is the strucutre:
What’s the issue you met? Are you trying to do this? If yes, then the feature has been merged into Nix 2.26 so you need a newer version of Nix.
Also, is there a particular reason for nesting flakes? If you just want to structure you nix files, you can create sub-directories and use paths to refer to each other.
error:
… while updating the lock file of flake 'git+file:///home/maksi/nixos'
… while updating the flake input 'my-flake'
… while fetching the input 'path:./packages/myflake'
error: path '//nix/store/s4pyyfl42zwn3pmgr36lakjc2gyd23nl-source/packages/myflake' does not exist
There is no reason for nesting flakes, except that it’s easier to track.
I’m already using sub-directories, the issue is they not seem to work together well.
“nixos” is dir for my system flake and “packages” is dir where I want to place flake (it’s subdirectory of “nixos” dir).
Also, there is “Projects”, under where i nave copy of flake, which i want to place under “packages” dir. When i reference the flake from there, it works.
Nix, not nixos. What is nix --version telling you?
I’ll be more specific: what exactly doesn’t “work together well”?
Why do you want to use subflakes which are frankly even more unstable than just creating subdirectories within one flake?