1{ pkgs, ... }:
2
3{
4 name = "scx_full";
5 meta = {
6 inherit (pkgs.scx.full.meta) maintainers;
7 };
8
9 nodes.machine = {
10 boot.kernelPackages = pkgs.linuxPackages_latest;
11 services.scx.enable = true;
12
13 specialisation = {
14 bpfland.configuration.services.scx.scheduler = "scx_bpfland";
15 cosmos.configuration.services.scx.scheduler = "scx_cosmos";
16 flash.configuration.services.scx.scheduler = "scx_flash";
17 flatcg.configuration.services.scx.scheduler = "scx_flatcg";
18 lavd.configuration.services.scx.scheduler = "scx_lavd";
19 nest.configuration.services.scx.scheduler = "scx_nest";
20 p2dq.configuration.services.scx.scheduler = "scx_p2dq";
21 rlfifo.configuration.services.scx.scheduler = "scx_rlfifo";
22 rustland.configuration.services.scx.scheduler = "scx_rustland";
23 rusty.configuration.services.scx.scheduler = "scx_rusty";
24 simple.configuration.services.scx.scheduler = "scx_simple";
25 };
26 };
27
28 testScript = ''
29 specialisation = [
30 "bpfland",
31 "cosmos",
32 "flash",
33 "flatcg",
34 "lavd",
35 "nest",
36 "p2dq",
37 "rlfifo",
38 "rustland",
39 "rusty",
40 "simple"
41 ]
42
43 def activate_specialisation(name: str):
44 machine.succeed(f"/run/booted-system/specialisation/{name}/bin/switch-to-configuration test >&2")
45
46 for sched in specialisation:
47 with subtest(f"{sched}"):
48 activate_specialisation(sched)
49 machine.succeed("systemctl restart scx.service")
50 machine.succeed(f"ps -U root -u root u | grep scx_{sched}")
51 '';
52}