Create minimal and graphical ISOs
This commit is contained in:
parent
f5f7ad9834
commit
22c1f4adc8
5 changed files with 42 additions and 33 deletions
|
@ -71,6 +71,9 @@
|
|||
_: host: host.config.system.build.toplevel
|
||||
) self.nixosConfigurations;
|
||||
|
||||
hydraJobs.isos.installer = self.nixosConfigurations.installer.config.system.build.isoImage;
|
||||
hydraJobs.isos = {
|
||||
installer-minimal = self.nixosConfigurations.installer-minimal.config.system.build.isoImage;
|
||||
installer-graphical = self.nixosConfigurations.installer-graphical.config.system.build.isoImage;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
9
hosts/x86_64-linux/installer-graphical.nix
Normal file
9
hosts/x86_64-linux/installer-graphical.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ nixpkgs-flake, ... }:
|
||||
{
|
||||
imports = [
|
||||
"${nixpkgs-flake}/nixos/modules/installer/cd-dvd/installation-cd-graphical-combined.nix"
|
||||
];
|
||||
custom.platform.installer.enable = true;
|
||||
isoImage.squashfsCompression = "zstd";
|
||||
system.installer.channel.enable = false;
|
||||
}
|
9
hosts/x86_64-linux/installer-minimal.nix
Normal file
9
hosts/x86_64-linux/installer-minimal.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ nixpkgs-flake, ... }:
|
||||
{
|
||||
imports = [
|
||||
"${nixpkgs-flake}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix"
|
||||
];
|
||||
custom.platform.installer.enable = true;
|
||||
isoImage.squashfsCompression = "zstd";
|
||||
system.installer.channel.enable = false;
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
{
|
||||
config,
|
||||
nixpkgs-flake,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
zfs = pkgs.zfsUnstable.override {
|
||||
# this overrides saves 10MB
|
||||
samba = pkgs.coreutils;
|
||||
|
||||
python3 = pkgs.python3Minimal;
|
||||
};
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
"${nixpkgs-flake}/nixos/modules/installer/cd-dvd/installation-cd-graphical-combined.nix"
|
||||
];
|
||||
|
||||
# This block modified from https://github.com/nix-community/nixos-images
|
||||
boot.zfs.package = zfs;
|
||||
environment.defaultPackages = lib.mkForce [ zfs ];
|
||||
boot.kernelModules = [ "zfs" ];
|
||||
boot.extraModulePackages = [ config.boot.kernelPackages.zfs_unstable ];
|
||||
|
||||
custom.services.nixCacheClient.enable = true;
|
||||
services.qemuGuest.enable = true;
|
||||
system.installer.channel.enable = false;
|
||||
isoImage.squashfsCompression = "zstd";
|
||||
networking.wireless.enable = false;
|
||||
}
|
20
modules/platform/installer.nix
Normal file
20
modules/platform/installer.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.custom.platform.installer;
|
||||
in
|
||||
{
|
||||
options.custom.platform.installer.enable = lib.mkEnableOption "installer ISO configuration";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
boot.supportedFilesystems.zfs = lib.mkForce true;
|
||||
users.defaultUserShell = lib.mkForce pkgs.bash;
|
||||
custom.services.nixCacheClient.enable = true;
|
||||
services.qemuGuest.enable = true;
|
||||
networking.wireless.enable = false;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue