some scx shenanigans

This commit is contained in:
cnst
2024-11-04 19:02:01 +01:00
parent 0f497bb437
commit 1ee5fd627e
13 changed files with 154 additions and 158 deletions

View File

@@ -95,6 +95,7 @@
./nixos/services/pipewire
./nixos/services/powerd
./nixos/services/samba
./nixos/services/scx
./nixos/services/udisks
./nixos/services/xserver
./nixos/services/zram

View File

@@ -35,7 +35,10 @@ in {
normal = "block";
select = "underline";
};
indent-guides.render = true;
indent-guides = {
render = true;
character = "";
};
inline-diagnostics = {
cursor-line = "hint";
other-lines = "error";
@@ -46,7 +49,7 @@ in {
};
gutters = ["diagnostics" "line-numbers" "spacer" "diff"];
statusline = {
separator = "of";
separator = "/";
left = [
"mode"
"selections"
@@ -59,8 +62,7 @@ in {
right = [
"file-encoding"
"file-line-ending"
"position-percentage"
"spacer"
"position"
"separator"
"total-line-numbers"
];

View File

@@ -60,7 +60,7 @@
name = "nix";
auto-format = true;
file-types = ["nix"];
language-servers = ["nil"];
language-servers = ["nixd"];
formatter = {
command = lib.getExe pkgs.alejandra;
args = ["-q"];
@@ -115,11 +115,6 @@
++ prettierLangs langs;
language-server = {
gpt = {
command = "helix-gpt";
args = ["--copilotApiKey" "cat /run/agenix/helix-gpt"];
};
bash-language-server = {
command = lib.getExe pkgs.bash-language-server;
args = ["start"];
@@ -170,6 +165,10 @@
command = lib.getExe pkgs.nil;
};
nixd = {
command = lib.getExe pkgs.nixd;
};
pyright = {
command = "${pkgs.pyright}/bin/pyright-langserver";
args = ["--stdio"];

View File

@@ -22,6 +22,7 @@ in {
# a monitor of resources
btop = {
enable = true;
package = pkgs.btop.override {rocmSupport = true;};
settings = {
color_theme = "gruvbox_material_dark";
};

View File

@@ -71,11 +71,8 @@ in {
++ cfg.extraBlacklistedModules;
};
chaotic = mkIf (cfg.variant == "cachyos") {
scx = {
enable = true;
scheduler = "scx_lavd";
};
};
# chaotic = mkIf (cfg.variant == "cachyos") {
# environment.systemPackages = [pkgs.scx.lavd];
# };
};
}

View File

@@ -50,6 +50,7 @@ in {
vulkan-tools
wayland
wayland-protocols
rocmPackages.rocm-smi
];
})
@@ -92,6 +93,8 @@ in {
vulkanPackages_latest.spirv-cross
wayland-protocols_git
wayland_git
scx.lavd
rocmPackages.rocm-smi
];
})
]);

View File

@@ -28,6 +28,7 @@ in {
pkgs.protonup
pkgs.winetricks
pkgs.wine
pkgs.geekbench
])
];
};

View File

@@ -12,11 +12,11 @@ in {
};
config = mkIf cfg.enable {
environment.systemPackages = [
pkgs.yubioath-flutter
pkgs.yubikey-manager
# pkgs.yubioath-flutter
# pkgs.yubikey-manager
pkgs.yubikey-personalization
pkgs.yubikey-personalization-gui
pkgs.pcsc-tools
# pkgs.pcsc-tools
];
};
}

View File

@@ -0,0 +1,42 @@
{
config,
lib,
...
}: let
inherit (lib) mkIf mkEnableOption mkOption types;
cfg = config.nixos.services.scx;
in {
options = {
nixos.services.scx = {
enable = mkEnableOption "Enables scx scheduler";
scheduler = mkOption {
type = types.enum ["scx_lavd" "scx_rusty" "scx_bpfland"];
description = "Selects the scheduler for scx";
default = "scx_lavd";
};
flags = mkOption {
type = types.str;
description = "Custom flags to be passed to scx scheduler";
default = "";
};
};
};
config = mkIf cfg.enable {
systemd.services.scx = {
enable = true;
wantedBy = ["graphical.target"];
unitConfig = {
Description = "Start scx_scheduler";
ConditionPathIsDirectory = "/sys/kernel/sched_ext";
StartLimitIntervalSec = 30;
StartLimitBurst = 2;
};
serviceConfig = {
Type = "simple";
Restart = "on-failure";
StandardError = "journal";
ExecStart = "/bin/sh -c 'exec /run/current-system/sw/bin/${cfg.scheduler} ${cfg.flags} '";
};
};
};
}

View File

@@ -26,7 +26,7 @@ in {
nixd
php
# php84Packages.php-cs-fixer
phpactor
# phpactor
python312Packages.python-lsp-server
bash-language-server
nil