Looks very nice!
I have a flake based config where I just import old configuration.nix, and looking towards properly refactoring it to fully use flakes only.
Devos, even when it was nixflk way back is too big and too intimidating.
I like your setup and example configs. I’ll give it a shot probably over weekend.
I tried it out last night and had couple of hickups.
It doesn’t allow me to configure Nix options on my own like GC and auto optimize interval, because apparently that’s already declared within the lib.
nixos-rebuild dry-build failed with error something like “do not know how to build this (probably because store is read only)”. This occurred even with sudo.
I am not sure what the issue could be since i am using more or less the same options myself.
If you are implementing saneFlakeDefaults module (which is optional) - I can see nix.package conflicting with whatever you have in your config - the rest of the arguments should get merged together
Note: nix.nixPath will get removed in upcoming release
Also currently only NixOS is supported/tested - if you are using something else, that might be the issue. (Darwin support is comming soon!)
Thanks for the reply, I removed package and extraOptions and it doesn’t complain about nix anymore. But, this issue is still there:
~/git/flake on master [✘!+?]
❯ sudo nixos-rebuild dry-build --flake '.#hostName'
[sudo] password for user:
warning: Git tree '/home/user/git/flake' is dirty
building the system configuration...
warning: Git tree '/home/user/git/flake' is dirty
don't know how to build these paths (may be caused by read-only store access):
/nix/store/6kqlwvq3gkgq4fq8r6lbmx3wzqrbrzg7-nixos-system-hostName-21.05.20210319.f5e8bdd.drv
Also, I have couple of extra, um, extraOptions configured to keep derivations for nix-direnv. Will I be able to override/merge your options with mine?
I’m… not sure what you mean. It is not complaining about my config anymore, but that it cannot build the final store path. I checked and this [path does not already exist. Same log as above. Although I’ve been using Nix for a while now, I’m still more or less a noob, so apologies if I missed something obvious.
I also switched to staging branch of flake-utils-plus, to ensure I’m passing inputs correctly.