chore: simplify primary name statement

This commit is contained in:
Nickolaj Jepsen 2025-02-25 22:58:44 +01:00
parent 2466b1bd41
commit ec9ad1e019
2 changed files with 3 additions and 11 deletions

View file

@ -3,18 +3,13 @@
inputs, inputs,
pkgs, pkgs,
... ...
}: let }: {
primaryMonitorName =
if builtins.length config.monitors > 0
then (builtins.elemAt config.monitors 0).name
else "";
in {
environment.systemPackages = [ environment.systemPackages = [
inputs.fireproof-shell.packages.${pkgs.system}.fireproof-shell inputs.fireproof-shell.packages.${pkgs.system}.fireproof-shell
]; ];
programs.fireproof-shell = { programs.fireproof-shell = {
enable = true; enable = true;
systemd = true; systemd = true;
monitor.primary = primaryMonitorName; monitor.primary = (builtins.head config.monitors).name or "";
}; };
} }

View file

@ -7,10 +7,7 @@
}: }:
with lib; let with lib; let
cfg = config.fireproof; cfg = config.fireproof;
primaryMonitorName = primaryMonitorName = (builtins.head config.monitors).name or "";
if builtins.length config.monitors > 0
then (builtins.elemAt config.monitors 0).name
else "";
hyprPkgs = { hyprPkgs = {
inherit (inputs.hyprland.packages.${pkgs.system}) hyprland; inherit (inputs.hyprland.packages.${pkgs.system}) hyprland;