templates: remove duplicate logic, update gnome template

This commit is contained in:
Johannes Kirschbauer
2025-07-11 08:57:06 +02:00
parent c44bf846de
commit 30fbe76e8d
5 changed files with 45 additions and 32 deletions

View File

@@ -1,19 +1,23 @@
/*
This is an example of a simple nixos module:
Enables the GNOME desktop environment and the GDM display manager.
To use this module, import it in your machines NixOS configuration like this:
```nix
imports = [
modules/gnome.nix
];
```
*/
{ ... }:
{
services.xserver.enable = true;
services.xserver.desktopManager.gnome.enable = true;
services.xserver.displayManager.gdm.enable = true;
# Can be imported into machines to enable GNOME and GDM.
#
# Copy this into a machine's configuration:
# `machines/<name>/configuration.nix`
# ```nix
# imports = [
# ../../modules/gnome.nix
# ];
# ```
# Enable the GNOME desktop environment and the GDM display manager.
# Pre NixOS: 25.11
# services.xserver.enable = true;
# services.xserver.displayManager.gdm.enable = true;
# services.xserver.desktopManager.gnome.enable = true;
# => 25.11
# services.displayManager.gdm.enable = true;
# services.desktopManager.gnome.enable = true;
}