mirror of
https://github.com/nix-community/NixOS-WSL.git
synced 2026-11-07 14:59:35 +00:00
48 lines
1.0 KiB
Nix
48 lines
1.0 KiB
Nix
{
|
|
description = "NixOS WSL";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "nixpkgs/nixos-20.09";
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
|
|
flake-compat = {
|
|
url = "github:edolstra/flake-compat";
|
|
flake = false;
|
|
};
|
|
};
|
|
|
|
outputs = { self, nixpkgs, flake-utils, ... }:
|
|
{
|
|
nixosModules = {
|
|
build-tarball = import ./modules/build-tarball.nix;
|
|
};
|
|
|
|
nixosConfigurations.mysystem = nixpkgs.lib.nixosSystem {
|
|
system = "x86_64-linux";
|
|
modules = [
|
|
./configuration.nix
|
|
];
|
|
specialArgs = { inherit nixpkgs; };
|
|
};
|
|
|
|
} //
|
|
flake-utils.lib.eachDefaultSystem (system:
|
|
let
|
|
pkgs = import nixpkgs { inherit system; };
|
|
in
|
|
{
|
|
checks.check-format = pkgs.runCommand "check-format"
|
|
{
|
|
buildInputs = with pkgs; [ nixpkgs-fmt ];
|
|
} ''
|
|
nixpkgs-fmt --check ${./.}
|
|
mkdir $out # success
|
|
'';
|
|
|
|
devShell = pkgs.mkShell {
|
|
nativeBuildInputs = with pkgs; [ nixpkgs-fmt ];
|
|
};
|
|
}
|
|
);
|
|
}
|