introduce wsl config

This commit is contained in:
Den Afanasyev 2025-10-08 20:21:58 +00:00
parent e0bf6e4467
commit b807b9d00d
4 changed files with 300 additions and 16 deletions

View file

@ -8,6 +8,10 @@
url = "github:nix-darwin/nix-darwin/master";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-wsl = {
url = "github:nix-community/NixOS-WSL/main";
inputs.nixpkgs.follows = "nixpkgs";
};
homebrew-core = {
url = "github:homebrew/homebrew-core";
flake = false;
@ -30,7 +34,7 @@
};
};
outputs = inputs@{ self, nixpkgs, nix-darwin, nix-homebrew, homebrew-core, homebrew-cask, homebrew-bundle, home-manager, sops-nix }: {
outputs = inputs@{ self, nixpkgs, nix-darwin, nixos-wsl, nix-homebrew, homebrew-core, homebrew-cask, homebrew-bundle, home-manager, sops-nix }: {
darwinConfigurations."Dens-MacBook" = nix-darwin.lib.darwinSystem {
system = "aarch64-darwin";
modules = [
@ -59,5 +63,23 @@
];
};
darwinPackages = self.darwinConfigurations."Dens-MacBook".pkgs;
nixosConfigurations = {
nixos = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
nixos-wsl.nixosModules.default {
system.stateVersion = "25.05";
wsl.enable = true;
}
/home/duumxh/Nix/wsl/configuration.nix
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.duumxh = /home/duumxh/Nix/wsl/home.nix;
}
];
};
};
};
}