wfvm/wfvm/demo-image.nix

83 lines
1.8 KiB
Nix
Raw Permalink Normal View History

{ pkgs ? import <nixpkgs> {}
# Whether to generate just a script to start and debug the windows installation
, impureMode ? false
# Flake input `self`
, self ? null
}:
2020-06-28 14:23:43 +08:00
let
wfvm =
if self == null
# nix-build
then (import ./default.nix { inherit pkgs; })
# built from flake.nix
else self.lib;
2020-06-28 14:23:43 +08:00
in
wfvm.makeWindowsImage {
# Build install script & skip building iso
inherit impureMode;
# Custom base iso
2021-07-01 05:50:54 +08:00
# windowsImage = pkgs.requireFile rec {
2023-05-24 03:48:23 +08:00
# name = "Win11_22H2_English_x64v1.iso";
# sha256 = "08mbppsm1naf73z8fjyqkf975nbls7xj9n4fq0yp802dv1rz3whd";
# message = "Get disk image ${name} from https://www.microsoft.com/en-us/software-download/windows11/";
2020-06-28 14:23:43 +08:00
# };
# impureShellCommands = [
# "powershell.exe echo Hello"
# ];
# User accounts
# users = {
# artiq = {
# password = "1234";
# # description = "Default user";
# # displayName = "Display name";
# groups = [
# "Administrators"
# ];
# };
# };
# Auto login
# defaultUser = "artiq";
# fullName = "M-Labs";
# organization = "m-labs";
# administratorPassword = "12345";
# Imperative installation commands, to be installed incrementally
installCommands =
if impureMode
then []
else with wfvm.layers; [
2021-04-11 05:12:13 +08:00
(collapseLayers [
disable-autosleep
disable-autolock
disable-firewall
])
anaconda3 msys2
];
2020-06-28 14:23:43 +08:00
# services = {
# # Enable remote management
# WinRm = {
# Status = "Running";
# PassThru = true;
# };
# };
2021-07-01 05:50:54 +08:00
# License key (required)
# productKey = throw "Search the f* web"
2023-05-24 03:48:23 +08:00
imageSelection = "Windows 11 Pro N";
2021-07-01 05:50:54 +08:00
2020-06-28 14:23:43 +08:00
# Locales
# uiLanguage = "en-US";
# inputLocale = "en-US";
# userLocale = "en-US";
# systemLocale = "en-US";
}