mirror of
https://github.com/nickolaj-jepsen/nixos.git
synced 2026-01-22 08:06:50 +01:00
chore: simplify primary name statement
This commit is contained in:
parent
2466b1bd41
commit
ec9ad1e019
2 changed files with 3 additions and 11 deletions
|
|
@ -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 "";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue