laptop image tiers, devshell, partition preserve, cleanup
Images: - laptopUpstream: bare OS install with AHCI, no templates - laptopSlim: essentials only (debloat, registry tweaks) - laptop: full (essentials + all apps) - win10/win11 images use rec for self-references CLI: - preserve recovery partition (4) during disk copy - expand partition 3 up to partition 4 boundary - remove VNC CLI flag (use vncDisplay in nix configs instead) Flake: - add devShell with vmix alias and PS1 prompt Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
ee64eef7e1
commit
20e8b98fec
5 changed files with 52 additions and 7 deletions
2
cli.nix
2
cli.nix
|
|
@ -224,7 +224,7 @@ pkgs.writeShellScriptBin "vmix" ''
|
||||||
${pkgs.gptfdisk}/bin/sgdisk -d 4 "$TO_DISK" 2>/dev/null || true
|
${pkgs.gptfdisk}/bin/sgdisk -d 4 "$TO_DISK" 2>/dev/null || true
|
||||||
|
|
||||||
echo "[4/5] Expanding Windows partition (partition 3)..."
|
echo "[4/5] Expanding Windows partition (partition 3)..."
|
||||||
${pkgs.parted}/bin/parted -s "$TO_DISK" resizepart 3 100%
|
${pkgs.parted}/bin/parted -s "$TO_DISK" resizepart 3 100%
|
||||||
|
|
||||||
if [[ "$TO_DISK" == *nvme* ]] || [[ "$TO_DISK" == *mmcblk* ]]; then
|
if [[ "$TO_DISK" == *nvme* ]] || [[ "$TO_DISK" == *mmcblk* ]]; then
|
||||||
WIN_PART="''${TO_DISK}p3"
|
WIN_PART="''${TO_DISK}p3"
|
||||||
|
|
|
||||||
15
flake.nix
15
flake.nix
|
|
@ -27,5 +27,20 @@
|
||||||
type = "app";
|
type = "app";
|
||||||
program = "${self.packages.${system}.default}/bin/vmix";
|
program = "${self.packages.${system}.default}/bin/vmix";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
devShells.${system}.default = pkgs.mkShell {
|
||||||
|
shellHook = ''
|
||||||
|
# vmix CLI available as local flake
|
||||||
|
export VMIX_FLAKE="path:$PWD"
|
||||||
|
alias vmix='nix run "$VMIX_FLAKE" --'
|
||||||
|
|
||||||
|
# bash prompt
|
||||||
|
PROMPT_COMMAND='PS1_CMD1=$(git branch --show-current 2>/dev/null)'; PS1='\[\e[1;7m\]$?\[\e[0m\] \[\e[2m\]\A\[\e[0m\] \[\e[91m\]\u@\h\[\e[0m\] \[\e[92;1m\]\w\[\e[0m\] \[\e[96m\]''${PS1_CMD1}\[\e[0m\] \[\e[1;2m\]$\[\e[0;1m\] \[\e[0m\]'
|
||||||
|
'';
|
||||||
|
buildInputs = with pkgs; [
|
||||||
|
bashInteractive
|
||||||
|
git
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,26 @@ in rec {
|
||||||
|
|
||||||
# Bundles — reusable template lists for common use cases
|
# Bundles — reusable template lists for common use cases
|
||||||
bundles = {
|
bundles = {
|
||||||
|
# Essentials only: debloat + registry tweaks, no apps
|
||||||
|
laptopSlim = [
|
||||||
|
essentials.removeIE
|
||||||
|
essentials.removeWMP
|
||||||
|
essentials.removeEdge
|
||||||
|
essentials.vcppRuntimes
|
||||||
|
essentials.bestPerformance
|
||||||
|
reg.disableTelemetry
|
||||||
|
reg.disableErrorReporting
|
||||||
|
reg.disableUpdates
|
||||||
|
reg.disableSmartScreen
|
||||||
|
reg.disablePrivacyTracking
|
||||||
|
reg.disableAI
|
||||||
|
reg.disableConsumerFeatures
|
||||||
|
reg.performanceTweaks
|
||||||
|
apps.thorium
|
||||||
|
apps.sevenZip
|
||||||
|
];
|
||||||
|
|
||||||
|
# Full: essentials + apps
|
||||||
laptop = [
|
laptop = [
|
||||||
essentials.removeIE
|
essentials.removeIE
|
||||||
essentials.removeWMP
|
essentials.removeWMP
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
# Pipeline: makeImage (Audit Mode) → essentials → apps → registry → generalize
|
# Pipeline: makeImage (Audit Mode) → essentials → apps → registry → generalize
|
||||||
{ pkgs, lib, system, windows, upstreamISOs, ... }:
|
{ pkgs, lib, system, windows, upstreamISOs, ... }:
|
||||||
with windows;
|
with windows;
|
||||||
{
|
rec {
|
||||||
ltsc = rec {
|
ltsc = rec {
|
||||||
upstream = makeImage {
|
upstream = makeImage {
|
||||||
name = "win10-ltsc-2021";
|
name = "win10-ltsc-2021";
|
||||||
|
|
@ -32,10 +32,14 @@ with windows;
|
||||||
withAMDGPU = customizeImage basic templates.essentials.amdGpuDrivers;
|
withAMDGPU = customizeImage basic templates.essentials.amdGpuDrivers;
|
||||||
};
|
};
|
||||||
|
|
||||||
laptop = customizeImageFold (makeImage {
|
laptopUpstream = makeImage {
|
||||||
name = "win10-ltsc-2021-laptop";
|
name = "win10-ltsc-2021-laptop";
|
||||||
upstreamISO = upstreamISOs.win10-ltsc-2021;
|
upstreamISO = upstreamISOs.win10-ltsc-2021;
|
||||||
productKey = "M7XTQ-FN8P6-TTKYV-9D4CC-J462D";
|
productKey = "M7XTQ-FN8P6-TTKYV-9D4CC-J462D";
|
||||||
useAHCI = true;
|
useAHCI = true;
|
||||||
}) templates.bundles.laptop;
|
};
|
||||||
|
|
||||||
|
laptopSlim = customizeImageFold laptopUpstream templates.bundles.laptopSlim;
|
||||||
|
|
||||||
|
laptop = customizeImageFold laptopUpstream templates.bundles.laptop;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
# Pipeline: makeImage (Audit Mode) → essentials → apps → registry
|
# Pipeline: makeImage (Audit Mode) → essentials → apps → registry
|
||||||
{ pkgs, lib, system, windows, upstreamISOs, ... }:
|
{ pkgs, lib, system, windows, upstreamISOs, ... }:
|
||||||
with windows;
|
with windows;
|
||||||
{
|
rec {
|
||||||
ltsc = rec {
|
ltsc = rec {
|
||||||
upstream = makeImage {
|
upstream = makeImage {
|
||||||
name = "win11-ltsc-2024";
|
name = "win11-ltsc-2024";
|
||||||
|
|
@ -36,12 +36,18 @@ with windows;
|
||||||
withAMDGPU = customizeImage basic templates.essentials.amdGpuDrivers;
|
withAMDGPU = customizeImage basic templates.essentials.amdGpuDrivers;
|
||||||
};
|
};
|
||||||
|
|
||||||
laptop = customizeImageFold (makeImage {
|
laptopUpstream = makeImage {
|
||||||
name = "win11-ltsc-2024-laptop";
|
name = "win11-ltsc-2024-laptop";
|
||||||
upstreamISO = upstreamISOs.win11-ltsc-2024;
|
upstreamISO = upstreamISOs.win11-ltsc-2024;
|
||||||
productKey = "M7XTQ-FN8P6-TTKYV-9D4CC-J462D";
|
productKey = "M7XTQ-FN8P6-TTKYV-9D4CC-J462D";
|
||||||
bypassRequirements = true;
|
bypassRequirements = true;
|
||||||
useAHCI = true;
|
useAHCI = true;
|
||||||
windowsVersionForVirtioDrivers = "w11";
|
windowsVersionForVirtioDrivers = "w11";
|
||||||
}) (templates.bundles.laptop ++ [ templates.reg.disableUCPD ]);
|
};
|
||||||
|
|
||||||
|
laptopSlim = customizeImageFold laptopUpstream
|
||||||
|
(templates.bundles.laptopSlim ++ [ templates.reg.disableUCPD ]);
|
||||||
|
|
||||||
|
laptop = customizeImageFold laptopUpstream
|
||||||
|
(templates.bundles.laptop ++ [ templates.reg.disableUCPD ]);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue