New host: VEGAS.backbone.privatevoid.net

This commit is contained in:
Max Headroom 2021-10-16 18:34:11 +02:00
parent 08ed0802e9
commit 6729a1f338
5 changed files with 117 additions and 8 deletions

View file

@ -49,8 +49,12 @@
mkNixOS = mkNixOS' lib;
in {
nixosModules = aspect.modules;
nixosConfigurations =
(lib.genAttrs [ "styx" "meet" "git" ] mkNixOS);
nixosConfigurations = lib.genAttrs [
"styx"
"meet"
"git"
"VEGAS"
] mkNixOS;
deploy.nodes = with deploy-rs-lib; {
styx = {
@ -74,6 +78,14 @@
path = activate.nixos self.nixosConfigurations.git;
};
};
VEGAS = {
hostname = "vegas.backbone.privatevoid.net";
profiles.system = {
user = "root";
sshUser = "deploy";
path = activate.nixos self.nixosConfigurations.VEGAS;
};
};
};
packages.${system} = import ./packages {

24
hosts/VEGAS/default.nix Normal file
View file

@ -0,0 +1,24 @@
tools: {
ssh.id = with tools.dns; {
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICz2nGA+Y4OxhMKsV6vKIns3hOoBkK557712h7FfWXcE";
hostNames = subResolve "vegas" "backbone";
};
interfaces = {
primary = {
addr = "95.216.8.12";
link = "enp0s31f6";
};
vstub = {
addr = "10.1.0.1";
link = "vstub";
};
};
enterprise = {
subdomain = "backbone";
};
nixos = import ./system.nix;
}

View file

@ -0,0 +1,37 @@
# 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 = [ "ahci" ];
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/1f8327a2-ece6-4e87-895c-b75253ecc584";
fsType = "xfs";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/4c709e5b-9a94-4899-b1f9-abbcc4c8264c";
fsType = "ext4";
};
fileSystems."/srv/storage" =
{ device = "/dev/disk/by-uuid/344d2a7a-d219-45f9-b382-1ef934c2c1be";
fsType = "xfs";
};
fileSystems."/srv/storage/machines/storage" =
{ device = "/dev/disk/by-uuid/a8b21373-2702-4dec-8009-02f74391cf58";
fsType = "xfs";
};
swapDevices = [ ];
}

41
hosts/VEGAS/system.nix Normal file
View file

@ -0,0 +1,41 @@
{ aspect, config, inputs, lib, pkgs, tools, ... }:
{
imports =
[
# Hardware
./hardware-configuration.nix
]
# TODO: fix users
# ++ (import ../../users "server").groups.admin
++ aspect.sets.backbone;
# Use the GRUB 2 boot loader.
boot.loader.grub.enable = true;
boot.loader.grub.version = 2;
boot.loader.grub.device = "/dev/sda";
networking.hostName = "VEGAS";
networking.domain = "backbone.${tools.meta.domain}";
time.timeZone = "Europe/Helsinki";
networking.useDHCP = false;
networking.interfaces.enp0s31f6.useDHCP = true;
i18n.defaultLocale = "en_US.UTF-8";
services.openssh.enable = true;
networking.firewall.enable = true;
system.stateVersion = "21.05";
services.openssh.passwordAuthentication = false;
systemd.additionalUpstreamSystemUnits = [
"systemd-journald@.service"
"systemd-journald@.socket"
"systemd-journald-varlink@.socket"
];
}

View file

@ -6,14 +6,9 @@ in with tools.dns; {
styx = import ./styx tools;
meet = import ./meet tools;
git = import ./git tools;
VEGAS = import ./VEGAS tools;
# Non-NixOS machine metadata
VEGAS = {
ssh.id = {
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICz2nGA+Y4OxhMKsV6vKIns3hOoBkK557712h7FfWXcE";
hostNames = subResolve "vegas" "backbone";
};
};
AnimusAlpha = let hostNames = [ "alpha.animus.com" "animus.com" ]; in {
ssh.id = {
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGpFR47Ev+W+bdng6IrDVpl8rlKBBHSr1v5lwJmZcEFH";