nixos-config/modules/base/default.nix
Erwin Boskma 1bd05aaa4f
Some checks failed
/ check (push) Failing after 19m14s
base(probe-rs): Get udev rules from GitHub
2024-02-05 12:36:00 +01:00

111 lines
2.4 KiB
Nix

{
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 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 = {
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.plymouth = mkIf cfg.plymouth.enable {
enable = true;
themePackages = [ plymouth-nixos-blur ];
theme = "nixos-blur";
};
hardware.opengl.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.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;
};
}