feat: add scruffy vm

This commit is contained in:
Kyle Brown 2024-06-11 17:00:42 -07:00
parent 0832f7f743
commit e1e44a06ed
4 changed files with 107 additions and 5 deletions

View file

@ -109,11 +109,6 @@
{home-manager.users.kdb424 = ./home-manager/machines/amy.nix;}
];
# Small intel server
kif = mkHeadlessNixos [
./hosts/kif
];
# Ryzen Fifth gen
planex = mkNixos [
./hosts/planex
@ -129,6 +124,16 @@
calculon = mkHeadlessNixos [
./hosts/calculon
];
# Epyc VM
kif = mkHeadlessNixos [
./hosts/kif
];
# Epyc VM
scruffy = mkHeadlessNixos [
./hosts/scruffy
];
};
darwinConfigurations = {

38
hosts/scruffy/default.nix Normal file
View file

@ -0,0 +1,38 @@
{
config,
lib,
pkgs,
inputs,
outputs,
home-manager,
...
}: {
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
../../common/nixos/common.nix
../../common/networking/zerotier.nix
../../common/editors/emacs.nix
../../common/nixos/docker.nix
];
# Bootloader.
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/sda";
boot.loader.grub.useOSProber = true;
networking.hostName = "scruffy";
# Enable networking
networking.networkmanager.enable = true;
# Enable the OpenSSH daemon.
services.openssh.enable = true;
services.earlyoom.enable = true;
# Proxmox additions
services.qemuGuest.enable = true;
# Latest stable kernel
boot.kernelPackages = pkgs.linuxPackages_latest;
}

View file

@ -0,0 +1,43 @@
{
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 = [];
boot.extraModulePackages = [];
fileSystems."/" = {
device = "/dev/disk/by-uuid/b8f1e3d1-b2d7-4100-a1af-01b1f63f8e5a";
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.enp6s0.useDHCP = lib.mkDefault true;
# networking.interfaces.enp9s0f0.useDHCP = lib.mkDefault true;
# networking.interfaces.enp9s0f1.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
zramSwap = {
enable = true;
memoryPercent = 25;
priority = 10;
};
boot.tmp.useTmpfs = true;
}

16
hosts/scruffy/zfs.nix Normal file
View file

@ -0,0 +1,16 @@
{
config,
lib,
pkgs,
inputs,
outputs,
...
}: {
imports = [
../../common/nixos/zfs.nix
];
networking.hostId = "4b0bddd5";
boot.zfs.extraPools = ["inland"];
services.zfs.autoSnapshot.enable = true;
}