ova: add cloneConfigExtra option
Customize virtualbox ovas to contain a clone config option giving some useful hints. Fixes #38429
This commit is contained in:
parent
7c3f27dba9
commit
1902adb437
@ -22,4 +22,42 @@ with lib;
|
||||
|
||||
powerManagement.enable = false;
|
||||
system.stateVersion = mkDefault "18.03";
|
||||
|
||||
installer.cloneConfigExtra = ''
|
||||
# Let demo build as a trusted user.
|
||||
# nix.trustedUsers = [ "demo" ];
|
||||
|
||||
# Mount a VirtualBox shared folder.
|
||||
# This is configurable in the VirtualBox menu at
|
||||
# Machine / Settings / Shared Folders.
|
||||
# fileSystems."/mnt" = {
|
||||
# fsType = "vboxsf";
|
||||
# device = "nameofdevicetomount";
|
||||
# options = [ "rw" ];
|
||||
# };
|
||||
|
||||
# By default, the NixOS VirtualBox demo image includes SDDM and Plasma.
|
||||
# If you prefer another desktop manager or display manager, you may want
|
||||
# to disable the default.
|
||||
# services.xserver.desktopManager.plasma5.enable = lib.mkForce false;
|
||||
# services.xserver.displayManager.sddm.enable = lib.mkForce false;
|
||||
|
||||
# Enable GDM/GNOME by uncommenting above two lines and two lines below.
|
||||
# services.xserver.displayManager.gdm.enable = true;
|
||||
# services.xserver.desktopManager.gnome3.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
# time.timeZone = "Europe/Amsterdam";
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# \$ nix search wget
|
||||
# environment.systemPackages = with pkgs; [
|
||||
# wget vim
|
||||
# ];
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
# services.openssh.enable = true;
|
||||
|
||||
system.stateVersion = mkDefault "18.03";
|
||||
'';
|
||||
}
|
||||
|
@ -48,6 +48,8 @@ let
|
||||
|
||||
{
|
||||
imports = [ ${toString config.installer.cloneConfigIncludes} ];
|
||||
|
||||
${config.installer.cloneConfigExtra}
|
||||
}
|
||||
'';
|
||||
|
||||
@ -73,6 +75,13 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
installer.cloneConfigExtra = mkOption {
|
||||
default = "";
|
||||
description = ''
|
||||
Extra text to include in the cloned configuration.nix included in this
|
||||
installer.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
|
Loading…
Reference in New Issue
Block a user