hosts/graphical-installer: improve config

Also this.
This commit is contained in:
Gabriel Arazas 2024-02-27 21:19:31 +08:00
parent af0c0cd44f
commit d354debb75
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC

View File

@ -1,13 +1,9 @@
{ lib, config, pkgs, modulesPath, ... }: { lib, config, pkgs, ... }:
# Since this will be exported as an installer ISO, you'll have to keep in mind # Since this will be exported as an installer ISO, you'll have to keep in mind
# about the added imports from nixos-generators. In this case, it simply adds # about the added imports from nixos-generators. In this case, it simply adds
# the NixOS installation CD profile. # the NixOS installation CD profile.
{ {
imports = [
"${modulesPath}/installer/cd-dvd/installation-cd-graphical-base.nix"
];
config = lib.mkMerge [ config = lib.mkMerge [
{ {
boot.kernelPackages = pkgs.linuxPackages_6_6; boot.kernelPackages = pkgs.linuxPackages_6_6;
@ -36,15 +32,11 @@
system.stateVersion = "23.11"; system.stateVersion = "23.11";
} }
(lib.mkIf (config.formatAttr == "install-iso") { (lib.mkIf
(config.formatAttr == "isoImage" || config.formatAttr == "graphicalIsoImage") {
isoImage = { isoImage = {
isoBaseName = config.networking.hostName; isoBaseName = config.networking.hostName;
edition = "A Happy GNOME";
# Put the source code somewhere easy to see.
contents = [{
source = ../../..;
target = "/etc/nixos";
}];
squashfsCompression = "zstd -Xcompression-level 12"; squashfsCompression = "zstd -Xcompression-level 12";
}; };