about summary refs log tree commit diff
path: root/users/flokli/nixos
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2023-10-29T16·28+0200
committerflokli <flokli@flokli.de>2023-10-29T16·31+0000
commit48b6242313f9ecbc49a9e768f59a966348f6446c (patch)
tree19e4f51e7bd4f049f9e412c8528df640059f85fd /users/flokli/nixos
parent12fb5004d9033ca50579deddcdb5ee0160a296fd (diff)
feat(users/flokli/nixos): init archeology r/6903
Change-Id: Ic31cb8030179ff37b1cc3d3d9241e2582cfe3e5e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9833
Tested-by: BuildkiteCI
Reviewed-by: edef <edef@edef.eu>
Autosubmit: flokli <flokli@flokli.de>
Diffstat (limited to 'users/flokli/nixos')
-rw-r--r--users/flokli/nixos/.skip-subtree0
-rw-r--r--users/flokli/nixos/archeology/OWNERS1
-rw-r--r--users/flokli/nixos/archeology/configuration.nix35
-rw-r--r--users/flokli/nixos/archeology/hardware-configuration.nix36
-rw-r--r--users/flokli/nixos/default.nix16
5 files changed, 88 insertions, 0 deletions
diff --git a/users/flokli/nixos/.skip-subtree b/users/flokli/nixos/.skip-subtree
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/users/flokli/nixos/.skip-subtree
diff --git a/users/flokli/nixos/archeology/OWNERS b/users/flokli/nixos/archeology/OWNERS
new file mode 100644
index 000000000000..b9bc074a8020
--- /dev/null
+++ b/users/flokli/nixos/archeology/OWNERS
@@ -0,0 +1 @@
+edef
diff --git a/users/flokli/nixos/archeology/configuration.nix b/users/flokli/nixos/archeology/configuration.nix
new file mode 100644
index 000000000000..9f7bebdad6d5
--- /dev/null
+++ b/users/flokli/nixos/archeology/configuration.nix
@@ -0,0 +1,35 @@
+{ depot, pkgs, lib, ... }:
+
+{
+  imports =
+    [
+      # Include the results of the hardware scan.
+      # ./hardware-configuration.nix
+      (depot.path.origSrc + "/users/flokli/nixos/archeology/hardware-configuration.nix")
+    ];
+
+  # Use the TVL binary cache
+  tvl.cache.enable = true;
+
+  # Use the GRUB 2 boot loader.
+  boot.loader.grub.enable = true;
+  boot.loader.grub.device = "/dev/vda";
+
+  boot.kernelParams = [ "console=ttyS0" ];
+
+  services.clickhouse.enable = true;
+
+  networking.hostName = "archeology";
+
+  services.openssh.enable = true;
+
+  users.users.root.openssh.authorizedKeys.keys = [
+    "cert-authority ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCvb/7ojfcbKvHIyjnrNUOOgzy44tCkgXY9HLuyFta1jQOE9pFIK19B4dR9bOglPKf145CCL0mSFJNNqmNwwavU2uRn+TQrW+U1dQAk8Gt+gh3O49YE854hwwyMU+xD6bIuUdfxPr+r5al/Ov5Km28ZMlHOs3FoAP0hInK+eAibioxL5rVJOtgicrOVCkGoXEgnuG+LRbOYTwzdClhRUxiPjK8alCbcJQ53AeZHO4G6w9wTr+W5ILCfvW4OmUXCX01sKzaBiQuuFCF6M/H4LlnsPWLMra2twXxkOIhZblwC+lncps9lQaUgiD4koZeOCORvHW00G0L39ilFbbnVcL6Itp/m8RRWm/xRxS4RMnsdV/AhvpRLrhL3lfQ7E2oCeSM36v1S9rdg6a47zcnpL+ahG76Gz39Y7KmVRQciNx7ezbwxj3Q5lZtFykgdfGIAN+bT8ijXMO6m68g60i9Bz4IoMZGkiJGqMYLTxMQ+oRgR3Ro5lbj7E11YBHyeimoBYXYGHMkiuxopQZ7lIj3plxIzhmUlXJBA4jMw9KGHdYaLhaicIYhvQmCTAjrkt2HvxEe6lU8iws2Qv+pB6tAGundN36RVVWAckeQPZ4ZsgDP8V2FfibZ1nsrQ+zBKqaslYMAHs01Cf0Hm0PnCqagf230xaobu0iooNuXx44QKoDnB+w== edef"
+    "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPTVTXOutUZZjXLB0lUSgeKcSY/8mxKkC0ingGK1whD2 flokli"
+  ];
+
+  system.stateVersion = "23.05"; # Did you read the comment?
+
+  environment.systemPackages = [ pkgs.helix pkgs.kakoune pkgs.tmux ];
+}
+
diff --git a/users/flokli/nixos/archeology/hardware-configuration.nix b/users/flokli/nixos/archeology/hardware-configuration.nix
new file mode 100644
index 000000000000..8410df79d205
--- /dev/null
+++ b/users/flokli/nixos/archeology/hardware-configuration.nix
@@ -0,0 +1,36 @@
+{ config, lib, pkgs, modulesPath, ... }:
+
+{
+  imports =
+    [
+      (modulesPath + "/profiles/qemu-guest.nix")
+    ];
+
+  boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ];
+  boot.initrd.kernelModules = [ ];
+  boot.kernelModules = [ "kvm-amd" ];
+  boot.extraModulePackages = [ ];
+
+  fileSystems."/" =
+    {
+      device = "/dev/disk/by-partlabel/root";
+      fsType = "xfs";
+    };
+
+  fileSystems."/boot" =
+    {
+      device = "/dev/disk/by-partlabel/boot";
+      fsType = "vfat";
+    };
+
+  swapDevices = [ ];
+
+  # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
+  # (the default) this is the recommended approach. When using systemd-networkd it's
+  # still possible to use this option, but it's recommended to use it in conjunction
+  # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
+  networking.useDHCP = lib.mkDefault true;
+  # networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
+
+  nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
+}
diff --git a/users/flokli/nixos/default.nix b/users/flokli/nixos/default.nix
new file mode 100644
index 000000000000..6a182a269e5c
--- /dev/null
+++ b/users/flokli/nixos/default.nix
@@ -0,0 +1,16 @@
+{ depot, pkgs, lib, ... }:
+
+let
+  inherit (depot.users.flokli.nixos)
+    archeology;
+
+  systemFor = sys: (depot.ops.nixos.nixosFor sys).system;
+
+in
+{
+  archeologySystem = (depot.ops.nixos.nixosFor ({ modulesPath, ... }: {
+    imports = [
+      ./archeology/configuration.nix
+    ];
+  })).config.system.build.toplevel;
+}