{ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixos-hardware.url = "github:NixOS/nixos-hardware"; darwin.url = "github:lnl7/nix-darwin/master"; darwin.inputs.nixpkgs.follows = "nixpkgs"; home-manager.url = "github:nix-community/home-manager"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; emacs-overlay.url = "github:nix-community/emacs-overlay"; emacs-overlay.inputs.nixpkgs.follows = "nixpkgs"; secrets = { flake = false; }; }; outputs = { self , darwin , emacs-overlay , home-manager , nixpkgs , secrets , ... } @ attrs: let darwinSystem = "aarch64-darwin"; darwinPkgs = nixpkgs.legacyPackages.${darwinSystem}; nixosSystem = "x86_64-linux"; nixosPkgs = nixpkgs.legacyPackages.${nixosSystem}; aarch64LinuxSystem = "aarch64-linux"; aarch64LinuxPackages = nixpkgs.legacyPackages.${aarch64LinuxSystem}; in { nixosConfigurations.prefect = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = attrs; modules = [ ./system/prefect.nix ]; }; darwinConfigurations.mba = darwin.lib.darwinSystem { system = darwinSystem; specialArgs = attrs; modules = [ ./system/mba.nix ]; }; homeConfigurations."alan@mba" = home-manager.lib.homeManagerConfiguration { pkgs = darwinPkgs; extraSpecialArgs = { inherit attrs; }; modules = [ ./user/mba.nix (secrets + "/default.nix") (secrets + "/ssh.nix") ({ nixpkgs.overlays = [ emacs-overlay.overlay ]; }) ]; }; homeConfigurations."alan@prefect" = home-manager.lib.homeManagerConfiguration { pkgs = nixosPkgs; extraSpecialArgs = { inherit attrs; }; modules = [ ./user/prefect.nix (secrets + "/default.nix") (secrets + "/ssh.nix") ({ nixpkgs.overlays = [ emacs-overlay.overlay ]; }) ]; }; homeConfigurations."alan@nanopi" = home-manager.lib.homeManagerConfiguration { pkgs = aarch64LinuxPackages; extraSpecialArgs = { inherit attrs; }; modules = [ ./user/nanopi.nix (secrets + "/default.nix") ]; }; homeConfigurations."alan@pappel" = home-manager.lib.homeManagerConfiguration { pkgs = nixosPkgs; extraSpecialArgs = { inherit attrs; }; modules = [ ./user/server.nix (secrets + "/default.nix") ]; }; }; }