modules/info: add info.graphical
This commit is contained in:
parent
b5ba1b8100
commit
7a37b2f5b3
2 changed files with 12 additions and 2 deletions
|
@ -6,5 +6,15 @@ with lib;
|
||||||
type = types.int;
|
type = types.int;
|
||||||
default = 1;
|
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;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ config, self, lib, pkgs, suites, profiles, inputs, ... }:
|
{ config, self, lib, pkgs, suites, profiles, inputs, ... }:
|
||||||
let
|
let
|
||||||
ifGraphical = lib.optionals config.services.xserver.enable;
|
ifGraphical = lib.optionals config.info.graphical;
|
||||||
ifGraphical' = lib.optional config.services.xserver.enable;
|
ifGraphical' = lib.optional config.info.graphical;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = lib.flatten [
|
imports = lib.flatten [
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue