feat: added midnight miner

This commit is contained in:
Nick 2025-11-13 18:56:52 -06:00
parent f2a69dcd0e
commit 009ad1223a
4 changed files with 14 additions and 35 deletions

View file

@ -121,30 +121,7 @@ in
"${phobos.name}-${user0}" = {
imports = builtins.attrValues {
inherit (modules)
bitwarden
cli
element
emote
espanso
feishin
flameshot
floorp
ghostty
gnomeCalculator
haskell
imageViewing
libreOffice
mpv
obsidian
okular
signal
systemMonitor
theming
tor
usbImager
vesktop
virtManager
zed
;
};
};

View file

@ -37,8 +37,8 @@ in
phobos = {
imports = builtins.attrValues {
inherit (modules)
plasma
sddm
microvm
midnight
;
};
};

View file

@ -12,11 +12,12 @@ let
ceres = devices.ceres.name;
eris = devices.eris.name;
deimos = devices.deimos.name;
phobos = devices.phobos.name;
hostname = config.networking.hostName;
deviceLogic =
var0: var1: var2: var3:
var0: var1: var2: var3: var4:
if hostname == ceres then
var0
else if hostname == eris then
@ -25,10 +26,12 @@ let
var2
else if hostname == deimos then
var3
else if hostname == phobos then
var4
else
var0;
macOctet = deviceLogic "57" "58" "59" "60";
macOctet = deviceLogic "57" "58" "59" "60" "61";
in
{
microvm = {
@ -38,7 +41,7 @@ in
config =
let
macAddress = "02:00:00:00:00:${macOctet}";
workers = deviceLogic 45 4 20 6;
workers = deviceLogic 45 4 20 6 2;
in
{
environment.systemPackages = [
@ -68,7 +71,7 @@ in
mac = macAddress;
}
];
mem = deviceLogic 52100 5120 22000 1024;
mem = deviceLogic 52100 5120 22000 1024 7168;
shares = [
{
mountPoint = "/nix/.ro-store";