{ description = "Shared cute.haus infrastructure"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; import-tree.url = "github:denful/import-tree"; flake-parts.url = "github:hercules-ci/flake-parts"; blzrd = { url = "github:alyraffauf/blzrd"; inputs.flake-parts.follows = "flake-parts"; inputs.nixpkgs.follows = "nixpkgs"; inputs.treefmt-nix.follows = "treefmt-nix"; }; treefmt-nix = { url = "github:numtide/treefmt-nix"; inputs.nixpkgs.follows = "nixpkgs"; }; }; nixConfig = { accept-flake-config = true; extra-substituters = [ "https://install.determinate.systems" "https://alyraffauf.cachix.org" "https://nix-community.cachix.org" ]; extra-trusted-public-keys = [ "cache.flakehub.com-3:hJuILl5sVK4iKm86JzgdXW12Y2Hwd5G07qKtHTOcDCM=" "alyraffauf.cachix.org-1:GQVrRGfjTtkPGS8M6y7Ik0z4zLt77O0N25ynv2gWzDM=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" ]; }; outputs = inputs @ { flake-parts, nixpkgs, ... }: let sharedPackageSets = { aarch64-darwin = import nixpkgs { system = "aarch64-darwin"; config.allowUnfree = true; overlays = [inputs.self.overlays.default]; }; x86_64-linux = import nixpkgs { system = "x86_64-linux"; config.allowUnfree = true; overlays = [inputs.self.overlays.default]; }; }; in flake-parts.lib.mkFlake { inherit inputs; specialArgs = {inherit sharedPackageSets;}; } { systems = builtins.attrNames sharedPackageSets; perSystem = {system, ...}: { _module.args.pkgs = sharedPackageSets.${system}; }; imports = [ (inputs.import-tree ./nix) inputs.blzrd.flakeModule inputs.treefmt-nix.flakeModule ]; }; }