feat: add minilab

This commit is contained in:
Nickolaj Jepsen 2026-01-22 19:05:24 +01:00
parent c16d6d1b4d
commit 30a41e2fec
23 changed files with 3194 additions and 21 deletions

View file

@ -50,5 +50,6 @@ in {
homelab = mkSystem {host = ./homelab;}; homelab = mkSystem {host = ./homelab;};
bootstrap = mkSystem {host = ./bootstrap;}; bootstrap = mkSystem {host = ./bootstrap;};
desktop-wsl = mkSystem {host = ./desktop-wsl;}; desktop-wsl = mkSystem {host = ./desktop-wsl;};
minilab = mkSystem {host = ./minilab;};
}; };
} }

26
hosts/minilab/default.nix Normal file
View file

@ -0,0 +1,26 @@
{
config = {
fireproof = {
hostname = "minilab";
username = "nickolaj";
desktop = {
enable = true;
chromium.enable = false;
zed.enable = false;
};
dev = {
enable = true;
intellij.enable = false;
clickhouse.enable = false;
playwright.enable = false;
};
};
facter.reportPath = ./facter.json;
};
imports = [
./disk-configuration.nix
./monitors.nix
];
}

View file

@ -0,0 +1,62 @@
_: {
disko.devices = {
disk = {
main = {
device = "/dev/disk/by-id/mmc-hB8aP__0x1023fd20";
type = "disk";
content = {
type = "gpt";
partitions = {
boot = {
name = "boot";
size = "1M";
type = "EF02";
};
ESP = {
size = "512M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = ["defaults"];
};
};
luks = {
size = "100%";
content = {
type = "luks";
name = "crypted";
# Copied by deploy script, otherwise it will prompt for password
passwordFile = "/luks-password";
settings = {
allowDiscards = true;
bypassWorkqueues = true;
};
content = {
type = "btrfs";
extraArgs = ["-f"];
subvolumes = {
"@" = {
mountpoint = "/";
mountOptions = ["compress=zstd" "noatime"];
};
"@nix" = {
mountpoint = "/nix";
mountOptions = ["compress=zstd" "noatime"];
};
"@home" = {
mountpoint = "/home";
mountOptions = ["compress=zstd" "noatime"];
};
};
};
};
};
};
};
};
};
};
}

3021
hosts/minilab/facter.json Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,14 @@
_: {
monitors = [
{
name = "DP-2";
resolution = {
width = 1920;
height = 1200;
};
refreshRate = 60;
refreshRateNiri = 60.000;
transform = 1;
}
];
}

View file

@ -1,4 +1,8 @@
{lib, ...}: { {
config,
lib,
...
}: {
options.fireproof = { options.fireproof = {
hostname = lib.mkOption { hostname = lib.mkOption {
type = lib.types.str; type = lib.types.str;
@ -9,7 +13,24 @@
description = "The primary username for the machine"; description = "The primary username for the machine";
}; };
work.enable = lib.mkEnableOption "Enable work-related applications and tools"; work.enable = lib.mkEnableOption "Enable work-related applications and tools";
dev.enable = lib.mkEnableOption "Enable development tools and applications"; dev = {
enable = lib.mkEnableOption "Enable development tools and applications";
intellij.enable = lib.mkOption {
type = lib.types.bool;
default = config.fireproof.dev.enable;
description = "Enable IntelliJ-based IDEs";
};
clickhouse.enable = lib.mkOption {
type = lib.types.bool;
default = config.fireproof.dev.enable;
description = "Enable Clickhouse";
};
playwright.enable = lib.mkOption {
type = lib.types.bool;
default = config.fireproof.dev.enable;
description = "Enable Playwright";
};
};
hardware = { hardware = {
battery = lib.mkOption { battery = lib.mkOption {
type = lib.types.bool; type = lib.types.bool;

View file

@ -10,6 +10,16 @@
default = config.fireproof.desktop.enable; default = config.fireproof.desktop.enable;
description = "Enable window manager (niri) and dank material shell (dms)"; description = "Enable window manager (niri) and dank material shell (dms)";
}; };
chromium.enable = lib.mkOption {
type = lib.types.bool;
default = config.fireproof.desktop.enable;
description = "Enable Chromium";
};
zed.enable = lib.mkOption {
type = lib.types.bool;
default = config.fireproof.desktop.enable;
description = "Enable Zed editor";
};
}; };
imports = [ imports = [

View file

@ -5,7 +5,7 @@
pkgsUnstable, pkgsUnstable,
... ...
}: { }: {
config = lib.mkIf config.fireproof.desktop.enable { config = lib.mkIf (config.fireproof.desktop.enable && config.fireproof.desktop.chromium.enable) {
fireproof.home-manager.programs.chromium = { fireproof.home-manager.programs.chromium = {
enable = true; enable = true;
package = pkgsUnstable.chromium; package = pkgsUnstable.chromium;

View file

@ -5,7 +5,7 @@
pkgsUnstable, pkgsUnstable,
... ...
}: { }: {
config = lib.mkIf config.fireproof.dev.enable { config = lib.mkIf config.fireproof.dev.clickhouse.enable {
environment.systemPackages = [ environment.systemPackages = [
pkgsUnstable.clickhouse pkgsUnstable.clickhouse
pkgsUnstable.envsubst pkgsUnstable.envsubst

View file

@ -5,7 +5,7 @@
pkgsUnstable, pkgsUnstable,
... ...
}: { }: {
config = lib.mkIf config.fireproof.dev.enable { config = lib.mkIf config.fireproof.dev.playwright.enable {
fireproof.home-manager.programs.fish.shellInit = '' fireproof.home-manager.programs.fish.shellInit = ''
set -xg PLAYWRIGHT_BROWSERS_PATH ${pkgsUnstable.playwright-driver.browsers} set -xg PLAYWRIGHT_BROWSERS_PATH ${pkgsUnstable.playwright-driver.browsers}
set -xg PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS true set -xg PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS true

View file

@ -4,7 +4,8 @@
lib, lib,
pkgsUnstable, pkgsUnstable,
... ...
}: let }: {
config = lib.mkIf (config.fireproof.desktop.enable && config.fireproof.dev.intellij.enable) (let
pycharmPkg = pkgsUnstable.jetbrains.pycharm.override { pycharmPkg = pkgsUnstable.jetbrains.pycharm.override {
# -Dide.browser.jcef.enabled causes crashes on wayland # -Dide.browser.jcef.enabled causes crashes on wayland
vmopts = '' vmopts = ''
@ -13,13 +14,9 @@
-Xmx8G -Xmx8G
''; '';
}; };
# pycharmWithPlugins = pkgsUnstable.jetbrains.plugins.addPlugins pycharmPkg [ in {
# "github-copilot"
# ];
in {
config = lib.mkIf (config.fireproof.desktop.enable && config.fireproof.dev.enable) {
environment.systemPackages = [ environment.systemPackages = [
pycharmPkg pycharmPkg
]; ];
}; });
} }

View file

@ -5,7 +5,7 @@
pkgsUnstable, pkgsUnstable,
... ...
}: { }: {
config = lib.mkIf (config.fireproof.desktop.enable && config.fireproof.dev.enable) { config = lib.mkIf (config.fireproof.desktop.enable && config.fireproof.desktop.zed.enable) {
fireproof.home-manager.programs.zed-editor = { fireproof.home-manager.programs.zed-editor = {
enable = true; enable = true;
package = pkgsUnstable.zed-editor; package = pkgsUnstable.zed-editor;

View file

@ -45,6 +45,11 @@ in {
hostname = "x.nickolaj.com"; hostname = "x.nickolaj.com";
user = "nickolaj"; user = "nickolaj";
}; };
minilab = {
hostname = "10.0.0.7";
user = "nickolaj";
proxyJump = "homelab";
};
"forgejo.nickolaj.com" = { "forgejo.nickolaj.com" = {
hostname = "forgejo.nickolaj.com"; hostname = "forgejo.nickolaj.com";
user = "git"; user = "git";

View file

@ -0,0 +1,8 @@
age-encryption.org/v1
-> ssh-ed25519 RKq2dg nK9d86+E3FH/5psCjFqhL28Vh4oSMk9hA+Dlw2Sa1AY
Xc1V84VTZgyj/YFSuo4zSkej6YDoFzFfiRtEb5GXefs
-> K-grease : <mWPyN
Q2XuAjaUEReROoZqlZGyUw0XxDo6jvFDSENyoKb36MVHUrZHiaV/F2PsHJALh6oe
4Sg7+zk
--- szmTDIGaPDv6cCFXtZ3UIVzdTqItUn45UNJyI3IOFtQ
jˆ93<39>Ì<13>ªveam<0E>ï“a{Ë•þáá?R_²tá¿úñ° SUö,S^*b±uÅX̃“.A#Ëï/<ïפ"˜óˆá<CB86>ìU •軸¹'*9¹iG¦3_šM 9HT?ó

View file

@ -0,0 +1,7 @@
age-encryption.org/v1
-> ssh-ed25519 RKq2dg T8VpJqDF8uIqn0N4N1r3YiTDs+YaFMQxuBzcKHdLgEk
r7P19xgoF9YmbjSTBFG4KR3x7G0kBBqEf4GSSJnL6B4
-> Tj;vFK-grease |;W # Y)z4k
CNn8PrkPrwcRsA
--- CrTJgbVsaS9z0gDOtqzCyq+LnQBAN8q+PCHkG/kz280
ßf3"¡ÝÞÔ7ü?‰©à<C2A9>ïâC]刼âèŽaê<61>îj{ãÊòÝ€d.4±«Qo¢à´o?ô}˜c”êëÙ,ñX¹ ÁÄI®9'¹ucÄé7±ÃÏ œ”&-#’í².ønR®å:hbÚ°r±Î<E28098>'|þ Æ ‰=<3D>„BÕ0$ü<>õQ7À<37>‰Û …Y\V÷£ù®ôªãóÌ<Èœ{Êü¼âvŽúnÜÍg>¥4ż|aO <0B>qáÀI#KG)¹Õ¾¡—©…¬ENÒÓ>Dèлí[Hxv<78>¢Â爫T¹ ;ZŽ<æ§îJx¼/t¬ð<C2AC>ˆ{?¹:šyql<$a9D7õJtvýºÖï<>b‰s*/ZM>N K&<26>Ž<'7¿Õ<>“³Fy<46><79>® Wl‰(«F†

Binary file not shown.

View file

@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ9deo7s6r6HaqpNfHigZX/cGI2eMxkNrgwwd9f+AU6t nickolaj@minilab