commit 69a1c046219e33c662c3ca6d6273f4d57cfdc701 Author: Tristan Maat Date: Sat Nov 23 23:55:26 2019 +0000 Initial commit diff --git a/etc/nixos/configuration.nix b/etc/nixos/configuration.nix new file mode 100644 index 0000000..e10fadf --- /dev/null +++ b/etc/nixos/configuration.nix @@ -0,0 +1,47 @@ +{ config, pkgs, ... }; + +{ + imports = [ + ./hardware-configuration.nix + ./linode.nix + ]; + + networking = { + hostName = "tlater.net"; + + # useDHCP is deprecated + useDHCP = false; + # interfaces.enp0s31f6.useDHCP = true; + }; + + time.timeZone = "Europe/London"; + + users.users = { + tlater = { + isNormalUser = true; + extraGroups = [ "wheel" "docker" ]; + openssh.authorizedKeys.keys = []; + }; + + lauren = { + isNormalUser = true; + openssh.authorizedKeys.keys = []; + }; + }; + + environment.systemPackages = with pkgs; [ + ]; + + services = { + openssh = { + enable = true; + allowSFTP = false; + passwordAuthentication = false; + permitRootLogin = "no"; + ports = [ 2222 ]; + startWhenNeeded = true; + }; + }; + + system.stateVersion = "19.09"; +} diff --git a/etc/nixos/linode.nix b/etc/nixos/linode.nix new file mode 100644 index 0000000..c2f5fe6 --- /dev/null +++ b/etc/nixos/linode.nix @@ -0,0 +1,22 @@ +{ config, lib, pkgs, ... }; + +{ + # Required for the lish console + boot = { + kernelParams = [ "console=ttyS0,19200n8" ]; + }; + + boot.loader = { + # Timeout to allow lish to connect + timeout = 10; + + grub = { + device = "nodev"; + extraConfig = '' + serial --speed=19200 --unit=0 --word=8 --parity=no --stop=1; + terminal_input serial; + terminal_output serial; + ''; + }; + }; +}