{
  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";

    home-manager.url = "github:nix-community/home-manager";
    home-manager.inputs.nixpkgs.follows = "nixpkgs";

    sops-nix.url = "github:Mic92/sops-nix";
    sops-nix.inputs.nixpkgs.follows = "nixpkgs";

    impermanence.url = "github:nix-community/impermanence";

    stylix.url = "github:danth/stylix";
    nix-alien.url = "github:thiagokokada/nix-alien";

    nvf = {
      # url = "github:NotAShelf/nvf";
      url = "github:thamenato/nvf/fix-nvim-treesitter";
      inputs.nixpkgs.follows = "nixpkgs";
    };

    zen-browser = {
      url = "github:0xc000022070/zen-browser-flake";
      inputs.nixpkgs.follows = "nixpkgs";
    };

    nix-minecraft.url = "git+https://codeberg.org/nix-astral/nix-minecraft.git";
    # nix-minecraft.url = "github:Infinidoge/nix-minecraft";
    valheim-server.url = "github:kmjayadeep/valheim-server-flake";
    valheim-server.inputs.nixpkgs.follows = "nixpkgs";

    nix-flatpak.url = "github:gmodena/nix-flatpak?ref=latest";
  };

  outputs = inputs @ {
    nixpkgs,
    home-manager,
    stylix,
    ...
  }: let
    system = "x86_64-linux";

    pkgs = import inputs.nixpkgs {inherit system;};

    sources = import ./_sources/generated.nix {
      inherit (pkgs) fetchurl fetchgit fetchFromGitHub dockerTools;
    };

    utils = import ./utils.nix {inherit inputs system sources;};
  in {
    nixosConfigurations = {
      # desktop
      muon = utils.mkHost ./hosts/muon/configuration.nix;

      # laptop
      muop = utils.mkHost ./hosts/muop/configuration.nix;

      # server
      muho = utils.mkHost ./hosts/muho/configuration.nix;

      # vps
      mups = utils.mkHost ./hosts/mups/configuration.nix;

      # vm
      muvm = utils.mkHost ./hosts/muvm/configuration.nix;

      # work
      murk = utils.mkHost ./hosts/murk/configuration.nix;

      # work desktop
      musk = utils.mkHost ./hosts/musk/configuration.nix;

      # lenovo
      muvo = utils.mkHost ./hosts/muvo/configuration.nix;

      # installer
      muin = utils.mkHost ./hosts/muin/configuration.nix;
    };

    homeManagerModules.default = ./modules/home;

    colmena = {
      meta = {
        nixpkgs = import inputs.nixpkgs {inherit system;};

        specialArgs = {inherit nixpkgs inputs system sources;};
      };

      # Remote host name
      "mups" = {
        name,
        nodes,
        ...
      }: {
        deployment.targetHost = "muon.host"; # SSH IP
        deployment.targetUser = "root"; # SSH username

        # modules
        imports = [
          ./hosts/mups/configuration.nix
          ./modules/nixos
          inputs.home-manager.nixosModules.default
          inputs.stylix.nixosModules.stylix
        ];
      };

      # "muho" = { name, nodes, ... }: {
      #   deployment.targetHost = "muho"; # SSH IP
      #   deployment.targetUser = "muon"; # SSH username

      #   # modules
      #   imports = [
      #     ./hosts/muho/configuration.nix
      #     ./modules/nixos
      #     inputs.home-manager.nixosModules.default
      #     inputs.stylix.nixosModules.stylix
      #   ];
      # };
    };
  };
}
