{ inputs, withSystem, ... }:
let
  inherit (inputs.self.lib.my) mkSystem;
  inherit (inputs.self.lib) listToAttrs;

  mkSystem' = sys: {
    name = sys.hostname;
    value = mkSystem ({ inherit withSystem; } // sys);
  };
  username = "ny";
in
{
  flake.nixosConfigurations = listToAttrs [
    (mkSystem' {
      inherit username;
      hostname = "marr";
      system = "x86_64-linux";
      extraModules = [
        inputs.disko.nixosModules.disko
        inputs.agenix.nixosModules.default
      ];
    })

    (mkSystem' {
      inherit username;
      hostname = "brontes";
      system = "x86_64-linux";
      extraModules = [ inputs.agenix.nixosModules.default ];
    })

    (mkSystem' {
      inherit username;
      hostname = "shan";
      system = "x86_64-linux";
      extraModules = [
        inputs.disko.nixosModules.disko
        inputs.agenix.nixosModules.default
      ];
    })

    (mkSystem' {
      inherit username;
      hostname = "raptus";
      system = "x86_64-linux";
      extraModules = [
        inputs.disko.nixosModules.disko
        inputs.agenix.nixosModules.default
      ];
    })

    (mkSystem' {
      inherit username;
      hostname = "nihilus";
      system = "aarch64-linux";
      extraModules = [
        inputs.nixos-hardware.nixosModules.raspberry-pi-4
      ];
    })
  ];
}
