<mikky>
hi, I'm trying to figure out how to use overlays with NixOPS. Got a functional overlay on my control machine (which uses nixos-unstable repo) but when I try to use this overlay in nixops deployment which uses nixos-1909, I get this error: `error: value is a function while a list was expected, at /nix/store/wi3cmk87lhwgp1dvhs1j2p2lmz6al03c-stable-19.09.2036.c49da6435f3/stable/pkgs/top-level/stage.nix:243:8`
<clever>
mikky: can you gist your code?
<mikky>
which part?
<clever>
mikky: the area where you set the overlays
<mikky>
the overlay is used as `-I nixpkgs-overlays=/data/overlays/gitea.nix`
<mikky>
same file is also in `~/.config/nixpkgs/overlays` and local `nix-env -iA nixos.gitea-latest` works
<mikky>
A workaround for nixops which works is `defaults = { ... }: {nixpkgs.overlays= = [ (import /data/overlays/gitea.nix) ]; }`
<mikky>
clever: I discovered the workaround just recently (it's your recommendation actually, from an issue at github) and I'm not sure which approach is cleaner - this, or the `-I` parameter
<clever>
ive not used `-I nixpkgs-overlays` before, but the name implies it wants a list of overlays
<clever>
so it should point to a directory, or a .nix file that returns a list?
<clever>
also, nixos itself (including within nixops) will always ignore `-I nixpkgs-overlays` so it wouldnt have worked anyways
<clever>
nixpkgs.overlays has higher priority, for purity
<mikky>
-I nixpkgs-overlays, according to docs, can point to either a file or a directory and is interpreted as list. Pointing it to directory does nothing for nixops, pointing it to file yields the error
<mikky>
anyway, I'll stick witht he nixops.overlays approach
<mikky>
makes things more obvious
<clever>
if pointed to a file, that file must still contain a list
<clever>
and it likely wont do anything in either case, because the machines dont use that, only nixops itself