add a custom iso config

This commit is contained in:
2025-03-10 03:12:58 +01:00
parent 82d1569c8e
commit c4a899eaad
5 changed files with 34 additions and 2 deletions

View File

@ -16,5 +16,10 @@ os:
home :
home-manager $(MODE) $(FLAGS) --flake $(FLAKE)#$(HOST)
iso :
nix build ".#nixosConfigurations.iso.config.system.build.isoImage"
cp result/iso/*.iso .
rm -rf result
cleanup :
sudo nix-collect-garbage -d

View File

@ -6,7 +6,7 @@
# By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2024/10/17 18:15:24 by tomoron #+# #+# #
# Updated: 2025/02/10 17:35:45 by tomoron ### ########.fr #
# Updated: 2025/03/10 00:53:03 by tomoron ### ########.fr #
# #
# **************************************************************************** #
@ -58,6 +58,14 @@
vbox = osConfig {flakeName = "vbox";};
laptop = osConfig {flakeName = "laptop"; extraModules = [ nixos-hardware.nixosModules.asus-zephyrus-ga401 ];};
desktop = osConfig {flakeName = "desktop";};
iso = nixpkgs.lib.nixosSystem {
inherit pkgs;
modules = [
(nixpkgs + "/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix")
./osConfigs/hosts/iso.nix
];
};
};

View File

@ -6,7 +6,7 @@
# By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2025/02/09 01:43:46 by tomoron #+# #+# #
# Updated: 2025/03/01 19:27:30 by tomoron ### ########.fr #
# Updated: 2025/03/10 00:30:30 by tomoron ### ########.fr #
# #
# **************************************************************************** #

17
osConfigs/hosts/iso.nix Normal file
View File

@ -0,0 +1,17 @@
{ ... }:
{
imports = [ ../packages.nix ];
environment.etc."skel/nix-config".source = "${builtins.fetchGit {
url = "https://github.com/ARandomPig/nix-config";
rev = "6982747ec65962a13dd07948b2317d8d571f39b8";
ref = "master";
}}";
system.activationScripts.populateUser.text = ''
mkdir -p /home/nixos
cp -r /etc/skel/nix-config
chown -R nixos:nixos /home/nixos/nix-config
'';
}

View File

@ -11,6 +11,7 @@
gnumake
git
neofetch
neovim
ntfs3g
clang
ninja
@ -23,5 +24,6 @@
stress
ffmpeg
cryptsetup
acpi
];
}