2013-07-22 04:07:17 -07:00
|
|
|
{ config, pkgs, ... }:
|
2013-11-27 05:08:23 -08:00
|
|
|
|
2013-07-22 04:07:17 -07:00
|
|
|
{
|
2014-01-31 08:38:54 -08:00
|
|
|
imports = [
|
|
|
|
./hardware-configuration.nix
|
|
|
|
./sdk.nix
|
|
|
|
];
|
2013-11-27 05:08:23 -08:00
|
|
|
|
|
|
|
# Use the GRUB 2 boot loader.
|
|
|
|
boot.loader.grub.enable = true;
|
|
|
|
boot.loader.grub.version = 2;
|
|
|
|
boot.loader.grub.device = "/dev/sda";
|
|
|
|
|
2014-01-30 14:00:41 -08:00
|
|
|
# hostname
|
|
|
|
networking.hostName = "CycleSDK";
|
2013-11-27 05:08:23 -08:00
|
|
|
|
|
|
|
# Enable the OpenSSH daemon.
|
|
|
|
services.openssh.enable = true;
|
|
|
|
|
2014-01-31 08:38:54 -08:00
|
|
|
# Virtualbox guest
|
2014-01-31 03:28:11 -08:00
|
|
|
services.virtualbox.enable = true;
|
|
|
|
|
2013-11-27 05:08:23 -08:00
|
|
|
# Enable DBus
|
|
|
|
services.dbus.enable = true;
|
|
|
|
|
2014-01-30 14:00:41 -08:00
|
|
|
# Enable postgres
|
|
|
|
services.postgresql = {
|
|
|
|
enable = true;
|
|
|
|
package = pkgs.postgresql93;
|
|
|
|
enableTCPIP = true;
|
|
|
|
authentication = pkgs.lib.mkForce ''
|
|
|
|
local all all trust
|
|
|
|
host all all 127.0.0.1/32 trust
|
|
|
|
'';
|
|
|
|
initialScript = "/etc/nixos/init.psql";
|
|
|
|
};
|
|
|
|
|
2013-11-27 05:08:23 -08:00
|
|
|
# Default packages
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
git
|
|
|
|
];
|
|
|
|
|
|
|
|
# Creates a "vagrant" users with password-less sudo access
|
2013-07-22 04:07:17 -07:00
|
|
|
users = {
|
|
|
|
extraGroups = [ { name = "vagrant"; } { name = "vboxsf"; } ];
|
|
|
|
extraUsers = [ {
|
|
|
|
description = "Vagrant User";
|
|
|
|
name = "vagrant";
|
|
|
|
group = "vagrant";
|
|
|
|
extraGroups = [ "users" "vboxsf" "wheel" ];
|
|
|
|
password = "vagrant";
|
|
|
|
home = "/home/vagrant";
|
|
|
|
createHome = true;
|
|
|
|
useDefaultShell = true;
|
|
|
|
openssh.authorizedKeys.keys = [
|
|
|
|
"ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ== vagrant insecure public key"
|
|
|
|
];
|
|
|
|
} ];
|
|
|
|
};
|
2013-11-27 05:08:23 -08:00
|
|
|
|
2014-01-31 03:28:11 -08:00
|
|
|
security.sudo.configFile = ''
|
|
|
|
Defaults:root,%wheel env_keep+=LOCALE_ARCHIVE
|
|
|
|
Defaults:root,%wheel env_keep+=NIX_PATH
|
|
|
|
Defaults:root,%wheel env_keep+=TERMINFO_DIRS
|
|
|
|
Defaults env_keep+=SSH_AUTH_SOCK
|
|
|
|
Defaults lecture = never
|
|
|
|
root ALL=(ALL) SETENV: ALL
|
|
|
|
%wheel ALL=(ALL) NOPASSWD: ALL, SETENV: ALL
|
|
|
|
'';
|
2013-11-27 05:08:23 -08:00
|
|
|
|
2013-07-22 04:07:17 -07:00
|
|
|
}
|