{ pkgs , config , lib , ... }: with lib; let cfg = config.eboskma.base; qmkUdevRules = pkgs.callPackage ./qmk { inherit (pkgs.stdenv) mkDerivation; inherit lib; }; probersRules = pkgs.callPackage ./probe-rs { inherit (pkgs.stdenv) mkDerivation; inherit lib; }; blink1Rules = pkgs.callPackage ./blink1-udev { inherit (pkgs.stdenv) mkDerivation; inherit lib; }; picotoolRules = pkgs.callPackage ./picotool { inherit (pkgs.stdenv) mkDerivation; inherit lib; }; solo2Rules = pkgs.callPackage ./solo2 { inherit (pkgs.stdenv) mkDerivation; inherit lib; }; plymouth-nixos-blur = pkgs.callPackage ./plymouth-nixos-blur { inherit (pkgs.stdenv) mkDerivation; inherit lib; }; in { options.eboskma.base = { kernel = mkOption { description = "which kernel to run"; type = types.unspecified; default = pkgs.linuxPackages; }; plymouth = { enable = mkEnableOption "plymouth splash screen"; }; work = mkOption { description = "whether this is a work machine."; type = types.bool; default = false; }; udev-rules = { qmk = mkEnableOption "qmk udev rules"; probe-rs = mkEnableOption "probe.rs udev rules"; blink1 = mkEnableOption "blink(1) udev rules"; picotool = mkEnableOption "picotool udev rules"; solo2 = mkEnableOption "solo2 udev rules"; }; }; config = { boot.kernelPackages = cfg.kernel; boot.plymouth = mkIf cfg.plymouth.enable { enable = true; themePackages = [ plymouth-nixos-blur ]; theme = "nixos-blur"; }; hardware.opengl.enable = true; programs.fish.enable = true; environment.systemPackages = with pkgs; [ clinfo dig dogdns du-dust file hexyl jq lm_sensors moreutils nix-template nvd usbutils xh zip ]; services.udev = { packages = [ ] ++ (optional cfg.udev-rules.qmk qmkUdevRules) ++ (optional cfg.udev-rules.probe-rs probersRules) ++ (optional cfg.udev-rules.blink1 blink1Rules) ++ (optional cfg.udev-rules.picotool picotoolRules) ++ (optional cfg.udev-rules.solo2 solo2Rules); }; services.nscd.enableNsncd = true; }; }