From 633eea88771882b22f49168ff991e0a03c112a54 Mon Sep 17 00:00:00 2001 From: tomoron Date: Tue, 6 May 2025 22:47:47 +0200 Subject: [PATCH] enable display manager on desktop --- osConfigs/hosts/desktop.nix | 7 +------ osConfigs/hosts/laptop.nix | 3 +-- osConfigs/modules/displayManager.nix | 15 +++++++++++++++ 3 files changed, 17 insertions(+), 8 deletions(-) create mode 100644 osConfigs/modules/displayManager.nix diff --git a/osConfigs/hosts/desktop.nix b/osConfigs/hosts/desktop.nix index 55902e9..1c21f53 100644 --- a/osConfigs/hosts/desktop.nix +++ b/osConfigs/hosts/desktop.nix @@ -2,12 +2,6 @@ { config, lib, inputs, pkgs, ... }: { - imports = [ - ../modules/game.nix - ../modules/nvidia.nix - ../modules/vboxHost.nix - ]; - environment.systemPackages = with pkgs; [ cudatoolkit lm_sensors @@ -18,6 +12,7 @@ hardware.cpu.intel.updateMicrocode = true; boot.kernelModules = [ "kvm-intel" "nvidia" ]; + mods.displayManager.enable = true; hardware.nvidia = { diff --git a/osConfigs/hosts/laptop.nix b/osConfigs/hosts/laptop.nix index 7e7fdae..f23bc9f 100644 --- a/osConfigs/hosts/laptop.nix +++ b/osConfigs/hosts/laptop.nix @@ -6,8 +6,7 @@ boot.initrd.luks.devices.cryptroot.device = "/dev/disk/by-uuid/a4593b01-069d-4a5d-a550-74a762b89b3f"; boot.initrd.luks.devices.cryptroot.allowDiscards = true; - services.displayManager.enable = true; - services.displayManager.ly.enable = true; + mods.displayManager.enable = true; networking.firewall.enable = false; networking.hostName = "patate-douce"; diff --git a/osConfigs/modules/displayManager.nix b/osConfigs/modules/displayManager.nix new file mode 100644 index 0000000..d8df129 --- /dev/null +++ b/osConfigs/modules/displayManager.nix @@ -0,0 +1,15 @@ +{config, lib, ... }: + +{ + options.mods.displayManager.enable = lib.mkOption { + type = lib.types.bool; + default = false; + description = "enable the display manager"; + }; + + config = lib.mkIf config.mods.displayManager.enable { + services.displayManager.enable = true; + services.displayManager.ly.enable = true; + }; +} +