diff options
Diffstat (limited to 'nixos/modules/installer/tools/nixos-generate-config.pl')
-rw-r--r-- | nixos/modules/installer/tools/nixos-generate-config.pl | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/nixos/modules/installer/tools/nixos-generate-config.pl b/nixos/modules/installer/tools/nixos-generate-config.pl index 657c28f095dd..a1b6cf535971 100644 --- a/nixos/modules/installer/tools/nixos-generate-config.pl +++ b/nixos/modules/installer/tools/nixos-generate-config.pl @@ -208,9 +208,6 @@ foreach my $path (glob "/sys/bus/pci/devices/*") { pciCheck $path; } -push @attrs, "services.xserver.videoDrivers = [ \"$videoDriver\" ];" if $videoDriver; - - # Idem for USB devices. sub usbCheck { @@ -277,6 +274,12 @@ if ($virt eq "qemu" || $virt eq "kvm" || $virt eq "bochs") { push @imports, "<nixpkgs/nixos/modules/profiles/qemu-guest.nix>"; } +# Also for Hyper-V. +if ($virt eq "microsoft") { + push @initrdAvailableKernelModules, "hv_storvsc"; + $videoDriver = "fbdev"; +} + # Pull in NixOS configuration for containers. if ($virt eq "systemd-nspawn") { @@ -307,6 +310,7 @@ sub findStableDevPath { return $dev; } +push @attrs, "services.xserver.videoDrivers = [ \"$videoDriver\" ];" if $videoDriver; # Generate the swapDevices option from the currently activated swap # devices. @@ -588,6 +592,12 @@ $bootLoaderConfig # Enable the OpenSSH daemon. # services.openssh.enable = true; + # Open ports in the firewall. + # networking.firewall.allowedTCPPorts = [ ... ]; + # networking.firewall.allowedUDPPorts = [ ... ]; + # Or disable the firewall altogether. + # networking.firewall.enable = false; + # Enable CUPS to print documents. # services.printing.enable = true; @@ -597,8 +607,8 @@ $bootLoaderConfig # services.xserver.xkbOptions = "eurosign:e"; # Enable the KDE Desktop Environment. - # services.xserver.displayManager.kdm.enable = true; - # services.xserver.desktopManager.kde4.enable = true; + # services.xserver.displayManager.sddm.enable = true; + # services.xserver.desktopManager.kde5.enable = true; # Define a user account. Don't forget to set a password with ‘passwd’. # users.extraUsers.guest = { |