iso-image: Combine GNOME and Plasma flavors

This allows users to choose between the two during bootup rather than
at download time.
This commit is contained in:
Will Fancher 2025-01-20 05:34:24 -05:00
parent 674a41e913
commit a2636dae46
7 changed files with 65 additions and 25 deletions

View File

@ -1,11 +1,11 @@
# This module defines a NixOS installation CD that contains GNOME.
{ pkgs, ... }:
{ lib, pkgs, ... }:
{
imports = [ ./installation-cd-graphical-calamares.nix ];
isoImage.edition = "gnome";
isoImage.edition = lib.mkDefault "gnome";
services.xserver.desktopManager.gnome = {
# Add Firefox and other tools useful for installation to the launcher

View File

@ -1,12 +1,12 @@
# This module defines a NixOS installation CD that contains X11 and
# Plasma 5.
{ pkgs, ... }:
{ lib, pkgs, ... }:
{
imports = [ ./installation-cd-graphical-calamares.nix ];
isoImage.edition = "plasma5";
isoImage.edition = lib.mkDefault "plasma5";
services.xserver.desktopManager.plasma5 = {
enable = true;

View File

@ -1,11 +1,11 @@
# This module defines a NixOS installation CD that contains Plasma 6.
{ pkgs, ... }:
{ lib, pkgs, ... }:
{
imports = [ ./installation-cd-graphical-calamares.nix ];
isoImage.edition = "plasma6";
isoImage.edition = lib.mkDefault "plasma6";
services.desktopManager.plasma6.enable = true;

View File

@ -0,0 +1,52 @@
# This configuration uses a specialisation for each desired boot
# configuration, and a common parent configuration for all of them
# that's hidden. This allows users to import this module alongside
# their own and get the full array of specialisations inheriting the
# users' settings.
{ lib, ... }:
{
imports = [ ./installation-cd-base.nix ];
isoImage.edition = "graphical";
isoImage.showConfiguration = lib.mkDefault false;
specialisation = {
gnome.configuration =
{ config, ... }:
{
imports = [ ./installation-cd-graphical-calamares-gnome.nix ];
isoImage.showConfiguration = true;
isoImage.configurationName = "GNOME (Linux LTS)";
};
gnome_latest_kernel.configuration =
{ config, ... }:
{
imports = [
./installation-cd-graphical-calamares-gnome.nix
./latest-kernel.nix
];
isoImage.showConfiguration = true;
isoImage.configurationName = "GNOME (Linux ${config.boot.kernelPackages.kernel.version})";
};
plasma.configuration =
{ config, ... }:
{
imports = [ ./installation-cd-graphical-calamares-plasma6.nix ];
isoImage.showConfiguration = true;
isoImage.configurationName = "Plasma (Linux LTS)";
};
plasma_latest_kernel.configuration =
{ config, ... }:
{
imports = [
./installation-cd-graphical-calamares-plasma6.nix
./latest-kernel.nix
];
isoImage.showConfiguration = true;
isoImage.configurationName = "Plasma (Linux ${config.boot.kernelPackages.kernel.version})";
};
};
}

View File

@ -1,11 +1,11 @@
# This module defines a NixOS installation CD that contains GNOME.
{ ... }:
{ lib, ... }:
{
imports = [ ./installation-cd-graphical-base.nix ];
isoImage.edition = "gnome";
isoImage.edition = lib.mkDefault "gnome";
services.xserver.desktopManager.gnome = {
# Add Firefox and other tools useful for installation to the launcher

View File

@ -1,12 +1,12 @@
# This module defines a NixOS installation CD that contains X11 and
# Plasma 5.
{ pkgs, ... }:
{ lib, pkgs, ... }:
{
imports = [ ./installation-cd-graphical-base.nix ];
isoImage.edition = "plasma5";
isoImage.edition = lib.mkDefault "plasma5";
services.xserver.desktopManager.plasma5 = {
enable = true;

View File

@ -169,21 +169,9 @@ in rec {
inherit system;
});
iso_plasma5 = forMatchingSystems supportedSystems (system: makeIso {
module = ./modules/installer/cd-dvd/installation-cd-graphical-calamares-plasma5.nix;
type = "plasma5";
inherit system;
});
iso_plasma6 = forMatchingSystems supportedSystems (system: makeIso {
module = ./modules/installer/cd-dvd/installation-cd-graphical-calamares-plasma6.nix;
type = "plasma6";
inherit system;
});
iso_gnome = forMatchingSystems supportedSystems (system: makeIso {
module = ./modules/installer/cd-dvd/installation-cd-graphical-calamares-gnome.nix;
type = "gnome";
iso_graphical = forAllSystems (system: makeIso {
module = ./modules/installer/cd-dvd/installation-cd-graphical-combined.nix;
type = "graphical";
inherit system;
});