2022-10-14 03:41:03 +08:00
|
|
|
{ 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
|
2022-10-14 03:41:03 +08:00
|
|
|
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 {
|
|
|
|
# name = "Win10_21H1_English_x64.iso";
|
|
|
|
# sha256 = "1sl51lnx4r6ckh5fii7m2hi15zh8fh7cf7rjgjq9kacg8hwyh4b9";
|
|
|
|
# message = "Get ${name} from https://www.microsoft.com/en-us/software-download/windows10ISO";
|
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
|
2021-04-11 05:11:19 +08:00
|
|
|
installCommands =
|
|
|
|
if impureMode
|
|
|
|
then []
|
|
|
|
else with wfvm.layers; [
|
2021-04-11 05:12:13 +08:00
|
|
|
(collapseLayers [
|
|
|
|
disable-autosleep
|
|
|
|
disable-autolock
|
|
|
|
disable-firewall
|
|
|
|
])
|
2021-04-11 05:11:19 +08:00
|
|
|
anaconda3 msys2 msvc msvc-ide-unbreak
|
|
|
|
];
|
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"
|
|
|
|
imageSelection = "Windows 10 Pro";
|
|
|
|
|
2020-06-28 14:23:43 +08:00
|
|
|
|
|
|
|
# Locales
|
|
|
|
# uiLanguage = "en-US";
|
|
|
|
# inputLocale = "en-US";
|
|
|
|
# userLocale = "en-US";
|
|
|
|
# systemLocale = "en-US";
|
|
|
|
|
|
|
|
}
|