{ description = "NixOS configuration for all hosts"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-24.05"; nixpkgs.follows = "nixpkgs"; flake-utils.url = "github:numtide/flake-utils"; home-manager.url = "github:nix-community/home-manager"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; disko.url = "github:nix-community/disko"; }; outputs = { self, nixpkgs, nixpkgs-stable, flake-utils, home-manager, disko, ... }: flake-utils.lib.eachDefaultSystem (system: let mkHost = { hostname, isInstall ? false }: nixpkgs.lib.nixosSystem { inherit system; specialArgs = { inherit system; pkgs = import nixpkgs { inherit system; config.allowUnfree = true; }; isInstall = isInstall; }; modules = [ ./hosts/${hostname}/configuration.nix ./modules/common.nix ./modules/users/alisceon.nix home-manager.nixosModules.home-manager ] ++ nixpkgs.lib.optional isInstall disko.nixosModules.disko ++ nixpkgs.lib.optional isInstall ./hosts/${hostname}/disko.nix; }; in { nixosConfigurations = { laptop = mkHost { hostname = "electra"; }; laptop-install = mkHost { hostname = "electra"; isInstall = true; }; }; }); }