added more servers waow :3

This commit is contained in:
foxora 2026-05-21 00:38:01 +01:00
parent 75152e3d89
commit 7bdf539d5a
9 changed files with 408 additions and 75 deletions

106
hosts/lunata/default.nix Normal file
View file

@ -0,0 +1,106 @@
{pkgs, ...}: {
imports = [
./hardware-configuration.nix
];
boot = {
# kernel is defined in `groups/servers/default.nix`
kernelParams = ["console=ttyS0,19200n8"];
loader = {
timeout = 10;
grub = {
enable = true;
forceInstall = true;
device = "nodev";
extraConfig = ''
serial --speed=19200 --unit=0 --word=8 --parity=no --stop=1;
terminal_input serial;
terminal_output serial
'';
};
};
};
networking.hostName = "lunata";
networking = {
networkmanager.enable = true;
usePredictableInterfaceNames = false;
useDHCP = false;
interfaces.eth0 = {
useDHCP = true;
# linode expects ipv6 privacy extensions to be disabled:
# https://www.linode.com/docs/guides/manual-network-configuration/#static-vs-dynamic-addressing
tempAddress = "disabled";
};
nftables.enable = true;
firewall = {
enable = true;
allowedTCPPorts = [
4070
];
allowedUDPPorts = [];
};
};
time.timeZone = "Europe/London";
i18n.defaultLocale = "en_US.UTF-8";
console = {
font = "Lat2-Terminus16";
keyMap = "us";
};
services = {
openssh = {
enable = true;
ports = [4070];
settings = {
PasswordAuthentication = false;
PermitRootLogin = "no";
AllowUsers = ["foxora"];
UseDns = false; # enables rDNS lookup
X11Forwarding = false;
};
};
};
users.users.foxora = {
isNormalUser = true;
extraGroups = ["wheel"];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDyGwJ782W9Bk9u9kFqY6Ky8KxOvwna32dppOcAgT8n9 aurora@nixarawrui"
];
packages = with pkgs; [];
};
programs = {
nh = {
enable = true;
clean.enable = true;
clean.extraArgs = "--keep-since 7d --keep 3";
};
};
environment = {
systemPackages = with pkgs; [
neovim
git
wget
];
variables = {
EDITOR = "nvim";
};
};
system.stateVersion = "25.11";
}

View file

@ -0,0 +1,31 @@
# 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 + "/profiles/qemu-guest.nix")
];
boot.initrd.availableKernelModules = ["virtio_pci" "virtio_scsi" "ahci" "sd_mod"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["virtio_net"];
boot.extraModulePackages = [];
fileSystems."/" = {
device = "/dev/sda";
fsType = "ext4";
autoResize = true;
};
swapDevices = [
{device = "/dev/sdb";}
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}