From 0932b22d61118b05762d8f2ce42b71ddcb0760fc Mon Sep 17 00:00:00 2001 From: john bargman Date: Sat, 9 Sep 2023 20:21:59 +0100 Subject: initial server config --- openstack.nix | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 openstack.nix (limited to 'openstack.nix') diff --git a/openstack.nix b/openstack.nix new file mode 100644 index 0000000..ebf4eca --- /dev/null +++ b/openstack.nix @@ -0,0 +1,31 @@ +{ config, lib, pkgs, modulesPath, ... }: +{ + nix = { + settings.trusted-users = [ "root" "commander" ]; + package = pkgs.nixUnstable; + extraOptions = '' + experimental-features = nix-command flakes + ''; + }; + # Set your time zone. + time.timeZone = "Europe/London"; + + # Select internationalisation properties. + i18n.defaultLocale = "en_GB.UTF-8"; + console = { + font = "Lat2-Terminus16"; + keyMap = "uk"; + }; + # Enable the OpenSSH daemon. + services.openssh.enable = true; + services.openssh.ports = [ 1108 22 ]; + services.openssh.settings.PermitRootLogin = lib.mkForce "no"; + services.openssh.settings.PasswordAuthentication = false; + # Open ports in the firewall. + networking.firewall.allowedTCPPorts = [ 1108 22 ]; + networking.firewall.allowedUDPPorts = [ ]; + + # Configure keymap in X11 + services.xserver.layout = "gb"; + system.stateVersion = "22.11"; +} -- cgit v1.2.3