{ withSystem, inputs, ... }: { # perSystem = { ... }: { config.packages.hello = ...; }; flake.nixosConfigurations.crash = withSystem "x86_64-linux" ( ctx @ { config, inputs', ... }: inputs.nixpkgs.lib.nixosSystem { # Expose `packages`, `inputs` and `inputs'` as module arguments. # Use specialArgs permits use in `imports`. # Note: if you publish modules for reuse, do not rely on specialArgs, but # on the flake scope instead. See also https://flake.parts/define-module-in-separate-file.html specialArgs = { packages = config.packages; inherit inputs inputs'; }; modules = [ ( { config, lib, pkgs, ... }: { imports = [ # Hardware support inputs.nixos-hardware.nixosModules.microsoft-surface-common inputs.nixos-hardware.nixosModules.common-pc inputs.nixos-hardware.nixosModules.common-pc-laptop inputs.nixos-hardware.nixosModules.common-pc-laptop-ssd inputs.nixos-hardware.nixosModules.common-cpu-intel inputs.nixos-hardware.nixosModules.common-gpu-nvidia # Our modules (import ../../modules/base.nix {inherit inputs;}) (import ./configuration.nix) (import ./hardware.nix) (import ../../modules/user.nix { inherit inputs; mutableUsers = false; }) ]; nix.settings.experimental-features = [ "nix-command" "flakes" ]; } ) ]; } ); }