{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    sops-nix.url = "github:Mic92/sops-nix";
    me-emacs.url = "git+https://git.syzygial.cc/Syzygial/EmacsConfig.git";
    me-emacs.inputs.nixpkgs.follows = "nixpkgs";
    nix-darwin.url = "github:LnL7/nix-darwin/master";
    nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
    home-manager.url = "github:nix-community/home-manager";
    home-manager.inputs.nixpkgs.follows = "nixpkgs";
    lix-module = {
      url = "https://git.lix.systems/lix-project/nixos-module/archive/2.92.0.tar.gz";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    microvm.url = "github:astro/microvm.nix";
    microvm.inputs.nixpkgs.follows = "nixpkgs";
    deploy-rs.url = "github:serokell/deploy-rs";
  };
  
  outputs = { self, nixpkgs, sops-nix, me-emacs, nix-darwin, home-manager, lix-module, microvm, deploy-rs }@inputs: let
    overlays = import ./overlays/default.nix inputs;
    modules = import ./modules/default.nix inputs;

    overlays' = l: ({ config, pkgs, ... }: {
      nixpkgs.overlays = l;
    });

    pkgs_linux-x86_64 = nixpkgs.legacyPackages."x86-linux";
    pkgs_linux-aarch64 = nixpkgs.legacyPackages."aarch64-linux";

    sysConfig = config: {
      system = "x86_64-linux";
      specialArgs = { inherit inputs; };
    } // config;

    nixosSystem' = config: nixpkgs.lib.nixosSystem (sysConfig ({
      
    } // config));

    darwinSystem' = config: nix-darwin.lib.darwinSystem (sysConfig ({
      system = "aarch64-darwin";
    } // config));

    homeConf' = config: home-manager.lib.homeManagerConfiguration config;
  in {
    nixosConfigurations = {
      nixos = nixosSystem' {
        modules =[
          ./machines/hippocampus/configuration.nix
          (overlays' [
            overlays.nvidiaContainer
          ])
          modules.sops
          ({ pkgs, ...}: {
            nix.package = pkgs.lix;
          })
        ];
      };
      universedesktop = nixosSystem' {
        modules = [
          ./machines/universedesktop/configuration.nix
          (overlays' [
            overlays.emacs
          ])
          modules.sops
          # Broken w/ this nixpkgs input
          # lix-module.nixosModules.default
        ];
      };
      pericyte = nixosSystem' {
        modules = [
          ./machines/pericyte/configuration.nix
          modules.sops
          # lix-module.nixosModules.default
          # microvm.nixosModules.host
        ];
      };
    };
    darwinConfigurations = {
      UniverseAir = darwinSystem' {
        modules = [
          ./machines/universeair/configuration.nix
          (overlays' [
            overlays.emacs
          ])
          modules.home-manager-darwin
          # lix-module.nixosModules.default
        ];
      };
    };
    homeConfigurations = {
      universelaptop = homeConf' {
        pkgs = pkgs_linux-aarch64;

        extraSpecialArgs = {
          pkgs-x86_64 = pkgs_linux-x86_64;
          inputs = inputs;
        };

        modules = [
          ./machines/asahi/home.nix
        ];
      };
    };

    deploy = {
      nodes = {
        pericyte = {
          hostname = "opcp";
          sshUser = "root";
          profiles.system = {
            user = "root";
            path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.pericyte;
          };
        };
      };
    };
    # This is highly advised, and will prevent many possible mistakes
    # checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;

    hydraJobs = {
      # inherit (me-emacs) packages;
    };
  };
}
