users/infinidoge: function for optional graphic programs

This commit is contained in:
Infinidoge 2021-11-10 09:50:10 -05:00
parent eb8b237b6f
commit ecce13882d

View file

@ -1,4 +1,9 @@
{ config, self, lib, pkgs, suites, profiles, inputs, ... }: { { config, self, lib, pkgs, suites, profiles, inputs, ... }:
let
ifGraphical = lib.optionals config.services.xserver.enable;
ifGraphical' = lib.optional config.services.xserver.enable;
in
{
imports = lib.flatten [ imports = lib.flatten [
(with suites; [ develop ]) (with suites; [ develop ])
@ -10,12 +15,12 @@
(with suites; [ (with suites; [
base base
(lib.optional main.services.xserver.enable graphic) (ifGraphical' graphic)
]) ])
(with profiles; [ (with profiles; [
pass pass
(lib.optionals main.services.xserver.enable [ (ifGraphical [
discord discord
gaming gaming
]) ])
@ -49,7 +54,7 @@
btrfs-progs btrfs-progs
ncdu ncdu
(lib.optionals main.services.xserver.enable [ (ifGraphical [
hydrus hydrus
speedcrunch speedcrunch