about summary refs log tree commit diff
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-02-20T19·49+0000
committerWilliam Carroll <wpcarro@gmail.com>2020-02-20T19·49+0000
commit01f0ebfa324dda0a76743cbd50547aa49148afaf (patch)
treed2c7ce1d8d1942b6d6cbff53cdfd394bfd75f895
parent66c38f86564a2338b265f0e4f2e913f2e8416c59 (diff)
Support basic nixos/configuration.nix
I'm attempting to configure an old Acer laptop that I bought at a used
electronics store in Shepherd's Bush (~100GBP) as my server. I'd like to install
NixOS on it. The configuration.nix herein defines a starting point for the
configuration for that machine. It isn't currently working.

Troubleshooting and solutions forthcoming...
-rw-r--r--nixos/configuration.nix35
1 files changed, 35 insertions, 0 deletions
diff --git a/nixos/configuration.nix b/nixos/configuration.nix
new file mode 100644
index 000000000000..197007abe29d
--- /dev/null
+++ b/nixos/configuration.nix
@@ -0,0 +1,35 @@
+{ config, pkgs, ... }:
+
+# TODO(wpcarro): Refactor to prefer nested attribute for configuration values
+# instead of using one-liner field accessors.
+{
+  imports = [
+    ./hardware-configuration.nix
+  ];
+
+  # TODO(wpcarro): Is this correct? I believe my laptop only supports BIOS and
+  # not UEFI.
+  boot.loader.grub.device = "/dev/sda";
+
+  networking.hostName = "socrates";
+  networking.wireless.enable = true;
+  # Don't remove this.
+  networking.useDHCP = false;
+  networking.interfaces.enp2s0f1.useDHCP = true;
+  networking.interfaces.wlp3s0.useDHCP = true;
+
+  time.timeZone = "UTC";
+
+  environment.systemPackages = with pkgs; [
+    emacs
+  ];
+
+  services.openssh.enable = true;
+
+  users.users.wpcarro = {
+    isNormalUser = true;
+    extraGroups = [ "wheel" ];
+  };
+
+  system.stateVersion = "20.09";
+}