72 lines
2.0 KiB
Nix
72 lines
2.0 KiB
Nix
{ 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"
|
|
];
|
|
bootspec.enable = true;
|
|
resumeDevice = "/dev/disk/by-partlabel/disk-${hostname}-root";
|
|
};
|
|
|
|
systemd = {
|
|
settings = {
|
|
Manager = {
|
|
DefaultTimeoutStopSec = "5s";
|
|
};
|
|
};
|
|
};
|
|
}
|
|
|