{ description = "whc NixOS — desktop (i7-12700F + RTX 4060) + laptop (Ultra 9 285H / Arc)"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; }; outputs = { self, nixpkgs, ... }: let system = "x86_64-linux"; mkSystem = host: nixpkgs.lib.nixosSystem { inherit system; modules = [ (./hosts + "/${host}") ]; }; in { nixosConfigurations = { desktop = mkSystem "desktop"; laptop = mkSystem "laptop"; # hostname 仍是 nixos:让不带 attr 的 `nixos-rebuild --flake .#` 也能命中 nixos = mkSystem "laptop"; }; # 无 flake 时也可:把本仓库拷到 /etc/nixos 后 nixos-rebuild switch formatter.${system} = nixpkgs.legacyPackages.${system}.nixfmt-rfc-style; }; }