summary refs log tree commit diff
path: root/infra/nixos/configuration.nix
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2019-07-02T11·48+0100
committerVincent Ambo <tazjin@google.com>2019-07-02T11·48+0100
commite03f0630523d708e144cf340bb00dfd957e167b6 (patch)
tree6041b0ac0ddab2028488d6abf117bb783bae78ca /infra/nixos/configuration.nix
parent915a2f8464348e024e7d802b63d9f18eabd828e3 (diff)
parenta131b3051428d3abe220d172f93d09880b96222f (diff)
merge(infra): Embed infrastructure configuration into monorepo r/9
This contains DNS and NixOS module configuration.
Diffstat (limited to 'infra/nixos/configuration.nix')
-rw-r--r--infra/nixos/configuration.nix53
1 files changed, 53 insertions, 0 deletions
diff --git a/infra/nixos/configuration.nix b/infra/nixos/configuration.nix
new file mode 100644
index 000000000000..1de11a16f9b6
--- /dev/null
+++ b/infra/nixos/configuration.nix
@@ -0,0 +1,53 @@
+# This file contains basic configuration for all *.tazj.in Nix machines.
+
+{ config, pkgs, ... }:
+
+{
+  boot.loader.grub.enable = true;
+  boot.loader.grub.version = 2;
+  boot.loader.grub.device = "/dev/sda";
+
+  boot.initrd.availableKernelModules = [
+    "ata_piix"
+    "mptspi"
+    "sd_mod"
+    "sr_mod"
+  ];
+
+  # Configure root disk
+  fileSystems."/" = {
+    device = "/dev/disk/by-label/nixos";
+    fsType = "ext4";
+  };
+
+  services.vmwareGuest.enable = true;
+  services.vmwareGuest.headless = true;
+
+  time.timeZone = "Europe/Oslo";
+
+  environment.systemPackages = with pkgs; [
+    curl emacs htop
+  ];
+
+  services.openssh.enable = true;
+
+  networking.firewall.enable = true;
+  networking.firewall.allowedTCPPorts = [ 22 80 443 ];
+
+  users.extraUsers.vincent = {
+    isNormalUser = true;
+    uid = 1000;
+    extraGroups = [ "wheel" ];
+  };
+
+  security.sudo = {
+    enable = true;
+    extraConfig = "%wheel ALL=(ALL) NOPASSWD: ALL";
+  };
+
+  # 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 = "17.09"; # Did you read the comment?
+}