diff options
author | aszlig <aszlig@nix.build> | 2020-06-14 15:33:33 +0200 |
---|---|---|
committer | aszlig <aszlig@nix.build> | 2020-06-14 15:33:33 +0200 |
commit | 3100ae7cd245cd2de413e4d4159a90bb52f4ead0 (patch) | |
tree | f1b02f33bbc7ec2515c6a96f3dd7033fcf187291 /machines | |
parent | 218c6422e9d43b68edb86dfbcfd51c5a5ef39724 (diff) |
legosi: Use modulesPath instead of <nixpkgs/nixos>
While it's fine to use <nixpkgs> on most systems, we deliberately want to avoid the use of <nixpkgs> to make sure that whenever we for example run <nixpkgs/nixos/lib/eval-config.nix> with a custom "pkgs" argument we are guaranteed that we get the version we specify. So this is one of the reason I used <nixpkgsSrc> on Hydra instead of <nixpkgs>, so that whenever we have such occasions where we can't guarantee such things, the evaluation will fail. And right now, it does: in job 'machines.profpatsch.legosi': file 'nixpkgs/nixos/modules/profiles/qemu-guest.nix' was not found in the Nix search path (add it using $NIX_PATH or -I), at .../machines/profpatsch/legosi.nix:12:5 Fortunately, there is modulesPath, which refers to <nixpkgs/nixos/modules> of the nixpkgs version passed via "pkgs". Signed-off-by: aszlig <aszlig@nix.build> Cc: @Profpatsch
Diffstat (limited to 'machines')
-rw-r--r-- | machines/profpatsch/legosi.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/machines/profpatsch/legosi.nix b/machines/profpatsch/legosi.nix index 9508cbde..fc3da387 100644 --- a/machines/profpatsch/legosi.nix +++ b/machines/profpatsch/legosi.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, ... }: +{ modulesPath, config, pkgs, lib, ... }: let myLib = import ./lib.nix { inherit pkgs lib; }; @@ -9,7 +9,7 @@ let in { imports = [ ./base-server.nix - <nixpkgs/nixos/modules/profiles/qemu-guest.nix> + "${modulesPath}/profiles/qemu-guest.nix" ]; config = { |