diff --git a/modules/info.nix b/modules/info.nix index 88d2037..6b2e32a 100644 --- a/modules/info.nix +++ b/modules/info.nix @@ -6,5 +6,15 @@ with lib; type = types.int; default = 1; }; + + graphical = mkOption { + type = with types; bool; + default = false; + description = "Whether or not we are in a graphical environment"; + }; + }; + + config = { + info.graphical = config.services.xserver.enable; }; } diff --git a/users/infinidoge/default.nix b/users/infinidoge/default.nix index b9c7df4..a078ce5 100644 --- a/users/infinidoge/default.nix +++ b/users/infinidoge/default.nix @@ -1,7 +1,7 @@ { config, self, lib, pkgs, suites, profiles, inputs, ... }: let - ifGraphical = lib.optionals config.services.xserver.enable; - ifGraphical' = lib.optional config.services.xserver.enable; + ifGraphical = lib.optionals config.info.graphical; + ifGraphical' = lib.optional config.info.graphical; in { imports = lib.flatten [