mirror of
https://github.com/librephoenix/nixos-config
synced 2025-07-06 06:52:13 +05:30
Got my NixOS flake to run under WSL!
This commit is contained in:
parent
e877fd63bc
commit
0a71232a56
18 changed files with 1063 additions and 10 deletions
56
profiles/wsl/nixos-wsl/flake.nix
Executable file
56
profiles/wsl/nixos-wsl/flake.nix
Executable file
|
@ -0,0 +1,56 @@
|
|||
{
|
||||
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;
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils, ... }:
|
||||
{
|
||||
|
||||
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
|
||||
];
|
||||
};
|
||||
|
||||
} //
|
||||
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 ];
|
||||
} ''
|
||||
nixpkgs-fmt --check ${./.}
|
||||
mkdir $out # success
|
||||
'';
|
||||
|
||||
devShell = pkgs.mkShell {
|
||||
nativeBuildInputs = with pkgs; [ nixpkgs-fmt ];
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue