From 01f0ebfa324dda0a76743cbd50547aa49148afaf Mon Sep 17 00:00:00 2001 From: William Carroll Date: Thu, 20 Feb 2020 19:49:15 +0000 Subject: 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... --- nixos/configuration.nix | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 nixos/configuration.nix (limited to 'nixos') 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"; +} -- cgit 1.4.1