nixos-wsl/flake.nix
Sebastian Wendel 9f2899ff0c first commit
2024-09-09 22:08:49 +02:00

111 lines
2.6 KiB
Nix

{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixos-wsl = {
url = "github:nix-community/NixOS-WSL";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-anywhere = {
url = "github:nix-community/nixos-anywhere";
inputs = {
nixpkgs.follows = "nixpkgs";
flake-parts.follows = "flake-parts";
disko.follows = "disko";
treefmt-nix.follows = "treefmt-nix";
};
};
nixos-generators = {
url = "github:nix-community/nixos-generators";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-compat.url = "github:nix-community/flake-compat";
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
treefmt-nix = {
url = "github:numtide/treefmt-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
git-hooks = {
url = "github:cachix/git-hooks.nix";
inputs = {
nixpkgs.follows = "nixpkgs";
flake-compat.follows = "flake-compat";
};
};
nixvim.url = "github:nix-community/nixvim";
stylix = {
url = "github:danth/stylix";
inputs = {
nixpkgs.follows = "nixpkgs";
flake-compat.follows = "flake-compat";
home-manager.follows = "home-manager";
};
};
nur.url = "github:nix-community/NUR";
};
outputs =
{ self, nixpkgs, flake-parts, ... } @ inputs:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [ "x86_64-linux" ];
imports = [
./nix/devshell.nix
./nix/pre-commit.nix
./nix/treefmt.nix
];
perSystem = { pkgs, system, ... }: {
_module.args = {
pkgs = import inputs.nixpkgs {
inherit system;
overlays = [ self.overlays.default ];
config = {
allowUnfree = true;
allowAliases = true;
};
};
};
};
flake = {
overlays.default = nixpkgs.lib.composeManyExtensions [
inputs.nixvim.overlays.default
inputs.nur.overlay
];
nixosConfigurations."ifm10n32359" = nixpkgs.lib.nixosSystem {
modules = with inputs; [
nixos-wsl.nixosModules.default
nixvim.nixosModules.nixvim
home-manager.nixosModules.home-manager
stylix.nixosModules.stylix
./modules
];
};
};
};
}