diff --git a/modules/capabilities/limine.nix b/modules/capabilities/limine.nix new file mode 100644 index 0000000..c2d06aa --- /dev/null +++ b/modules/capabilities/limine.nix @@ -0,0 +1,75 @@ +{ config, lib, ... }: +let + palette = config.repo.theme.kanagawa.palette; + hex = lib.removePrefix "#"; + terminalPalette = palette.terminal; + mkPalette = colors: lib.concatStringsSep ";" (map hex colors); +in +{ + flake.modules.nixos.limine = + { config, lib, ... }: + let + displayValues = builtins.attrValues (config.facts.machine.displays or { }); + primaryDisplays = lib.filter (display: display.primary or false) displayValues; + primaryDisplay = if primaryDisplays == [ ] then null else builtins.head primaryDisplays; + interfaceResolution = + if primaryDisplay != null && primaryDisplay ? width && primaryDisplay ? height then + "${toString primaryDisplay.width}x${toString primaryDisplay.height}" + else + null; + in + { + boot.loader = { + efi.canTouchEfiVariables = true; + limine = { + enable = true; + maxGenerations = 10; + resolution = "2560x1440"; + + style = { + backdrop = hex palette.secondaryBackground; + + graphicalTerminal = { + background = "00${hex palette.background}"; + foreground = hex palette.foreground; + brightForeground = hex palette.selectionForeground; + brightBackground = hex palette.selectionBackground; + palette = mkPalette [ + terminalPalette.color0 + terminalPalette.color1 + terminalPalette.color2 + terminalPalette.color3 + terminalPalette.color4 + terminalPalette.color5 + terminalPalette.color6 + terminalPalette.color7 + ]; + brightPalette = mkPalette [ + terminalPalette.color8 + terminalPalette.color9 + terminalPalette.color10 + terminalPalette.color11 + terminalPalette.color12 + terminalPalette.color13 + terminalPalette.color14 + terminalPalette.color15 + ]; + font = { + scale = "2x2"; + spacing = 1; + }; + margin = 64; + marginGradient = 24; + }; + + interface = { + branding = config.networking.hostName; + brandingColor = hex palette.accents.blue; + helpHidden = false; + resolution = interfaceResolution; + }; + }; + }; + }; + }; +} diff --git a/modules/profiles/workstation-base.nix b/modules/profiles/workstation-base.nix index 18b4599..c9ab255 100644 --- a/modules/profiles/workstation-base.nix +++ b/modules/profiles/workstation-base.nix @@ -20,7 +20,7 @@ in nixosModules.printing nixosModules.sddm nixosModules.sops-admin-key-file - nixosModules.systemd-boot + nixosModules.limine nixosModules.theme nixosModules.ai nixosModules.hidraw-access