67 lines
2.2 KiB
Nix
67 lines
2.2 KiB
Nix
{ withSystem, inputs, ... }:
|
|
{
|
|
# perSystem = { ... }: { config.packages.hello = ...; };
|
|
|
|
flake.nixosConfigurations.wsl = withSystem "x86_64-linux" (
|
|
ctx@{ config, inputs', ... }:
|
|
inputs.nixpkgs.lib.nixosSystem {
|
|
# Expose `packages`, `inputs` and `inputs'` as module arguments.
|
|
# Use specialArgs permits use in `imports`.
|
|
# Note: if you publish modules for reuse, do not rely on specialArgs, but
|
|
# on the flake scope instead. See also https://flake.parts/define-module-in-separate-file.html
|
|
specialArgs = {
|
|
packages = config.packages;
|
|
inherit inputs inputs';
|
|
};
|
|
modules = [
|
|
(
|
|
# NixOS-WSL specific options are documented on the NixOS-WSL repository:
|
|
# https://github.com/nix-community/NixOS-WSL
|
|
|
|
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
|
|
{
|
|
imports = [
|
|
# WSL support
|
|
inputs.nixos-wsl.nixosModules.default
|
|
# Our modules
|
|
(import ../../modules/base.nix { inherit inputs; })
|
|
(import ../../modules/user.nix {
|
|
inherit inputs;
|
|
mutableUsers = true;
|
|
})
|
|
];
|
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
|
|
wsl.enable = true;
|
|
wsl.defaultUser = "nathan";
|
|
|
|
nix.settings.experimental-features = [
|
|
"nix-command"
|
|
"flakes"
|
|
];
|
|
|
|
environment.systemPackages =
|
|
with pkgs;
|
|
[
|
|
];
|
|
|
|
# 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?
|
|
}
|
|
)
|
|
];
|
|
}
|
|
);
|
|
}
|