Remove Plymouth, add quiet boot params, add cpu-performance module
Agent-Logs-Url: https://github.com/naturallaw777/staging_alpha/sessions/eda71495-cd38-4408-8d3b-b9d793f6445f Co-authored-by: naturallaw777 <99053422+naturallaw777@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
569e0de59d
commit
c23ae5543d
+1
-1
@@ -3,7 +3,6 @@
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./modules/modules.nix
|
./modules/modules.nix
|
||||||
./iso/branding.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# ── Boot ────────────────────────────────────────────────────
|
# ── Boot ────────────────────────────────────────────────────
|
||||||
@@ -11,6 +10,7 @@
|
|||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
||||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
boot.kernelParams = [ "quiet" "loglevel=3" "rd.systemd.show_status=false" "udev.log_level=3" ];
|
||||||
|
|
||||||
# ── Filesystems ─────────────────────────────────────────────
|
# ── Filesystems ─────────────────────────────────────────────
|
||||||
fileSystems."/run/media/Second_Drive" = {
|
fileSystems."/run/media/Second_Drive" = {
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
theme = pkgs.callPackage ./plymouth-theme.nix {};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
boot.plymouth.enable = true;
|
|
||||||
boot.plymouth.theme = "sovran";
|
|
||||||
boot.plymouth.themePackages = [ theme ];
|
|
||||||
boot.kernelParams = [ "quiet" "splash" ];
|
|
||||||
boot.initrd.systemd.enable = true;
|
|
||||||
}
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
{ pkgs, lib }:
|
|
||||||
|
|
||||||
pkgs.stdenv.mkDerivation {
|
|
||||||
pname = "sovran-plymouth-theme";
|
|
||||||
version = "1.0";
|
|
||||||
|
|
||||||
src = ./.;
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out/share/plymouth/themes/sovran
|
|
||||||
cp ${./assets/splash-logo.png} $out/share/plymouth/themes/sovran/logo.png
|
|
||||||
|
|
||||||
cat > $out/share/plymouth/themes/sovran/sovran.plymouth <<EOF
|
|
||||||
[Plymouth Theme]
|
|
||||||
Name=Sovran Systems
|
|
||||||
Description=Sovran Systems Splash
|
|
||||||
ModuleName=script
|
|
||||||
|
|
||||||
[script]
|
|
||||||
ImageDir=$out/share/plymouth/themes/sovran
|
|
||||||
ScriptFile=$out/share/plymouth/themes/sovran/sovran.script
|
|
||||||
EOF
|
|
||||||
|
|
||||||
cat > $out/share/plymouth/themes/sovran/sovran.script <<'EOF'
|
|
||||||
# Background color: #CFFFD7 (RGB 207,255,215)
|
|
||||||
bg_r = 207/255.0
|
|
||||||
bg_g = 255/255.0
|
|
||||||
bg_b = 215/255.0
|
|
||||||
|
|
||||||
Window.SetBackgroundTopColor (bg_r, bg_g, bg_b);
|
|
||||||
Window.SetBackgroundBottomColor (bg_r, bg_g, bg_b);
|
|
||||||
|
|
||||||
logo = Image("logo.png");
|
|
||||||
logo_sprite = Sprite(logo);
|
|
||||||
logo_sprite.SetX((Window.GetWidth() - logo.GetWidth()) / 2);
|
|
||||||
logo_sprite.SetY((Window.GetHeight() - logo.GetHeight()) / 2);
|
|
||||||
EOF
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
# ── modules/core/cpu-performance.nix ──────────────────────────────────────────
|
||||||
|
# Forces all CPU cores to run at maximum frequency on node and server_plus_desktop
|
||||||
|
# roles. Desktop-only installs retain normal OS power management behaviour.
|
||||||
|
#
|
||||||
|
# Three layers:
|
||||||
|
# 1. power-profiles-daemon disabled — removes the GNOME power profile picker;
|
||||||
|
# no user can switch profiles
|
||||||
|
# 2. cpufreq performance governor — pins every core to max frequency via
|
||||||
|
# kernel, enforced at boot by a oneshot unit
|
||||||
|
# 3. systemd oneshot enforcement — belt-and-suspenders; applies the governor
|
||||||
|
# after every boot even if module loads late
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
config = lib.mkIf (!config.sovran_systemsOS.roles.desktop) {
|
||||||
|
|
||||||
|
# ── Layer 1: disable power-profiles-daemon ───────────────────────────────
|
||||||
|
# This removes the power-profile switcher from GNOME Settings entirely.
|
||||||
|
services.power-profiles-daemon.enable = false;
|
||||||
|
|
||||||
|
# ── Layer 2: set cpufreq governor to performance ─────────────────────────
|
||||||
|
# Pins all cores to max frequency. Works on Intel (intel_pstate) and AMD
|
||||||
|
# (amd-pstate / acpi-cpufreq) alike.
|
||||||
|
powerManagement.cpuFreqGovernor = "performance";
|
||||||
|
|
||||||
|
# ── Layer 3: enforce at boot via systemd oneshot ─────────────────────────
|
||||||
|
# Belt-and-suspenders: ensures the governor is applied after every boot even
|
||||||
|
# if the kernel module loads late.
|
||||||
|
systemd.services.cpu-performance = {
|
||||||
|
description = "Set CPU governor to performance on all cores";
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
after = [ "systemd-modules-load.service" ];
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
RemainAfterExit = true;
|
||||||
|
};
|
||||||
|
script = ''
|
||||||
|
found=0
|
||||||
|
for gov in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do
|
||||||
|
if [ -w "$gov" ]; then
|
||||||
|
echo performance > "$gov"
|
||||||
|
found=1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if [ "$found" -eq 0 ]; then
|
||||||
|
echo "cpu-performance: no writable cpufreq governors found (VM or unsupported hardware)" >&2
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -15,6 +15,7 @@
|
|||||||
./core/legacy-cleanup.nix
|
./core/legacy-cleanup.nix
|
||||||
./core/remote-deploy.nix
|
./core/remote-deploy.nix
|
||||||
./core/no-sleep.nix
|
./core/no-sleep.nix
|
||||||
|
./core/cpu-performance.nix
|
||||||
|
|
||||||
# ── Always on (no flag) ───────────────────────────────────
|
# ── Always on (no flag) ───────────────────────────────────
|
||||||
./php.nix
|
./php.nix
|
||||||
|
|||||||
Reference in New Issue
Block a user