Skip to content
This repository was archived by the owner on Apr 12, 2021. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: cb08cb4333a8
Choose a base ref
...
head repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: b4d7324678c3
Choose a head ref
  • 5 commits
  • 3 files changed
  • 3 contributors

Commits on Oct 3, 2018

  1. nixos on hyperv: load modules and set video mode

    (cherry picked from commit 3a76bc7)
    peterhoeg committed Oct 3, 2018

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    42968c0 View commit details
  2. nixos-installer: use the hyperv module on hyperv

    (cherry picked from commit ca6d41a)
    peterhoeg committed Oct 3, 2018
    Copy the full SHA
    18ae457 View commit details
  3. nixos on hyperv: hot-add CPU

    (cherry picked from commit 6e3e136)
    peterhoeg committed Oct 3, 2018
    Copy the full SHA
    9ffdaa1 View commit details

Commits on Oct 4, 2018

  1. Copy the full SHA
    8dae912 View commit details
  2. GRV: Fix typos in description

    (cherry picked from commit 1bb4b16)
    alexherbo2 authored and Mic92 committed Oct 4, 2018
    Copy the full SHA
    b4d7324 View commit details
3 changes: 1 addition & 2 deletions nixos/modules/installer/tools/nixos-generate-config.pl
Original file line number Diff line number Diff line change
@@ -277,8 +277,7 @@ sub usbCheck {

# Also for Hyper-V.
if ($virt eq "microsoft") {
push @initrdAvailableKernelModules, "hv_storvsc";
$videoDriver = "fbdev";
push @attrs, "virtualisation.hypervGuest.enable = true;"
}


35 changes: 31 additions & 4 deletions nixos/modules/virtualisation/hyperv-guest.nix
Original file line number Diff line number Diff line change
@@ -9,20 +9,47 @@ in {
options = {
virtualisation.hypervGuest = {
enable = mkEnableOption "Hyper-V Guest Support";

videoMode = mkOption {
type = types.str;
default = "1152x864";
example = "1024x768";
description = ''
Resolution at which to initialize the video adapter.
Supports screen resolution up to Full HD 1920x1080 with 32 bit color
on Windows Server 2012, and 1600x1200 with 16 bit color on Windows
Server 2008 R2 or earlier.
'';
};
};
};

config = mkIf cfg.enable {
boot = {
initrd.kernelModules = [
"hv_balloon" "hv_netvsc" "hv_storvsc" "hv_utils" "hv_vmbus"
];

kernelParams = [
"video=hyperv_fb:${cfg.videoMode}"
];
};

environment.systemPackages = [ config.boot.kernelPackages.hyperv-daemons.bin ];

security.rngd.enable = false;

# enable hotadding memory
# enable hotadding cpu/memory
services.udev.packages = lib.singleton (pkgs.writeTextFile {
name = "hyperv-memory-hotadd-udev-rules";
destination = "/etc/udev/rules.d/99-hyperv-memory-hotadd.rules";
name = "hyperv-cpu-and-memory-hotadd-udev-rules";
destination = "/etc/udev/rules.d/99-hyperv-cpu-and-memory-hotadd.rules";
text = ''
ACTION="add", SUBSYSTEM=="memory", ATTR{state}="online"
# Memory hotadd
SUBSYSTEM=="memory", ACTION=="add", DEVPATH=="/devices/system/memory/memory[0-9]*", TEST=="state", ATTR{state}="online"
# CPU hotadd
SUBSYSTEM=="cpu", ACTION=="add", DEVPATH=="/devices/system/cpu/cpu[0-9]*", TEST=="online", ATTR{online}="1"
'';
});

Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ buildGo19Package {
buildFlagsArray = [ "-ldflags=" "-X main.version=${version}" ];

meta = with stdenv.lib; {
description = " GRV is a terminal interface for viewing git repositories";
description = "GRV is a terminal interface for viewing Git repositories";
homepage = https://github.com/rgburke/grv;
license = licenses.gpl3;
platforms = platforms.unix;