{ 
  inputs,
  flake,
  self,
}: {
  pkgs,
  lib,
  config,
  ...
}: let
  cfg = config.hectic.archetype.base;
in {
  imports = [
    inputs.disko.nixosModules.default
    inputs.nixos-mailserver.nixosModules.mailserver
  ];

  options.hectic.archetype.base.enable = lib.mkEnableOption "Enable archetupe.dev";

  config = lib.mkIf cfg.enable {
    hectic = {
      program.zsh.enable    = lib.mkDefault true;
      program.tmux.enable   = lib.mkDefault true;
      program.nixvim.enable = lib.mkDefault true;
    };

    users.defaultUserShell = pkgs.zsh;

    # Enable flakes and new 'nix' command
    nix.settings.experimental-features = "nix-command flakes";

    networking.firewall.enable = true;

    environment = {
      defaultPackages = [];
      systemPackages = (with self.packages.${pkgs.stdenv.hostPlatform.system}; [
        nvim-pager
      ]);
      variables = {
        PAGER = with self.packages.${pkgs.stdenv.hostPlatform.system}; "${nvim-pager}/bin/pager";
      };
    };

    system.stateVersion = "25.05";
  };
}
