Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Hyper-V nixos instance
# configuration.nix for work hyper-v instance
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariable = true;
networking.hostName = "nixos-hyper-v"; # Define your hostname.
# Select internationalisation properties.
# i18n = {
# consoleFont = "Lat2-Terminus16";
# consoleKeyMap = "us";
# defaultLocale = "en_US.UTF-8";
# };
# Set your time zone.
time.timeZone = "US/West";
# List packages installed in system profile. To search by name, run:
# $ nix-env -qaP | grep wget
environment = {
systemPackages = with pkgs; [
binutils
cargo
cmake
direnv
docker
firefox
gcc7
ghc
git
gnumake
htop
ntfs3g
enlightenment.terminology
wget
which
];
};
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
programs = {
bash.enableCompletion = true;
mtr.enable = true;
gnupg.agent = { enable = true; enableSSHSupport = true; };
};
# Enable the X11 windowing system.
services.xserver = {
enable = true;
layout = "us";
videoDrivers = [ "fbdev" ];
displayManager.slim.enable = true;
windowManager.i3.enable = true;
# have i3 open terminology instead of default xterm
windowManager.i3.extraSessionCommands = "bindsym $mod+Return exec terminology";
};
# Define a user account. Don't forget to set a password with ‘passwd’.
users.extraUsers.jon = {
description = "Jon Ringer";
home = "/home/jon/";
isNormalUser = true;
shell = pkgs.bash;
extraGroups = ["wheel" "networkmanager" "docker"];
};
virtualisation.docker.enable = true;
# This value determines the NixOS release with which your system is to be
# compatible, in order to avoid breaking some software such as database
# servers. You should change this only after NixOS release notes say you
# should.
system.stateVersion = "18.09"; # Did you read the comment?
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment