NixOS / nixops

NixOps is a tool for deploying to NixOS machines in a network or cloud.
https://nixos.org/nixops
GNU Lesser General Public License v3.0
1.86k stars 365 forks source link

error: function 'mkPackageOption' called with unexpected argument 'nullable' #1561

Closed n8henrie closed 1 year ago

n8henrie commented 1 year ago

After updating to 23.05 (unsure if that's related or just coincidental) I'm no longer able to deploy a configuration due to this error:

error: function 'mkPackageOption' called with unexpected argument 'nullable'
error: evaluation of the deployment specification failed

The configuration builds locally, so I think it's a nixops error, though hard to be sure.

$ nixops --version
NixOps 2.0.0-pre-5013072
roberth commented 1 year ago

Doesn't seem like a coincidence as nullable is a recently added parameter. It appears that NixOS gets evaluated with an old lib. What's in your NIX_PATH, and what's in your network's nixpkgs attribute?

n8henrie commented 1 year ago

Arch Linux, no channels configured, (flake based).

All inputs (including nixpkgs below) are tied to release-23.05 -- is that considered an old lib?

Pretty simple config:

  nixopsConfigurations.default = {
          inherit nixpkgs;
          network.storage.legacy = {};
          n8remote = {
            imports = [self.nixosModules.n8remote];
            deployment = {
              targetHost = "my.domain.com";
              targetPort = 42;
            };
          };
        };
$ env | grep NIX_PATH
$
$ nix-channel --list
$ sudo -i nix-channel --list
$ nix run nixpkgs#nix-info -- -m
 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.32-1-lts, Arch Linux, noversion, rolling`
 - multi-user?: `no`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.15.0`
 - channels(root): `""`
 - channels(n8henrie): `"nixpkgs-22.11"`
 - nixpkgs: `not found`

EDIT: Ah, there it is (maybe): channels(n8henrie): "nixpkgs-22.11"

Wonder where that is coming from. I'll investigate.

n8henrie commented 1 year ago

Found an old nixopsUnstable pinned in nix profile (which I'm still not very used to using since my other machines are on NixOS), once unpinned and running nixops from unstable it worked. Thanks for pointing me in the right direction.

n8henrie commented 1 year ago

Evaluation succeeds. Now I'm back to being stuck at copying closure (https://github.com/NixOS/nixops/issues/1557)