Skip to content

Instantly share code, notes, and snippets.

@LnL7
Created September 16, 2017 22:05
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LnL7/bdc8ca02e75e9e215e85f8714f93cd92 to your computer and use it in GitHub Desktop.
Save LnL7/bdc8ca02e75e9e215e85f8714f93cd92 to your computer and use it in GitHub Desktop.
nixos vagrant configuration
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
# Use the GRUB 2 boot loader.
boot.loader.grub.enable = true;
boot.loader.grub.version = 2;
boot.loader.grub.devices = [ "/dev/sda" ];
# networking.hostName = "nixos"; # Define your hostname.
# List packages installed in system profile. To search by name, run:
# $ nix-env -qaP | grep wget
environment.systemPackages = with pkgs; [
vim nix-repl
];
# Enable the OpenSSH daemon.
services.openssh.enable = true;
security.sudo.wheelNeedsPassword = false;
# Define a user account. Don't forget to set a password with ‘passwd’.
users.users.vagrant = {
isNormalUser = true;
uid = 1000;
extraGroups = [ "wheel" ];
password = "vagrant";
openssh.authorizedKeys.keys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ== vagrant insecure public key" ];
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment