# vim: ts=2
{
  inputs,
  system,
  pkgs,
  sysLib,
  ...
}: let
  homeManagerConfig = {
    home-manager = {
      useGlobalPkgs = true;
      useUserPackages = true;
      users.soispha = import ../../home-manager;
      extraSpecialArgs = {
        inherit
          pkgs
          sysLib
          # extra information

          system
          ;

        inherit
          (inputs)
          # bins

          yambar_cpu
          yambar_memory
          strip_js_comments
          river_init_lesser
          grades
          # external deps

          user_js
          neovim_config
          snap-sync
          # modules

          impermanence
          ;
      };
    };
  };
  defaultModules = [
    inputs.agenix.nixosModules.default

    # inputs.home-manager.nixosModules.home-manager
    (import "${inputs.home-manager}/nixos")

    # inputs.impermanence.nixosModules.home-manager.impermanence
    homeManagerConfig
  ];
in {
  tiamat = inputs.nixpkgs.lib.nixosSystem {
    inherit system;
    specialArgs =
      pkgs.lib.recursiveUpdate inputs
      sysLib;
    modules =
      [
        ../../hosts/tiamat/configuration.nix
      ]
      ++ defaultModules;
  };

  mammun = inputs.nixpkgs.lib.nixosSystem {
    inherit system;
    specialArgs =
      pkgs.lib.recursiveUpdate inputs
      sysLib;
    modules =
      [
        ../../hosts/mammun/configuration.nix
      ]
      ++ defaultModules;
  };
  lahmu = inputs.nixpkgs.lib.nixosSystem {
    inherit system;
    specialArgs =
      pkgs.lib.recursiveUpdate inputs
      sysLib;
    modules =
      [
        ../../hosts/lahmu/configuration.nix
      ]
      ++ defaultModules;
  };
  spawn = inputs.nixpkgs.lib.nixosSystem {
    specialArgs = inputs;
    modules = [../../hosts/spawn/configuration.nix];
  };
}