refactor: modules/gui/default.nix: fold into hosts/modules/gui/default.nix
This commit is contained in:
parent
a9cf619a14
commit
cb3e7623ae
|
@ -1,4 +1,9 @@
|
||||||
{ ... }:
|
{ lib, config, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (lib) mkDefault mkIf mkOption types;
|
||||||
|
cfg = config.sane.gui;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./gnome.nix
|
./gnome.nix
|
||||||
|
@ -7,4 +12,24 @@
|
||||||
./plasma-mobile.nix
|
./plasma-mobile.nix
|
||||||
./sway.nix
|
./sway.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
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" ];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
imports = [
|
imports = [
|
||||||
./feeds.nix
|
./feeds.nix
|
||||||
./fs
|
./fs
|
||||||
./gui
|
|
||||||
./home-manager
|
./home-manager
|
||||||
./ids.nix
|
./ids.nix
|
||||||
./packages.nix
|
./packages.nix
|
||||||
|
|
|
@ -1,23 +0,0 @@
|
||||||
{ lib, config, ... }:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.sane.gui;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options = {
|
|
||||||
# doesn't directly create outputs. consumed by e.g. home-manager.nix module
|
|
||||||
sane.gui.enable = mkOption {
|
|
||||||
default = false;
|
|
||||||
type = types.bool;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
sane.packages.enableGuiPkgs = lib.mkDefault true;
|
|
||||||
|
|
||||||
# preserve backlight brightness across power cycles
|
|
||||||
# see `man systemd-backlight`
|
|
||||||
sane.persist.sys.plaintext = [ "/var/lib/systemd/backlight" ];
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user