feat: Calculon (hydra) VM added

This commit is contained in:
Kyle Brown 2024-01-15 22:13:43 -08:00
parent 2db68e1f79
commit a4be972be1
5 changed files with 86 additions and 3 deletions

View file

@ -6,15 +6,22 @@
outputs,
...
}: {
networking.firewall = {
enable = true;
allowedTCPPorts = [3001];
};
services.hydra = {
enable = true;
port = 3001;
hydraURL = "http://localhost:3000"; # externally visible URL
hydraURL = "https://hydra.kdb424.xyz"; # externally visible URL
notificationSender = "hydra@localhost"; # e-mail of hydra service
# a standalone hydra will require you to unset the buildMachinesFiles list to avoid using a nonexistant /etc/nix/machines
buildMachinesFiles = [];
# buildMachinesFiles = [];
# you will probably also want, otherwise *everything* will be built from scratch
useSubstitutes = true;
extraConfig = ''
base_uri = https://hydra.kdb424.xyz
'';
};
nix.buildMachines = [
{

View file

@ -120,10 +120,15 @@
{home-manager.users.kdb424 = ./home-manager/machines/planex.nix;}
];
# Ryzen Second gen
# Epyc VM
morbo = mkHeadlessNixos [
./hosts/morbo
];
# Epyc VM
calculon = mkHeadlessNixos [
./hosts/calculon
];
};
darwinConfigurations = {

View file

@ -0,0 +1,29 @@
{
config,
lib,
pkgs,
inputs,
outputs,
home-manager,
...
}: {
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
../../common/nixos/common.nix
../../common/nixos/hydra.nix
../../common/networking/zerotier.nix
];
# Bootloader.
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/sda";
boot.loader.grub.useOSProber = true;
networking.hostName = "calculon";
# Enable networking
networking.networkmanager.enable = true;
# Enable the OpenSSH daemon.
services.openssh.enable = true;
}

View file

@ -0,0 +1,36 @@
# 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 = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/abf4c24f-5999-44ed-b412-e40dc98a71ac";
fsType = "ext4";
};
swapDevices = [ ];
# 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.ens18.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
zramSwap = {
enable = true;
memoryPercent = 25;
priority = 10;
};
}

View file

@ -32,4 +32,10 @@
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
zramSwap = {
enable = true;
memoryPercent = 25;
priority = 10;
};
}