testing making my own iso installer

This commit is contained in:
Gerg-L 2023-02-20 21:07:18 -05:00
parent c9a3886cd5
commit db6bb1b7a6
2 changed files with 43 additions and 1 deletions

View file

@ -7,6 +7,11 @@
#utilites --maybe flake-parts soon? #utilites --maybe flake-parts soon?
flake-utils.url = "github:numtide/flake-utils"; flake-utils.url = "github:numtide/flake-utils";
nixos-generators = {
url = "github:nix-community/nixos-generators";
inputs.nixpkgs.follows = "unstable";
};
#master branch of nix #master branch of nix
nix.url = "github:NixOS/nix"; nix.url = "github:NixOS/nix";
@ -33,9 +38,9 @@
outputs = { outputs = {
self, self,
unstable, unstable,
stable,
flake-utils, flake-utils,
nvim-flake, nvim-flake,
nixos-generators,
... ...
} @ inputs: } @ inputs:
{ {
@ -111,6 +116,15 @@
}; };
default = nix; default = nix;
}; };
packages = {
nixos-iso = nixos-generators.nixosGenerate {
inherit system;
format = "install-iso";
modules = [
(import ./iso inputs)
];
};
};
} }
); );
} }

28
iso/default.nix Normal file
View file

@ -0,0 +1,28 @@
_: {
lib,
modulesPath,
...
}: {
imports = [
"${toString modulesPath}/profiles/minimal.nix"
"${toString modulesPath}/installer/cd-dvd/installation-cd-base.nix"
];
# Causes a lot of uncached builds for a negligible decrease in size.
environment.noXlibs = lib.mkOverride 500 false;
documentation.man.enable = lib.mkOverride 500 true;
# Although we don't really need HTML documentation in the minimal installer,
# not including it may cause annoying cache misses in the case of the NixOS manual.
documentation.doc.enable = lib.mkOverride 500 true;
fonts.fontconfig.enable = lib.mkForce false;
isoImage = {
edition = lib.mkForce "gerg-minimal";
isoName = lib.mkForce "NixOS.iso";
};
}