mirror of
https://github.com/donovanglover/nix-config.git
synced 2025-06-27 05:01:21 +02:00
hosts: add iso
This makes it possible to build a custom NixOS installer iso with the tools I want. Ideally I get to a point where I can use the iso like a live cd with Hyprland and/or dwm installed with everything already configured. Build the iso with the following command: ``` nix build .#nixosConfigurations.iso.config.system.build.isoImage ``` Then, use qemu to test the iso: ``` qemu-system-x86_64 -enable-kvm -m 256 -cdrom ./result/iso/nixos-* ```
This commit is contained in:
parent
26365c84a2
commit
6009841203
@ -84,6 +84,12 @@
|
|||||||
specialArgs.nix-config = self;
|
specialArgs.nix-config = self;
|
||||||
modules = listFilesRecursive ./hosts/phone;
|
modules = listFilesRecursive ./hosts/phone;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
iso = nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
specialArgs.nix-config = self;
|
||||||
|
modules = listFilesRecursive ./hosts/iso;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
formatter = forAllSystems (pkgs: pkgs.nixfmt-rfc-style);
|
formatter = forAllSystems (pkgs: pkgs.nixfmt-rfc-style);
|
||||||
|
13
hosts/iso/configuration.nix
Normal file
13
hosts/iso/configuration.nix
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{ pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
(modulesPath + "/installer/cd-dvd/installation-cd-minimal.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
neovim
|
||||||
|
];
|
||||||
|
|
||||||
|
isoImage.squashfsCompression = "gzip -Xcompression-level 1";
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user