Skip to content

Instantly share code, notes, and snippets.

@sdellysse
Created March 7, 2024 15:47
Show Gist options
  • Save sdellysse/73abab7922e144d8200e3487fd0ae572 to your computer and use it in GitHub Desktop.
Save sdellysse/73abab7922e144d8200e3487fd0ae572 to your computer and use it in GitHub Desktop.
Minimal flake.nix for NixOS-WSL
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
NixOS-WSL.url = "github:nix-community/NixOS-WSL";
NixOS-WSL.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { NixOS-WSL, nixpkgs, ... } @ inputs: {
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
NixOS-WSL.nixosModules.wsl
({ ... }: {
wsl.enable = true;
wsl.defaultUser = "nixos";
system.stateVersion = "23.11";
})
];
};
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment