From 8199f48cd1347019f385cef99bd65570351189b3 Mon Sep 17 00:00:00 2001 From: Melvin Ragusa Date: Fri, 6 Feb 2026 22:39:00 +0100 Subject: [PATCH] replace kernel with cachyos-server for server config --- hosts/server/configuration.nix | 6 ++++- modules/core/boot_server.nix | 45 ++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 modules/core/boot_server.nix diff --git a/hosts/server/configuration.nix b/hosts/server/configuration.nix index 5a368de..7612e75 100644 --- a/hosts/server/configuration.nix +++ b/hosts/server/configuration.nix @@ -12,7 +12,11 @@ { imports = [ ./hardware-configuration.nix - ../../modules/core + ../../modules/core/boot_server.nix + ../../modules/core/localization.nix + ../../modules/core/networking.nix + ../../modules/core/system.nix + ../../modules/core/users.nix ../../modules/hardware/audio.nix ../../modules/hardware/storage.nix ../../modules/hardware/power.nix diff --git a/modules/core/boot_server.nix b/modules/core/boot_server.nix new file mode 100644 index 0000000..4f86fc1 --- /dev/null +++ b/modules/core/boot_server.nix @@ -0,0 +1,45 @@ +# modules/core/boot.nix +# Bootloader, kernel, and boot-time configuration +{ + config, + pkgs, + lib, + ... +}: + +{ + boot.loader.systemd-boot.enable = false; + boot.loader.limine = { + enable = true; + style.wallpapers = [ ../../wallpaper/nix.png ]; + maxGenerations = 5; + }; + boot.loader.limine.secureBoot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + boot.kernelPackages = pkgs.cachyosKernels.linuxPackages-cachyos-server; + + boot.kernelParams = [ + "amd_pstate=active" + "amdgpu.ppfeaturemask=0xffffffff" + "quiet" + "splash" + "loglevel=3" + "rd.udev.log_level=3" + "systemd.show_status=auto" + "vt.global_cursor_default=0" + ]; + + boot.consoleLogLevel = 3; + boot.resumeDevice = "/dev/mapper/cryptswap"; + + boot.initrd.systemd.enable = true; + boot.plymouth = { + enable = true; + theme = "nixos-bgrt"; + themePackages = [ pkgs.nixos-bgrt-plymouth ]; + }; + + services.scx.enable = true; + services.scx.scheduler = "scx_lavd"; +}