NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.32k stars 14.29k forks source link

iso: error nixos-install with nur packages #97369

Open Izorkin opened 4 years ago

Izorkin commented 4 years ago

Describe the bug Error nixos-install with nur packages:

sudo nixos-install --no-root-passwd --root /mnt --show-trace
building the configuration in /mnt/etc/nixos/configuration.nix...
error: --- BadStorePath ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- nix-build
path '/mnt/nix/store/cszhqirvqggzr9g7zqjn7q326q1cvldj-source' is not in the Nix store
------------------------------------------------------------------------------------------------- show-trace -------------------------------------------------------------------------------------------------
trace: while evaluating the attribute 'nur.repos.izorkin.oh-my-zsh-custom'
at: (30:45) in file: /mnt/etc/nixos/configuration.nix

    29|   nix = { gc.automatic = false; optimise.automatic = true; readOnlyStore = true; useSandbox = true; package = pkgs.nixStable; };
    30|   nixpkgs.config.packageOverrides = pkgs: { nur = import (builtins.fetchTarball "https://github.com/nix-community/NUR/archive/master.tar.gz") { inherit pkgs; }; };
      |                                             ^
    31|   security.sudo = { enable = true; wheelNeedsPassword = false; };

To Reproduce Install NixOS with this configuration:

...
  nixpkgs.config.packageOverrides = pkgs: { nur = import (builtins.fetchTarball "https://github.com/nix-community/NUR/archive/master.tar.gz") { inherit pkgs; }; };

  programs = {
    zsh = {
      ohMyZsh = { enable = true; custom = "${pkgs.nur.repos.izorkin.oh-my-zsh-custom}"; theme = "rkj-mod"; plugins = [ "git" "sudo" ]; };
    };
  };

...

Metadata

austinbutler commented 4 years ago

This seems to happen to me as well on a new install if I have any overlays. For example:

{
  nixpkgs.overlays = [
    (self: super: {
      # https://github.com/NixOS/nixpkgs/pull/98122
      corefonts = (import (builtins.fetchTarball {
        url =
          "https://github.com/NixOS/nixpkgs/archive/a9953f1eade4003516603611a4e9b05d76cfc643.tar.gz";
        sha256 = "193xc9ny7dbbi108802mf1fhcjs0dn49r7b9hr6jhnagbp8rn89h";
      }) { config = { allowUnfree = true; }; }).corefonts;
    })
  ];
}
stale[bot] commented 3 years ago

I marked this as stale due to inactivity. → More info