summaryrefslogtreecommitdiff
path: root/configuration
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2024-12-29 20:26:12 +0100
committerMel <einebeere@gmail.com>2024-12-29 20:38:23 +0100
commitf7d86625faff70ffc5447cc8f4fd44b987b8c197 (patch)
treecbc4d71f2e3112819be85bec8c86dd506ac4f491 /configuration
parentf4368190f65902ef4e539774623afa25b2831b87 (diff)
downloadspecimen-f7d86625faff70ffc5447cc8f4fd44b987b8c197.tar.zst
specimen-f7d86625faff70ffc5447cc8f4fd44b987b8c197.zip
Generated system configuration from Hetzner server
Signed-off-by: Mel <einebeere@gmail.com>
Diffstat (limited to 'configuration')
-rw-r--r--configuration/configuration.nix30
-rw-r--r--configuration/devices.nix25
-rw-r--r--configuration/hardware.nix42
3 files changed, 95 insertions, 2 deletions
diff --git a/configuration/configuration.nix b/configuration/configuration.nix
index c7d053b..2280b7d 100644
--- a/configuration/configuration.nix
+++ b/configuration/configuration.nix
@@ -1,5 +1,31 @@
-{ ... }:
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}:
{
- # nothing here for now :)
+ imports = [
+ ./hardware.nix
+ ./devices.nix
+ ];
+
+ networking.hostName = "specimen";
+ time.timeZone = "Europe/Berlin";
+ i18n.defaultLocale = "en_US.UTF-8";
+
+ users.users.mel = {
+ isNormalUser = true;
+ extraGroups = [ "wheel" ];
+ };
+
+ environment.systemPackages = with pkgs; [
+ vim
+ wget
+ ];
+
+ services.openssh.enable = true;
+
+ system.stateVersion = "24.11";
}
diff --git a/configuration/devices.nix b/configuration/devices.nix
new file mode 100644
index 0000000..d643f9c
--- /dev/null
+++ b/configuration/devices.nix
@@ -0,0 +1,25 @@
+{ ... }:
+
+{
+ boot.loader = {
+ systemd-boot.enable = true;
+ efi.canTouchEfiVariables = true;
+ };
+
+ networking = {
+ useDHCP = false;
+ # these are Hetzner's DNS servers.
+ nameservers = [
+ "2a01:4ff:ff00::add:1"
+ "2a01:4ff:ff00::add:2"
+ ];
+ };
+
+ systemd.network.enable = true;
+ systemd.network.networks."10-wan" = {
+ name = "enp1s0";
+ DHCP = "no";
+ address = [ "2a01:4f8:c2c:cd93::1" ];
+ routes = [ { Gateway = "fe80::1"; } ];
+ };
+}
diff --git a/configuration/hardware.nix b/configuration/hardware.nix
new file mode 100644
index 0000000..ed7c4a7
--- /dev/null
+++ b/configuration/hardware.nix
@@ -0,0 +1,42 @@
+{
+ config,
+ lib,
+ pkgs,
+ modulesPath,
+ ...
+}:
+
+{
+ imports = [
+ (modulesPath + "/profiles/qemu-guest.nix")
+ ];
+
+ boot.initrd.availableKernelModules = [
+ "xhci_pci"
+ "virtio_scsi"
+ "sr_mod"
+ ];
+ boot.initrd.kernelModules = [ ];
+ boot.kernelModules = [ ];
+ boot.extraModulePackages = [ ];
+
+ fileSystems."/" = {
+ device = "/dev/disk/by-uuid/d48dd0f5-a41c-47d4-a0b9-acfad95c8e99";
+ fsType = "ext4";
+ };
+
+ fileSystems."/boot" = {
+ device = "/dev/disk/by-uuid/9506-1A24";
+ fsType = "vfat";
+ options = [
+ "fmask=0077"
+ "dmask=0077"
+ ];
+ };
+
+ swapDevices = [
+ { device = "/dev/disk/by-uuid/5097c4ba-3b7f-4cce-a674-9cedb3fbc052"; }
+ ];
+
+ nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
+}