base: move common Xorg options under gui option
This commit is contained in:
parent
b9f088c656
commit
ae2c3308db
|
@ -1,8 +1,26 @@
|
||||||
{ pkgs, lib, config, ... }:
|
{ pkgs, lib, config, options, ... }:
|
||||||
{
|
{
|
||||||
options.my.gui.enable = lib.mkEnableOption "System has some kind of screen attached";
|
options.my.gui = {
|
||||||
|
enable = lib.mkEnableOption "System has some kind of screen attached";
|
||||||
|
isNvidia = lib.mkEnableOption "System a NVIDIA GPU";
|
||||||
|
};
|
||||||
|
|
||||||
config = lib.mkIf config.my.gui.enable {
|
config = lib.mkIf config.my.gui.enable {
|
||||||
|
my.displayManager.sddm.enable = true;
|
||||||
|
|
||||||
|
services = {
|
||||||
|
xserver = {
|
||||||
|
enable = true;
|
||||||
|
# NOTE: could use `mkOptionDefault` but this feels more explicit
|
||||||
|
videoDrivers = options.services.xserver.videoDrivers.default
|
||||||
|
++ lib.optional config.my.gui.isNvidia "nvidia";
|
||||||
|
windowManager.i3.enable = true;
|
||||||
|
layout = "fr";
|
||||||
|
xkbVariant = "us";
|
||||||
|
libinput.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
element-desktop
|
element-desktop
|
||||||
feh
|
feh
|
||||||
|
|
|
@ -91,18 +91,11 @@ in
|
||||||
permitRootLogin = "no";
|
permitRootLogin = "no";
|
||||||
passwordAuthentication = false;
|
passwordAuthentication = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
xserver = {
|
|
||||||
enable = true;
|
|
||||||
videoDrivers = [ "nvidia" ];
|
|
||||||
windowManager.i3.enable = true;
|
|
||||||
layout = "fr";
|
|
||||||
xkbVariant = "us";
|
|
||||||
libinput.enable = true;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
my.displayManager.sddm.enable = true;
|
my.gui = {
|
||||||
my.gui.enable = true;
|
enable = true;
|
||||||
|
isNvidia = true;
|
||||||
|
};
|
||||||
|
|
||||||
my.wakeonwlan.interfaces.phy0.methods = [
|
my.wakeonwlan.interfaces.phy0.methods = [
|
||||||
"magic-packet"
|
"magic-packet"
|
||||||
|
|
|
@ -46,13 +46,6 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
xserver = {
|
|
||||||
enable = true;
|
|
||||||
windowManager.i3.enable = true;
|
|
||||||
layout = "fr";
|
|
||||||
xkbVariant = "us";
|
|
||||||
libinput.enable = true;
|
|
||||||
};
|
|
||||||
tlp = {
|
tlp = {
|
||||||
settings = {
|
settings = {
|
||||||
START_CHARGE_THRESH_BAT0 = 70;
|
START_CHARGE_THRESH_BAT0 = 70;
|
||||||
|
@ -61,7 +54,6 @@ in
|
||||||
};
|
};
|
||||||
fwupd.enable = true;
|
fwupd.enable = true;
|
||||||
};
|
};
|
||||||
my.displayManager.sddm.enable = true;
|
|
||||||
my.gui.enable = true;
|
my.gui.enable = true;
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
|
Loading…
Reference in a new issue