make an iso profile for building isos

nix-build "<nixpkgs/nixos>" -A config.system.build.isoImage -I nixos-config=$PWD/profiles/iso -o iso
This commit is contained in:
James Andariese 2022-09-28 07:20:32 -05:00
parent 858aa43c40
commit 890df16225
2 changed files with 14 additions and 0 deletions

1
.gitignore vendored
View File

@ -2,5 +2,6 @@
\#* \#*
*~ *~
result result
iso
_*.nix _*.nix
!.gitignore !.gitignore

13
profiles/iso/default.nix Normal file
View File

@ -0,0 +1,13 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports = [ (toString ../base) "${import ../../nixpkgs-path.nix}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix" ];
config = {
hardware.video.hidpi.enable = lib.mkDefault true;
isoImage.squashfsCompression = "gzip -Xcompression-level 1";
};
}