gui/gnome: port to module system

This commit is contained in:
2022-06-06 17:42:57 -07:00
parent fbad6bda2e
commit d6b2cf8ded
3 changed files with 27 additions and 13 deletions

View File

@@ -1,13 +0,0 @@
{ lib, ... }:
{
# start gnome/gdm on boot
services.xserver.enable = true;
services.xserver.desktopManager.gnome.enable = true;
services.xserver.displayManager.gdm.enable = true;
# gnome does networking stuff with networkmanager
networking.useDHCP = false;
networking.networkmanager.enable = true;
networking.wireless.enable = lib.mkForce false;
}

View File

@@ -2,6 +2,7 @@
{ {
imports = [ imports = [
./gnome.nix
./phosh.nix ./phosh.nix
./plasma-mobile.nix ./plasma-mobile.nix
./sway.nix ./sway.nix

26
modules/gui/gnome.nix Normal file
View File

@@ -0,0 +1,26 @@
{ lib, config, ... }:
with lib;
let
cfg = config.colinsane.gui.gnome;
in
{
options = {
colinsane.gui.gnome.enable = mkOption {
default = false;
type = types.bool;
};
};
config = mkIf cfg.enable {
# start gnome/gdm on boot
services.xserver.enable = true;
services.xserver.desktopManager.gnome.enable = true;
services.xserver.displayManager.gdm.enable = true;
# gnome does networking stuff with networkmanager
networking.useDHCP = false;
networking.networkmanager.enable = true;
networking.wireless.enable = lib.mkForce false;
};
}