{ config, pkgs, host, lib, inputs, userconf, ... }:

let
  username = "YOUR_USER";
  nixDirectory = "/home/${username}/NixOS";
in {
  ################################################################
  # Module Imports
  ################################################################

  imports = [
    # Host-specific hardware configuration (autogenerated)
    ./hardware-configuration.nix

    # Nyx
    inputs.nyx.nixosModules.default

    # Other imports:
    # ......
  ];

  ################################################################
  # Nyx Tools Configuration
  ################################################################
  nyx = {
    # Global settings
    enable       = true;
    username     = username;
    nixDirectory = nixDirectory;
    logDir       = "/home/${username}/.nyx/logs";
    autoPush     = false;

    # Tool-specific settings
    nyx-rebuild = {
      enable           = true;
      formatter        = "alejandra";
      enableFormatting = false;
      editor           = "nvim";
      startEditor      = false;
      enableAlias      = false;
    };

    nyx-cleanup = {
      enable          = true;
      keepGenerations = 5;
      enableAlias     = false;
    };
    nyx-tui = {
      enable          = true;
      enableAlias     = false;
    };
    nyx-tool = {
      enable = true;  # must be enabled for others
    };
  };

  ################################################################
  # Home Manager Configuration
  ################################################################

# you don't need this but i recommend using Homemanager:
# home-manager = {
#   useGlobalPkgs = true;
#   useUserPackages = true;
#   backupFileExtension = "delme-HMbackup"; 
#   # Please use this backup File Extension to ensure that the bug won't cause any problems
#   # nyx-rebuild deletes the backups on each rebuild before rebuilding
#   # HM Bug: https://discourse.nixos.org/t/nixos-rebuild-fails-on-backup-up-config-file-by-home-manager/45992
#   users.${username} = import ./home.nix;
# 
#   extraSpecialArgs = {
#     inherit inputs nixDirectory username;
#   };
# };
  ################################################################
  # System Version
  ################################################################

  system.stateVersion = "25.05";

  # ... Add more
}
