dotfiles/nix-conf/system/nixos-wsl/flake.nix

60 lines
1.3 KiB
Nix
Raw Normal View History

2022-08-30 14:29:44 +00:00
{
description = "NixOS WSL";
inputs = {
nixpkgs.url = "nixpkgs/nixos-22.05";
flake-utils.url = "github:numtide/flake-utils";
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
};
2023-06-18 00:46:31 +00:00
outputs = {
self,
nixpkgs,
flake-utils,
...
}:
2022-08-30 14:29:44 +00:00
{
nixosModules.wsl = {
imports = [
./modules/build-tarball.nix
./modules/docker-desktop.nix
./modules/docker-native.nix
./modules/installer.nix
./modules/interop.nix
./modules/wsl-distro.nix
];
};
nixosConfigurations.mysystem = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./configuration.nix
];
};
2023-06-18 00:46:31 +00:00
}
// flake-utils.lib.eachSystem
(with flake-utils.lib.system; ["x86_64-linux" "aarch64-linux"])
(
system: let
pkgs = import nixpkgs {inherit system;};
in {
checks.check-format =
pkgs.runCommand "check-format"
{
buildInputs = with pkgs; [nixpkgs-fmt];
} ''
2022-08-30 14:29:44 +00:00
nixpkgs-fmt --check ${./.}
mkdir $out # success
'';
2023-06-18 00:46:31 +00:00
devShell = pkgs.mkShell {
nativeBuildInputs = with pkgs; [nixpkgs-fmt];
};
}
);
2022-08-30 14:29:44 +00:00
}