{ description = "Michael Thomas's NixOS configuration"; inputs = { nixpkgs.url = "nixpkgs/nixos-22.05"; unstable.url = "nixpkgs/nixos-unstable"; nur.url = "github:nix-community/NUR"; utils.url = "github:numtide/flake-utils"; nixos-wsl = { url = "github:nix-community/NixOS-WSL"; inputs = { nixpkgs.follows = "nixpkgs"; }; }; home-manager = { url = "github:rycee/home-manager/release-22.05"; inputs = { nixpkgs.follows = "nixpkgs"; }; }; }; outputs = { self, nixpkgs, unstable, nur, utils, nixos-wsl, home-manager, ... }@inputs: { # This repo's overlay plus any other overlays you use # If you want to use packages from flakes that are not nixpkgs (such as NUR), add their overlays here.\ overlays = { default = import ./overlays inputs; }; overlaysModule = { nixpkgs.overlays = [ self.overlays.default ]; }; nixosConfigurations = { loft = nixpkgs.lib.nixosSystem { system = utils.lib.system.x86_64-linux; modules = [ self.overlaysModule home-manager.nixosModules.home-manager ./modules/common.nix ./modules/containers.nix ./machines/loft/configuration.nix ]; specialArgs = { inherit inputs; }; }; kitchen = nixpkgs.lib.nixosSystem { system = utils.lib.system.x86_64-linux; modules = [ self.overlaysModule home-manager.nixosModules.home-manager ./modules/common.nix ./modules/containers.nix ./machines/kitchen/configuration.nix ]; specialArgs = { inherit inputs; }; }; # WSL environment work = inputs.nixpkgs.lib.nixosSystem { system = utils.lib.system.x86_64-linux; modules = [ self.overlaysModule { nixpkgs.overlays = [ (import ./overlays/iptables) ]; } ./modules/containers.nix ./modules/nix.nix ./modules/vscode-server.nix ./machines/work/configuration.nix ]; specialArgs = { inherit inputs; }; }; }; homeConfigurations = { nixos = inputs.home-manager.lib.homeManagerConfiguration { system = "x86_64-linux"; homeDirectory = "/home/michael"; username = "michael"; stateVersion = "21.05"; configuration = { config, pkgs, ... }: { programs.home-manager.enable = true; imports = [ ./user/environments/nixos/home.nix ]; }; }; wsl = inputs.home-manager.lib.homeManagerConfiguration { system = "x86_64-linux"; homeDirectory = "/home/michael"; username = "michael"; stateVersion = "21.05"; configuration = { config, pkgs, ... }: { programs.home-manager.enable = true; imports = [ ./user/environments/wsl/home.nix ]; }; }; }; }; # // utils.lib.eachSystem [ "aarch64-linux" "x86_64-darwin" "x86_64-linux" ] (system: { # nixpkgs = import nixpkgs { # inherit system; # overlays = [ # self.overlays.default # ]; # config.allowUnfree = true; # }; # }); }