2023-01-30 01:49:51 +00:00
|
|
|
{ lib, config, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
inherit (lib) mkDefault mkIf mkOption types;
|
|
|
|
cfg = config.sane.gui;
|
|
|
|
in
|
2023-01-29 08:10:53 +00:00
|
|
|
{
|
|
|
|
imports = [
|
2023-01-30 01:42:12 +00:00
|
|
|
./gnome.nix
|
2023-01-30 01:39:20 +00:00
|
|
|
./phosh.nix
|
2023-01-30 01:44:32 +00:00
|
|
|
./plasma.nix
|
2023-01-30 01:43:33 +00:00
|
|
|
./plasma-mobile.nix
|
2023-01-29 08:10:53 +00:00
|
|
|
./sway.nix
|
|
|
|
];
|
2023-01-30 01:49:51 +00:00
|
|
|
|
|
|
|
options = {
|
|
|
|
sane.gui.enable = mkOption {
|
|
|
|
default = false;
|
|
|
|
type = types.bool;
|
|
|
|
description = ''
|
|
|
|
enables config used by any GUI, like display management or select packages.
|
|
|
|
the user should prefer to interact with specific GUIs like `sane.gui.sway`
|
|
|
|
and let those modules auto-set this flag when necessary.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
sane.packages.enableGuiPkgs = mkDefault true;
|
|
|
|
|
|
|
|
# preserve backlight brightness across power cycles
|
|
|
|
# see `man systemd-backlight`
|
|
|
|
sane.persist.sys.plaintext = [ "/var/lib/systemd/backlight" ];
|
|
|
|
};
|
2023-01-29 08:10:53 +00:00
|
|
|
}
|