{ description = "WeetHet's darwin system flake"; inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; darwin = { url = "github:lnl7/nix-darwin"; inputs.nixpkgs.follows = "nixpkgs"; }; home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; rust-overlay = { url = "github:oxalica/rust-overlay"; inputs.nixpkgs.follows = "nixpkgs"; }; nixvim = { url = "github:nix-community/nixvim"; inputs.nixpkgs.follows = "nixpkgs"; }; fh = { url = "https://flakehub.com/f/DeterminateSystems/fh/*.tar.gz"; inputs.nixpkgs.follows = "nixpkgs"; }; }; outputs = { self, darwin, nixpkgs, home-manager, rust-overlay, nixvim, fh, ... }@inputs: let nixpkgsConfig = { config = { allowUnfree = true; }; overlays = [ (import rust-overlay) (final: prev: { fh = fh.packages.${prev.system}.default; }) ]; }; pinNixpkgs = ( { ... }: { nix.registry.nixpkgs.flake = nixpkgs; } ); system = "aarch64-darwin"; in { darwinConfigurations.weethet = darwin.lib.darwinSystem { inherit system; modules = [ ./configuration.nix ./system.nix pinNixpkgs home-manager.darwinModules.home-manager { nixpkgs = nixpkgsConfig; home-manager = { useGlobalPkgs = true; useUserPackages = true; users.weethet = import ./home; extraSpecialArgs = inputs; }; } ]; }; formatter.${system} = (import nixpkgs { inherit system; }).nixfmt-rfc-style; }; }