Mic92 / nixos-shell

Spawns lightweight nixos vms in a shell
MIT License
685 stars 39 forks source link

Example vm script does not work #50

Closed onny closed 2 years ago

onny commented 2 years ago

Hey, when I try to run the exampel VM like this vm.nix:

{ pkgs, ... }: {
  boot.kernelPackages = pkgs.linuxPackages_latest;
}

Now running NIX_PATH=nixpkgs=/home/onny/projects/nixpkgs nixos-shell vm.nix results in:

error: A definition for option `virtualisation.memorySize' is not of type `positive integer, meaning >0'. Definition values:
- In `/nix/store/z51q89m10qqqj7bkl5yhpx9k2q5w2vjv-nixos-shell-0.2.1/share/nixos-shell/nixos-shell.nix': "500M"
(use '--show-trace' to show detailed location information)

Can nixos-shell use a correct default value for memorySize so that it works withotu defining it manually?

Regards Jonas

Mic92 commented 2 years ago

This was fixed in https://github.com/Mic92/nixos-shell/commit/abe9d6534fd724a54ba799643fe4bb80bae7c5c2 What version are you using. 0.2.2 should have the fix.

onny commented 2 years ago

Thanks for the info! Used nixos-shell from unstable and now it works :)