{ pkgs, hostname, ... }: let # Found by running sudo btrfs inspect-internal map-swapfile -r /.swapvol/swapfile hibernateBootOffsets = { stationette = "533760"; station = "533760"; }; resumeOffset = hibernateBootOffsets."${hostname}" or "0"; in { 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; # timeout = 0; # Skips the menu and uses default entry }; # Creates a cool animation for booting plymouth = { enable = true; theme = "black_hud"; themePackages = with pkgs; [ (adi1090x-plymouth-themes.override { selected_themes = [ "black_hud" ]; }) ]; }; initrd.verbose = false; kernelParams = [ "resume_offset=${resumeOffset}" "quiet" "udev.log_level=3" "systemd.show_status=auto" "splash" "video=DP-1:3840x2160@60" "video=DP-2:3840x2160@60" "pcie_aspm=off" "amdgpu.runpm=0" ]; resumeDevice = "/dev/disk/by-partlabel/disk-${hostname}-root"; kernel.sysctl = { "net.ipv4.ip_unprivileged_port_start" = 0; }; }; systemd = { settings = { Manager = { DefaultTimeoutStopSec = "5s"; }; }; services.systemd-suspend.environment.SYSTEMD_SLEEP_FREEZE_USER_SESSIONS = "false"; services.systemd-hibernate.environment.SYSTEMD_SLEEP_FREEZE_USER_SESSIONS = "false"; services.systemd-suspend-then-hibernate.environment.SYSTEMD_SLEEP_FREEZE_USER_SESSIONS = "false"; }; }