{
  pkgs,
  config,
  lib,
  ...
}:
with lib;
let
  cfg = config.eboskma.base;
  blink1Rules = pkgs.callPackage ./blink1-udev { };
  nvidiaRules = pkgs.callPackage ./nvidia { };
  picotoolRules = pkgs.callPackage ./picotool { };
  probersRules = pkgs.callPackage ./probe-rs { };
  qmkUdevRules = pkgs.callPackage ./qmk { };
  solo2Rules = pkgs.callPackage ./solo2 { };
  plymouth-nixos-blur = pkgs.callPackage ./plymouth-nixos-blur { };
in
{
  options.eboskma.base = {
    plymouth = {
      enable = mkEnableOption "plymouth splash screen";
    };

    work = mkOption {
      description = "whether this is a work machine.";
      type = types.bool;
      default = false;
    };

    udev-rules = {
      blink1 = mkEnableOption "blink(1) udev rules";
      nvidia = mkEnableOption "NVIDIA Tegra udev rules";
      picotool = mkEnableOption "picotool udev rules";
      probe-rs = mkEnableOption "probe.rs udev rules";
      qmk = mkEnableOption "qmk udev rules";
      solo2 = mkEnableOption "solo2 udev rules";
    };
  };

  config = {
    boot.plymouth = mkIf cfg.plymouth.enable {
      enable = true;
      themePackages = [ plymouth-nixos-blur ];
      theme = "nixos-blur";
    };

    hardware.graphics.enable = true;

    environment.systemPackages =
      with pkgs;
      [
        btop
        clinfo
        config.boot.kernelPackages.cpupower
        dig
        du-dust
        file
        hexyl
        jaq
        lm_sensors
        man-pages
        man-pages-posix
        moreutils
        nix-template
        nvd
        pigz
        s-tui
        stress
        usbutils
        xh
        zip
      ]
      ++ (lib.optionals (pkgs.system == "x86_64-linux") [
        rar
        unrar
      ]);

    documentation.dev.enable = true;

    i18n = {
      extraLocaleSettings = {
        LC_TIME = "nl_NL.UTF-8";
      };
    };

    services.udev = {
      packages =
        (optional cfg.udev-rules.blink1 blink1Rules)
        ++ (optional cfg.udev-rules.nvidia nvidiaRules)
        ++ (optional cfg.udev-rules.picotool picotoolRules)
        ++ (optional cfg.udev-rules.probe-rs probersRules)
        ++ (optional cfg.udev-rules.qmk qmkUdevRules)
        ++ (optional cfg.udev-rules.solo2 solo2Rules);
    };

    services.nscd.enableNsncd = true;
  };
}