{
  description = "Hakase Configuration";
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    elephant = {
      url = "github:abenz1267/elephant";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    chaotic = {
      url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    textfox = {
      url = "github:adriankarlen/textfox";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    nur = {
      url = "github:nix-community/NUR";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    home-manager = {
      url = "github:nix-community/home-manager";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    hyprland = {
      url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    hyprsplit = {
      url = "github:shezdy/hyprsplit";
      inputs.hyprland.follows = "hyprland";
    };
    hyprland-plugins = {
      url = "github:hyprwm/hyprland-plugins";
      inputs.hyprland.follows = "hyprland";
    };
    hyprspace = {
      url = "github:KZDKM/Hyprspace";
      inputs.hyprland.follows = "hyprland";
    };
    hypr-dynamic-cursors = {
      url = "github:Virtcode/hypr-dynamic-cursors";
      inputs.hyprland.follows = "hyprland";
    };
    nixovim = {
      # FIXME: treesitter does not install automatically (disabled due to read-only problems)
      url = "git+https://git.sakamoto.dev/kenji/nixovim.git";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    sops-nix = {
      url = "github:Mic92/sops-nix";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    walker = {
      url = "github:abenz1267/walker";
      inputs.nixpkgs.follows = "nixpkgs";
      inputs.elephant.follows = "elephant";
    };
    vicinae = {
      url = "github:vicinaehq/vicinae";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    apple-silicon = {
      url = "github:tpwrules/nixos-apple-silicon";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    unlisted-fonts = {
      url = "git+https://git.sakamoto.dev/kenji/nix-fonts.git";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    # TODO: unstable.nixpkgs `matugen` is stuck at v4.0.0
    # may need to use `git` version first
    matugen = {
      url = "github:/InioX/Matugen";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    antigravity-nix = {
      url = "github:jacopone/antigravity-nix";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    millennium-steam = {
      url = "github:SteamClientHomebrew/Millennium?dir=packages/nix";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };

  outputs = {
    self,
    nixpkgs,
    home-manager,
    chaotic,
    sops-nix,
    apple-silicon,
    antigravity-nix,
    textfox,
    nixovim,
    ...
  } @ inputs: let
    allConfig = import ./config.nix;
  in {
    nixosConfigurations = {
      hakase = nixpkgs.lib.nixosSystem {
        system = "x86_64-linux";
        specialArgs =
          {
            inherit inputs;
            system = "x86_64-linux";
          }
          // allConfig.hakase;
        modules = [
          inputs.matugen.nixosModules.default
          home-manager.nixosModules.home-manager
          sops-nix.nixosModules.sops
          chaotic.nixosModules.default
          ./hosts/hakase/configuration.nix
        ];
      };

      macbook = nixpkgs.lib.nixosSystem {
        system = "aarch64-linux";
        specialArgs =
          {
            inherit inputs;
            system = "aarch64-linux";
          }
          // allConfig.macbook;
        modules = [
          home-manager.nixosModules.home-manager
          sops-nix.nixosModules.sops
          apple-silicon.nixosModules.apple-silicon-support
          ./hosts/macbook/configuration.nix
        ];
      };
    };
  };
}
