sheep_net: init (#423744)
This commit is contained in:
commit
ca573e60c6
34
nixos/modules/hardware/sheep-net.nix
Normal file
34
nixos/modules/hardware/sheep-net.nix
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
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 ];
|
||||||
|
}
|
@ -104,6 +104,7 @@
|
|||||||
./hardware/sata.nix
|
./hardware/sata.nix
|
||||||
./hardware/sensor/hddtemp.nix
|
./hardware/sensor/hddtemp.nix
|
||||||
./hardware/sensor/iio.nix
|
./hardware/sensor/iio.nix
|
||||||
|
./hardware/sheep-net.nix
|
||||||
./hardware/steam-hardware.nix
|
./hardware/steam-hardware.nix
|
||||||
./hardware/system-76.nix
|
./hardware/system-76.nix
|
||||||
./hardware/tuxedo-drivers.nix
|
./hardware/tuxedo-drivers.nix
|
||||||
|
@ -11,13 +11,15 @@
|
|||||||
}:
|
}:
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "basiliskii";
|
pname = "basiliskii";
|
||||||
version = "unstable-2022-09-30";
|
version = "unstable-2025-07-16";
|
||||||
|
|
||||||
|
# This src is also used to build pkgs/os-specific/linux/sheep-net
|
||||||
|
# Therefore changes to it may effect the sheep-net package
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "kanjitalk755";
|
owner = "kanjitalk755";
|
||||||
repo = "macemu";
|
repo = "macemu";
|
||||||
rev = "2fa17a0783cf36ae60b77b5ed930cda4dc1824af";
|
rev = "030599cf8d31cb80afae0e1b086b5706dbdd2eea";
|
||||||
sha256 = "+jkns6H2YjlewbUzgoteGSQYWJL+OWVu178aM+BtABM=";
|
sha256 = "sha256-gxaj+2ymelH6uWmjMLXi64xMNrToo6HZcJ7RW7sVMzo=";
|
||||||
};
|
};
|
||||||
sourceRoot = "${finalAttrs.src.name}/BasiliskII/src/Unix";
|
sourceRoot = "${finalAttrs.src.name}/BasiliskII/src/Unix";
|
||||||
patches = [ ./remove-redhat-6-workaround-for-scsi-sg.h.patch ];
|
patches = [ ./remove-redhat-6-workaround-for-scsi-sg.h.patch ];
|
||||||
|
31
pkgs/os-specific/linux/sheep-net/default.nix
Normal file
31
pkgs/os-specific/linux/sheep-net/default.nix
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
{
|
||||||
|
kernel,
|
||||||
|
kernelModuleMakeFlags,
|
||||||
|
stdenv,
|
||||||
|
basiliskii,
|
||||||
|
lib,
|
||||||
|
}:
|
||||||
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
|
name = "sheep_net";
|
||||||
|
version = basiliskii.version;
|
||||||
|
src = basiliskii.src;
|
||||||
|
sourceRoot = "${finalAttrs.src.name}/BasiliskII/src/Unix/Linux/NetDriver";
|
||||||
|
|
||||||
|
nativeBuildInputs = kernel.moduleBuildDependencies;
|
||||||
|
makeFlags = kernelModuleMakeFlags ++ [
|
||||||
|
"KERNEL_DIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}"
|
||||||
|
];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
mkdir -p $out/lib/modules/${kernel.modDirVersion}/drivers/net
|
||||||
|
install -Dm444 sheep_net.ko $out/lib/modules/${kernel.modDirVersion}/drivers/net/sheep_net.ko
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
license = lib.licenses.gpl2Only;
|
||||||
|
maintainers = with lib.maintainers; [ matthewcroughan ];
|
||||||
|
platforms = lib.platforms.linux;
|
||||||
|
};
|
||||||
|
})
|
@ -593,6 +593,8 @@ in
|
|||||||
|
|
||||||
rr-zen_workaround = callPackage ../development/tools/analysis/rr/zen_workaround.nix { };
|
rr-zen_workaround = callPackage ../development/tools/analysis/rr/zen_workaround.nix { };
|
||||||
|
|
||||||
|
sheep-net = callPackage ../os-specific/linux/sheep-net { };
|
||||||
|
|
||||||
shufflecake = callPackage ../os-specific/linux/shufflecake { };
|
shufflecake = callPackage ../os-specific/linux/shufflecake { };
|
||||||
|
|
||||||
sysdig = callPackage ../os-specific/linux/sysdig { };
|
sysdig = callPackage ../os-specific/linux/sysdig { };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user