2024-11-14 01:43:04 +01:00
|
|
|
|
{ config, lib, pkgs, inputs, ... }:
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
imports = [ # Include the results of the hardware scan.
|
|
|
|
|
./hardware.nix
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
# Configure Nix
|
|
|
|
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
2024-11-21 16:15:18 +01:00
|
|
|
|
nix.settings.trusted-users=[ "remotebuild" ];
|
2024-11-16 03:50:36 +01:00
|
|
|
|
nix.settings.trusted-public-keys = [
|
|
|
|
|
"cache.HyperC:90YNJ0eWsuBGVVP989lJh1rL8C0KM6IKbAtEUiu+FCU="
|
|
|
|
|
];
|
2024-11-14 01:43:04 +01:00
|
|
|
|
nix.package = pkgs.lix;
|
|
|
|
|
nixpkgs.overlays = [ inputs.nix-minecraft.overlay ];
|
|
|
|
|
|
|
|
|
|
# Use the GRUB 2 boot loader.
|
|
|
|
|
boot.loader.grub.enable = true;
|
|
|
|
|
boot.loader.grub.efiSupport = true;
|
|
|
|
|
boot.loader.grub.devices = [ "nodev" ];
|
|
|
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
|
|
|
|
|
|
|
|
|
# Define your hostname.
|
2025-01-01 22:51:10 +01:00
|
|
|
|
networking.hostName = "kb-game-01";
|
2024-11-14 01:43:04 +01:00
|
|
|
|
|
|
|
|
|
# Set your time zone.
|
|
|
|
|
time.timeZone = "Europe/Amsterdam";
|
|
|
|
|
|
|
|
|
|
# Configure keymap in X11
|
|
|
|
|
services.xserver.xkb.layout = "us";
|
|
|
|
|
|
|
|
|
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
|
|
|
|
users.users.master = {
|
|
|
|
|
openssh.authorizedKeys.keys = [
|
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKLbU0GpeqkYOsccsddQgZAppd5SFiokGAfjKr+dEEjY kb HyperC"
|
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHS3DoQe/4TtdTLD/Fl41rTjE0n5MyFMl59VGVejcskO kb voloxo"
|
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPpN/3esM0SFLJ2guCBOYX8IdBC+jUiMF+xPYkTEuzbe kb-work yerukall"
|
2024-11-21 02:34:45 +01:00
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMN1LWMOfFtRKkSLIA/XTj3KYm7OG2bjqEmGXj0gmDc7 kb@LoyAdjo"
|
2024-12-11 23:56:54 +01:00
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIE7W8FUUvM8rUGK6qV3XOIxR0y/pdyo9z5HZNzOADs5+ kb@Rubtrm"
|
2025-01-01 22:51:10 +01:00
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILgfAxGyxjNOZyuUZIlwVCzj/mBM9uM7apNDzEJ3g+F+ kb@LANA9C"
|
2024-11-14 01:43:04 +01:00
|
|
|
|
];
|
|
|
|
|
isNormalUser = true;
|
|
|
|
|
extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
|
|
|
|
packages = with pkgs; [
|
|
|
|
|
vim
|
2025-01-26 02:42:29 +01:00
|
|
|
|
sops
|
2024-11-14 01:43:04 +01:00
|
|
|
|
];
|
|
|
|
|
};
|
|
|
|
|
|
2024-11-16 03:50:36 +01:00
|
|
|
|
users.users.remotebuild = {
|
|
|
|
|
isNormalUser = true;
|
|
|
|
|
openssh.authorizedKeys.keys = [
|
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBHdxVb42GEb/rwrsQx/Wc2v2P+WIq8/WNlF+l31Rl/a Remotebuilds from HyperC"
|
2024-12-11 23:59:12 +01:00
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL/WONflZXVoZd8I4HdNMXNtoYELnCaxqdFY0QKDXXS9 Remotebuilds from Rubtrm"
|
2025-01-26 02:42:29 +01:00
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJqjdhtK0xeJcHwwCAia6I+WuZCkN9pUS21MNjJ2jOuc Remotebuilds from LANA9Z"
|
2024-11-16 03:50:36 +01:00
|
|
|
|
];
|
|
|
|
|
};
|
|
|
|
|
|
2024-11-14 01:43:04 +01:00
|
|
|
|
# List packages installed in system profile. To search, run:
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
|
vim
|
|
|
|
|
wget
|
|
|
|
|
git
|
2024-12-14 02:28:33 +01:00
|
|
|
|
tree
|
2024-11-14 01:43:04 +01:00
|
|
|
|
];
|
|
|
|
|
|
2025-01-26 02:42:29 +01:00
|
|
|
|
# Default Editor
|
|
|
|
|
programs.vim.enable = true;
|
|
|
|
|
programs.vim.defaultEditor = true;
|
|
|
|
|
|
|
|
|
|
# Sops Secrets Config
|
|
|
|
|
sops.defaultSopsFormat = "yaml";
|
|
|
|
|
sops.age.keyFile = "/home/master/.config/sops/age/keys.txt";
|
|
|
|
|
|
2024-11-14 01:43:04 +01:00
|
|
|
|
# SSH and Mosh
|
|
|
|
|
services.openssh = {
|
|
|
|
|
enable = true;
|
|
|
|
|
settings.PasswordAuthentication = false;
|
|
|
|
|
settings.KbdInteractiveAuthentication = false;
|
|
|
|
|
ports = [ 3422 ];
|
|
|
|
|
openFirewall = true;
|
|
|
|
|
};
|
|
|
|
|
programs.mosh.enable = true;
|
|
|
|
|
|
|
|
|
|
# Minecraft Servers
|
|
|
|
|
services.minecraft = {
|
2024-12-14 02:28:33 +01:00
|
|
|
|
enable = true;
|
2024-11-23 15:22:48 +01:00
|
|
|
|
servers.velocity.enable = true;
|
2024-11-14 01:43:04 +01:00
|
|
|
|
servers.survival.enable = true;
|
|
|
|
|
};
|
|
|
|
|
|
2024-12-04 23:31:13 +01:00
|
|
|
|
# Forgejo Runner
|
2025-01-09 23:00:25 +01:00
|
|
|
|
services.forgejo-runner.enable = true;
|
2024-12-04 23:31:13 +01:00
|
|
|
|
|
2024-12-11 02:31:30 +01:00
|
|
|
|
# Binary Cache
|
2025-01-26 02:42:29 +01:00
|
|
|
|
services.binary-cache.enable = false; # No Binary-Cache, when there are Secrets in the /nix/store
|
2024-11-16 03:50:36 +01:00
|
|
|
|
|
2025-01-09 23:00:25 +01:00
|
|
|
|
# Enable QUEMU Quest Agent
|
|
|
|
|
services.qemuGuest.enable = true;
|
|
|
|
|
|
2024-11-14 01:43:04 +01:00
|
|
|
|
# Do NOT change this value
|
|
|
|
|
system.stateVersion = "24.05"; # Did you read the comment?
|
|
|
|
|
}
|
|
|
|
|
|