nixos/sheep-net: init

This commit is contained in:
matthewcroughan 2025-07-15 19:16:41 +01:00
parent 3721085248
commit 9783bde2f4
2 changed files with 36 additions and 0 deletions

View File

@ -0,0 +1,35 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.hardware.sheep_net;
in
{
options.hardware.sheep_net = {
enable = lib.mkOption {
type = lib.types.bool;
default = false;
description = ''
Enables sheep_net udev rules, ensures 'sheep_net' group exists, and adds
sheep-net to boot.kernelModules and boot.extraModulePackages
'';
};
};
config = lib.mkIf cfg.enable {
services.udev.extraRules = ''
KERNEL=="sheep_net", GROUP="sheep_net"
'';
boot.kernelModules = [
"sheep_net"
];
boot.extraModulePackages = [
config.boot.kernelPackages.sheep-net
];
users.groups.sheep_net = { };
};
meta.maintainers = with lib.maintainers; [ matthewcroughan ];
}

View File

@ -103,6 +103,7 @@
./hardware/sata.nix
./hardware/sensor/hddtemp.nix
./hardware/sensor/iio.nix
./hardware/sheep-net.nix
./hardware/steam-hardware.nix
./hardware/system-76.nix
./hardware/tuxedo-drivers.nix