templates: remove duplicate logic, update gnome template
This commit is contained in:
@@ -35,10 +35,10 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Additional NixOS configuration can be added here.
|
# Additional NixOS configuration can be added here.
|
||||||
# machines/machine1/configuration.nix will be automatically imported.
|
# machines/jon/configuration.nix will be automatically imported.
|
||||||
# See: https://docs.clan.lol/guides/more-machines/#automatic-registration
|
# See: https://docs.clan.lol/guides/more-machines/#automatic-registration
|
||||||
machines = {
|
machines = {
|
||||||
# machine1 = { config, ... }: {
|
# jon = { config, ... }: {
|
||||||
# environment.systemPackages = [ pkgs.asciinema ];
|
# environment.systemPackages = [ pkgs.asciinema ];
|
||||||
# };
|
# };
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -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;
|
# Can be imported into machines to enable GNOME and GDM.
|
||||||
services.xserver.desktopManager.gnome.enable = true;
|
#
|
||||||
services.xserver.displayManager.gdm.enable = true;
|
# 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;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,14 +7,7 @@
|
|||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
# Enables the OpenSSH server for remote access
|
|
||||||
clan-core.clanModules.sshd
|
|
||||||
# Set a root password
|
|
||||||
clan-core.clanModules.root-password
|
|
||||||
clan-core.clanModules.user-password
|
clan-core.clanModules.user-password
|
||||||
|
|
||||||
# You can access other flakes imported in your flake via `self` like this:
|
|
||||||
# self.inputs.nix-index-database.nixosModules.nix-index
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# Locale service discovery and mDNS
|
# Locale service discovery and mDNS
|
||||||
@@ -32,6 +25,5 @@
|
|||||||
"input"
|
"input"
|
||||||
];
|
];
|
||||||
uid = 1000;
|
uid = 1000;
|
||||||
openssh.authorizedKeys.keys = config.users.users.root.openssh.authorizedKeys.keys;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
23
templates/clan/flake-parts/modules/gnome.nix
Normal file
23
templates/clan/flake-parts/modules/gnome.nix
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
# 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;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
{ ... }:
|
|
||||||
{
|
|
||||||
# Shared logic
|
|
||||||
# Can be imported into many machines
|
|
||||||
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user