nixos-config/modules/base/default.nix

75 lines
1.4 KiB
Nix

{ pkgs
, config
, lib
, ...
}:
with lib; let
cfg = config.eboskma.base;
qmkUdevRules = builtins.readFile ./qmk.rules;
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;
};
in
{
options.eboskma.base = {
kernel = mkOption {
description = "which kernel to run";
type = types.unspecified;
default = pkgs.linuxPackages;
};
plymouth = {
enable = mkEnableOption "enable plymouth splash screen";
};
work = mkOption {
description = "whether this is a work machine.";
type = types.bool;
default = false;
};
};
config = {
boot.kernelPackages = cfg.kernel;
boot.plymouth = mkIf cfg.plymouth.enable {
enable = true;
};
hardware.opengl.enable = true;
programs.fish.enable = true;
environment.systemPackages = with pkgs; [
clinfo
dig
dogdns
file
ht-rust
jq
lm_sensors
nix-template
nvd
usbutils
zip
];
services.udev = {
extraRules = qmkUdevRules;
packages = [
probersRules
blink1Rules
picotoolRules
];
};
};
}