commit b47437ff1787a9553a309a116ebf99e9c09ccd83 Author: Git Sagar Date: Thu Aug 3 20:55:48 2023 +0000 custom nixos iso build confs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1b8d10d --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.iso +result diff --git a/common.nix b/common.nix new file mode 100644 index 0000000..81f1882 --- /dev/null +++ b/common.nix @@ -0,0 +1,7 @@ +{ config, pkgs, ... }: +{ + boot.supportedFilesystems = [ "ntfs" ]; + nix.settings.experimental-features = [ "nix-command" "flakes" ]; + isoImage.squashfsCompression = "gzip -Xcompression-level 1"; + environment.systemPackages = with pkgs; [ git htop btop usbutils pciutils file iotop iftop tmux micro (pass.withExtensions (ext: [ext.pass-otp])) ]; +} diff --git a/graphical-iso.nix b/graphical-iso.nix new file mode 100644 index 0000000..6269c97 --- /dev/null +++ b/graphical-iso.nix @@ -0,0 +1,12 @@ +{ config, pkgs, ... }: +{ + imports = [ + + + # Provide an initial copy of the NixOS channel so that the user + # doesn't need to run "nix-channel --update" first. + + ./common.nix + ]; + +} diff --git a/minimal-iso.nix b/minimal-iso.nix new file mode 100644 index 0000000..f04ff54 --- /dev/null +++ b/minimal-iso.nix @@ -0,0 +1,12 @@ +{ config, pkgs, ... }: +{ + imports = [ + + + # Provide an initial copy of the NixOS channel so that the user + # doesn't need to run "nix-channel --update" first. + + ./common.nix + ]; + +} diff --git a/scripts/build-graphical.sh b/scripts/build-graphical.sh new file mode 100644 index 0000000..d012525 --- /dev/null +++ b/scripts/build-graphical.sh @@ -0,0 +1 @@ +nix-build '' -A config.system.build.isoImage -I nixos-config=graphical-iso.nix diff --git a/scripts/build-minimal.sh b/scripts/build-minimal.sh new file mode 100644 index 0000000..ec91c7a --- /dev/null +++ b/scripts/build-minimal.sh @@ -0,0 +1 @@ +nix-build '' -A config.system.build.isoImage -I nixos-config=minimal-iso.nix