summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--configuration.nix39
2 files changed, 40 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..577b0a0
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+hardware-configuration.nix
diff --git a/configuration.nix b/configuration.nix
new file mode 100644
index 0000000..fd96328
--- /dev/null
+++ b/configuration.nix
@@ -0,0 +1,39 @@
+{ config, lib, pkgs, ... }:
+
+{
+  imports =
+    [ # Include the results of the hardware scan.
+      ./hardware-configuration.nix
+    ];
+
+  boot.loader.grub.enable = true;
+  boot.loader.grub.device = "/dev/vda";
+
+  networking.hostName = "nixos";
+
+  time.timeZone = "Europe/Berlin";
+
+  users.users.admin = {
+    isNormalUser = true;
+    extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
+    openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJZxiAIsF13XqqxG0QzGFhT3iLDMsu2snb0wJOPUUq8e chris@deskpin" ];
+  };
+
+  environment.systemPackages = with pkgs; [
+    neovim    git
+    openssh
+  ];
+
+  services.openssh.enable = true;
+  services.openssh.settings.PasswordAuthentication = false;
+  security.sudo.wheelNeedsPassword = false;
+
+  networking.firewall.enable = true;
+  networking.firewall.allowedTCPPorts = [ 22 ];
+  networking.firewall.allowedUDPPorts = [ ];
+
+  system.copySystemConfiguration = true;
+  system.stateVersion = "24.11";
+
+}
+