hosts/bootstrap: improve config

And also correct the formatAttr that has been wrong for a long while.
This commit is contained in:
Gabriel Arazas 2024-02-27 21:18:18 +08:00
parent 098df7d058
commit af0c0cd44f
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC

View File

@ -1,4 +1,4 @@
{ lib, config, pkgs, ... }:
{ lib, config, pkgs, foodogsquaredModulesPath, ... }:
# 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
@ -6,6 +6,10 @@
#
# This means, there will be a "nixos" user among other things.
{
imports = [
"${foodogsquaredModulesPath}/profiles/installer.nix"
];
config = lib.mkMerge [
{
boot.kernelPackages = pkgs.linuxPackages_6_6;
@ -19,16 +23,10 @@
system.stateVersion = "23.11";
}
(lib.mkIf (config.formatAttr == "install-iso") {
(lib.mkIf (config.formatAttr == "isoImage") {
isoImage = {
isoBaseName = config.networking.hostName;
# Store the source code in a easy-to-locate path.
contents = [{
source = ../../..;
target = "/etc/nixos/";
}];
squashfsCompression = "zstd -Xcompression-level 11";
};
})