Files

75 lines
2.1 KiB
Nix
Raw Permalink Normal View History

2026-03-09 23:04:47 +00:00
{ pkgs, hostname, ... }:
2026-03-09 20:27:18 +00:00
2026-03-12 23:38:13 +00:00
let
# Found by running sudo btrfs inspect-internal map-swapfile -r /.swapvol/swapfile
hibernateBootOffsets = {
stationette = "533760";
station = "533760";
};
resumeOffset = hibernateBootOffsets."${hostname}" or "0";
in
2026-03-09 20:27:18 +00:00
{
boot = {
loader = {
limine = {
enable = true;
extraConfig = ''
timeout: 3
default_entry: 2
interface_branding: Station Bootloader
interface_branding_color: 2
hash_mismatch_panic: no
term_background: 1a1b26
backdrop: 1a1b26
# Tokyo Night palette
term_palette: 15161e;f7768e;9ece6a;e0af68;7aa2f7;bb9af7;7dcfff;a9b1d6
term_palette_bright: 414868;f7768e;9ece6a;e0af68;7aa2f7;bb9af7;7dcfff;c0caf5
term_foreground: c0caf5
term_foreground_bright: c0caf5
term_background_bright: 24283b
'';
};
efi.canTouchEfiVariables = true;
2026-03-12 23:38:13 +00:00
# timeout = 0; # Skips the menu and uses default entry
2026-03-09 20:27:18 +00:00
};
2026-03-12 23:38:13 +00:00
# Creates a cool animation for booting
2026-03-09 20:27:18 +00:00
plymouth = {
enable = true;
theme = "black_hud";
themePackages = with pkgs; [
(adi1090x-plymouth-themes.override {
2026-03-12 23:38:13 +00:00
selected_themes = [ "black_hud" ];
})
2026-03-09 20:27:18 +00:00
];
};
initrd.verbose = false;
kernelParams = [
2026-03-13 19:14:07 +00:00
"resume_offset=${resumeOffset}"
2026-03-09 20:27:18 +00:00
"quiet"
"udev.log_level=3"
"systemd.show_status=auto"
"splash"
];
bootspec.enable = true;
2026-03-09 23:04:47 +00:00
resumeDevice = "/dev/disk/by-partlabel/disk-${hostname}-root";
2026-03-24 20:39:25 +00:00
kernel.sysctl = {
"net.ipv4.ip_unprivileged_port_start" = 0;
};
2026-03-09 20:27:18 +00:00
};
2026-03-09 21:43:40 +00:00
systemd = {
settings = {
Manager = {
DefaultTimeoutStopSec = "5s";
};
};
};
2026-03-09 20:27:18 +00:00
}