Hello fellow nix people. I am digging into nix and nixos distro as a newcomer and it is pretty painful, but I am sure it’s worth it. I am using the latest version of NixOS-WSL (Valiant Vicuna 2411.6.0) from:
https://github.com/nix-community/NixOS-WSL/releases/tag/2411.6.0
I installed it on Windows 11 by just double-clicking on it. Worked like a charm and I am actively trying things out and learning. I found an open issue on the repo but there is no solution so far:
The expected output of the command
nix-env -qaP
or for examplenix-env -qa 'vim'
should give a collection of available packages in the current channels.
The output I get is the following:
evaluation warning: The package set `androidndkPkgs_23b` has been renamed to `androidndkPkgs_23`.
evaluation warning: cudaPackages.cudaFlags is deprecated, use cudaPackages.flags instead
evaluation warning: cudaPackages.cudaVersion is deprecated, use cudaPackages.cudaMajorMinorVersion instead
evaluation warning: CUDA versions older than 12.0 will be removed in Nixpkgs 25.05; see the 24.11 release notes for more information
evaluation warning: cudaPackages.cudaFlags is deprecated, use cudaPackages.flags instead
evaluation warning: cudaPackages.cudaVersion is deprecated, use cudaPackages.cudaMajorMinorVersion instead
evaluation warning: CUDA versions older than 12.0 will be removed in Nixpkgs 25.05; see the 24.11 release notes for more information
evaluation warning: CUDA versions older than 12.0 will be removed in Nixpkgs 25.05; see the 24.11 release notes for more information
evaluation warning: CUDA versions older than 12.0 will be removed in Nixpkgs 25.05; see the 24.11 release notes for more information
evaluation warning: CUDA versions older than 12.0 will be removed in Nixpkgs 25.05; see the 24.11 release notes for more information
evaluation warning: CUDA versions older than 12.0 will be removed in Nixpkgs 25.05; see the 24.11 release notes for more information
evaluation warning: CUDA versions older than 12.0 will be removed in Nixpkgs 25.05; see the 24.11 release notes for more information
evaluation warning: CUDA versions older than 12.0 will be removed in Nixpkgs 25.05; see the 24.11 release notes for more information
evaluation warning: CUDA versions older than 12.0 will be removed in Nixpkgs 25.05; see the 24.11 release notes for more information
error:
… while evaluating the attribute 'nixos-wsl'
… while calling the 'import' builtin
… while evaluating the file '/nix/store/jvi7knli55bkmpjzv6dfa2s75w8nx0bj-nixos-wsl/nixos-wsl/default.nix':
… while evaluating the attribute 'defaultNix'
at /nix/store/b0my5vy8pzfzjqrr3g58j0w6md9jf3ch-source/default.nix:278:3:
277|
278| defaultNix =
| ^
279| builtins.removeAttrs result [ "__functor" ]
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: path '/nix/store/flzrms4bhx1h5489jl3jwbi6l2q0fyym-nixos-wsl' is not valid
Some of my outputs in the hope it helps someone helping me:
nix --version
nix (Nix) 2.28.4
sudo nix-channel --list
nixos https://nixos.org/channels/nixos-unstable
nixos-wsl https://github.com/nix-community/NixOS-WSL/archive/refs/heads/main.tar.gz
cat /etc/nixos/configuration.nix
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
# NixOS-WSL specific options are documented on the NixOS-WSL repository:
# https://github.com/nix-community/NixOS-WSL
{ config, lib, pkgs, ... }:
{
imports = [
# include NixOS-WSL modules
<nixos-wsl/modules>
];
wsl.enable = true;
wsl.defaultUser = "nixos";
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. It's perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.11"; # Did you read the comment?
Any help appreciated.