Add WSL2 target for builds

This commit is contained in:
Greg Hellings
2022-12-28 15:41:09 -06:00
parent b1e7d952d0
commit 6e7f5ae446
3 changed files with 75 additions and 2 deletions
Generated
+55 -1
View File
@@ -57,6 +57,37 @@
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1668681692,
"narHash": "sha256-Ht91NGdewz8IQLtWZ9LCeNXMSXHUss+9COoqu6JLmXU=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "009399224d5e398d03b22badca40a37ac85412a1",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": {
"locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@@ -149,7 +180,8 @@
"home-manager": "home-manager",
"nixunstable": "nixunstable",
"nurpkgs": "nurpkgs",
"stable": "stable"
"stable": "stable",
"wsl": "wsl"
}
},
"stable": {
@@ -167,6 +199,28 @@
"repo": "nixpkgs",
"type": "github"
}
},
"wsl": {
"inputs": {
"flake-compat": "flake-compat",
"flake-utils": "flake-utils",
"nixpkgs": [
"nixunstable"
]
},
"locked": {
"lastModified": 1671740841,
"narHash": "sha256-y9xl0aYI9uOJpNabIVja7aksDgV5nMgH8MsWaEOW2bM=",
"owner": "nix-community",
"repo": "NixOS-WSL",
"rev": "3ec8fafb7b5d1463cb166233cf18bf495dd8e944",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "NixOS-WSL",
"type": "github"
}
}
},
"root": "root",
+10 -1
View File
@@ -16,11 +16,15 @@
url = "github:lnl7/nix-darwin/master";
inputs.nixpkgs.follows = "nixunstable";
};
wsl = {
url = "github:nix-community/NixOS-WSL";
inputs.nixpkgs.follows = "nixunstable";
};
nurpkgs.url = "github:nix-community/NUR";
ffmac.url = "github:bandithedoge/nixpkgs-firefox-darwin";
};
outputs = {stable, nixunstable, agenix, home-manager, nurpkgs, self, ...}@inputs:
outputs = {stable, nixunstable, agenix, home-manager, nurpkgs, self, wsl, ...}@inputs:
let
local_overlay = import ./overlays;
overlays = [
@@ -42,6 +46,7 @@
modules = [
{ nixpkgs.overlays = overlays; }
agenix.nixosModule
wsl.nixosModules.wsl
./modules-all
./modules-linux
./hosts/${name}
@@ -76,6 +81,10 @@
"linode" = machine { name = "linode"; };
"lappy" = machine { name = "lappy"; };
"iso" = machine { name = "iso"; };
# nix build '.#nixosConfigurations.wsl.config.system.build.installer'
"wsl" = machine { name = "wsl"; };
# nix build '.#nixosConfigurations.wsl-aarch.config.system.build.installer'
"wsl-aarch" = machine { name = "wsl"; system = "aarch64-linux"; };
};
darwinConfigurations =
+10
View File
@@ -0,0 +1,10 @@
{ pkgs, ... }:
{
wsl = {
enable = true;
wslConf.automount.root = "/mnt";
defaultUser = "greg";
startMenuLaunchers = true;
};
}