forked from nix-community/NixOS-WSL
-
Notifications
You must be signed in to change notification settings - Fork 2
/
flake.nix
49 lines (45 loc) · 1.24 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-24.05";
nixos-wsl = {
url = "github:nix-community/NixOS-WSL?ref=2405.5.4";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{
self,
nixpkgs,
nixos-wsl,
}:
{
packages.aarch64-linux.default = self.nixosConfigurations.nixos.config.system.build.tarballBuilder;
packages.x86_64-linux.default =
self.nixosConfigurations.nixos-x86_64.config.system.build.tarballBuilder;
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
modules = [
nixos-wsl.nixosModules.default
{
wsl.enable = true;
system.stateVersion = "24.11";
}
];
};
nixosConfigurations.nixos-x86_64 = nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
modules = [
nixos-wsl.nixosModules.default
{
nixpkgs.config.allowUnsupportedSystem = true;
nixpkgs.hostPlatform.system = "aarch64-linux";
nixpkgs.buildPlatform.system = "x86_64-linux";
}
{
wsl.enable = true;
system.stateVersion = "24.11";
}
];
};
};
}