summaryrefslogtreecommitdiff
path: root/configuration.nix
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-06-30 16:19:19 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2024-06-30 20:30:29 -0400
commit29c9bae8f0c17f00fd28201d49ed3b69052626c8 (patch)
tree5a2ea2816b6c5cb40c0ef849329658771de5da53 /configuration.nix
Provision ktest ci farm serversHEADmaster
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'configuration.nix')
-rw-r--r--configuration.nix125
1 files changed, 125 insertions, 0 deletions
diff --git a/configuration.nix b/configuration.nix
new file mode 100644
index 0000000..8bb2a7c
--- /dev/null
+++ b/configuration.nix
@@ -0,0 +1,125 @@
+{ lib, config, pkgs, modulesPath, ... }:
+let
+ kentSshKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICzXYZ0uwhhyOeHSBHSGQF+Y++qyoLEuyWnmF3/BJ5jp kent";
+ ciSshKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBoe/bwC67CzRrnWzAP/qMeiVzp0RhHxFkLzM1DSxuvw ci";
+in
+{
+ imports =
+ [ (modulesPath + "/installer/scan/not-detected.nix")
+ ];
+
+ boot.initrd.availableKernelModules = [ "nvme" ];
+ boot.initrd.kernelModules = [ ];
+ boot.kernelModules = [ ];
+ boot.extraModulePackages = [ ];
+
+ fileSystems."/" =
+ { device = "/dev/disk/by-label/root";
+ fsType = "xfs";
+ };
+
+ fileSystems."/boot" =
+ { device = "/dev/disk/by-label/boot";
+ fsType = "vfat";
+ options = [ "fmask=0077" "dmask=0077" ];
+ };
+
+ swapDevices = [ ];
+
+ networking.useDHCP = lib.mkDefault true;
+ nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
+ boot.swraid.enable = true;
+
+ boot.loader.systemd-boot.enable = true;
+ boot.loader.efi.canTouchEfiVariables = false;
+
+ networking.hostName = "nixos";
+
+ console = {
+ font = "Lat2-Terminus16";
+ keyMap = "dvorak";
+ };
+
+ i18n.defaultLocale = "en_US.UTF-8";
+
+ services.openssh.enable = true;
+
+ users.users = {
+ root = {
+ openssh.authorizedKeys.keys = [ kentSshKey ];
+ };
+
+ kent = {
+ isNormalUser = true;
+ openssh.authorizedKeys.keys = [ kentSshKey ];
+ };
+
+ testdashboard = {
+ isNormalUser = true;
+ openssh.authorizedKeys.keys = [ ciSshKey ];
+ };
+ };
+
+ environment.systemPackages = with pkgs; [
+ pciutils
+ killall
+ file
+ schedtool
+ nix-prefetch-github
+ usbutils
+ lsof
+ smem
+ sysstat
+ wget
+ gnupg
+ git
+ htop
+ moreutils
+
+ direnv
+ tmux
+
+ irssi
+ vim
+
+ # ktest / dev
+ brotli
+ config.boot.kernelPackages.perf
+ getopt
+ flex
+ bison
+ gcc
+ clang
+ gdb
+ gnumake
+ bc
+ pkg-config
+ binutils
+ (python3.withPackages (p: with p; [ ply GitPython ]))
+ pahole
+ qemu
+ nixos-shell
+ minicom
+ socat
+ vde2
+ elfutils
+ ncurses
+ openssl
+ zlib
+ lcov
+ ];
+
+ nix = {
+ daemonCPUSchedPolicy = "idle";
+ settings = {
+ auto-optimise-store = true;
+ trusted-users = [ "@wheel" ];
+ };
+ extraOptions = ''
+ experimental-features = nix-command flakes
+ '';
+ };
+
+ system.stateVersion = "22.05";
+}
+