hetzner_benchmark: init (#21)

Reviewed-on: https://codeberg.org/leana8959/.files/pulls/21
Co-authored-by: Léana 江 <leana.jiang+git@icloud.com>
Co-committed-by: Léana 江 <leana.jiang+git@icloud.com>
This commit is contained in:
Primrose 2025-11-08 05:50:00 +01:00 committed by Léana
parent 5fa1113757
commit fb1f6624f9
10 changed files with 398 additions and 1 deletions

View file

@ -0,0 +1,23 @@
{
programs.git = {
enable = true;
signing.signByDefault = false; # no need to setup the key
};
programs.gpg.enable = true;
nix = {
settings = {
extra-substituters = [
"https://ghc-nix.cachix.org"
"https://haskell-language-server.cachix.org"
"https://cache.iog.io"
];
extra-trusted-public-keys = [
"ghc-nix.cachix.org-1:ziC/I4BPqeA4VbtOFpFpu6D1t6ymFvRWke/lc2+qjcg="
"haskell-language-server.cachix.org-1:juFfHrwkOxqIOZShtC4YC1uT1bBcq2RSvC7OMKx0Nz8="
"hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ="
];
};
};
}

View file

@ -0,0 +1,54 @@
# TODO: remove some packages for this machine
{
pkgs,
lib,
config,
...
}:
{
home.sessionVariables =
let
fishCfg = config.programs.fish;
in
{
"SHELL" = lib.mkIf fishCfg.enable (lib.getExe fishCfg.package);
};
home.packages = [
pkgs.stow
pkgs.zip
pkgs.unzip
pkgs.gnutar
pkgs.p7zip
pkgs.bc
pkgs.dig
pkgs.hutils
# pretty tui tools
pkgs.du-dust
pkgs.tokei
pkgs.hyperfine
pkgs.watchexec
pkgs.onefetch
pkgs.just
];
programs = {
neovim = {
enable = true;
defaultEditor = true;
};
lazygit.enable = true;
fish.enable = true;
starship.enable = true;
tmux.enable = true;
direnv.enable = true;
ripgrep.enable = true;
btop.enable = true;
};
services = {
gpg-agent.enable = true;
};
}

View file

@ -0,0 +1,35 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"nvme"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
# 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.enp41s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -0,0 +1,13 @@
{
boot.loader.grub.enable = true;
services.openssh.enable = true;
users.users = {
"root".openssh.authorizedKeys.keys = import ../../../identities.nix ++ [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFza3UN1gWQqh//FkJBzmssQ4lxHdllQGfqPHzG4LQI8 benchmark-machine"
];
};
system.stateVersion = "25.05";
}