mirror of
https://github.com/nickolaj-jepsen/nixos.git
synced 2026-01-23 08:26:49 +01:00
feat: add minilab
This commit is contained in:
parent
c16d6d1b4d
commit
30a41e2fec
23 changed files with 3194 additions and 21 deletions
|
|
@ -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
26
hosts/minilab/default.nix
Normal 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
|
||||||
|
];
|
||||||
|
}
|
||||||
62
hosts/minilab/disk-configuration.nix
Normal file
62
hosts/minilab/disk-configuration.nix
Normal 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
3021
hosts/minilab/facter.json
Normal file
File diff suppressed because it is too large
Load diff
14
hosts/minilab/monitors.nix
Normal file
14
hosts/minilab/monitors.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
_: {
|
||||||
|
monitors = [
|
||||||
|
{
|
||||||
|
name = "DP-2";
|
||||||
|
resolution = {
|
||||||
|
width = 1920;
|
||||||
|
height = 1200;
|
||||||
|
};
|
||||||
|
refreshRate = 60;
|
||||||
|
refreshRateNiri = 60.000;
|
||||||
|
transform = 1;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -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;
|
||||||
|
|
|
||||||
|
|
@ -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 = [
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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 [
|
|
||||||
# "github-copilot"
|
|
||||||
# ];
|
|
||||||
in {
|
in {
|
||||||
config = lib.mkIf (config.fireproof.desktop.enable && config.fireproof.dev.enable) {
|
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
pycharmPkg
|
pycharmPkg
|
||||||
];
|
];
|
||||||
};
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
|
||||||
|
|
@ -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";
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -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?ó
|
||||||
|
|
@ -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>NK&<26>Ž<'7¿Õ<>“³Fy<46><79>®
Wl‰(«–F†
|
||||||
Binary file not shown.
BIN
secrets/hosts/minilab/id_ed25519.age
Normal file
BIN
secrets/hosts/minilab/id_ed25519.age
Normal file
Binary file not shown.
1
secrets/hosts/minilab/id_ed25519.pub
Normal file
1
secrets/hosts/minilab/id_ed25519.pub
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ9deo7s6r6HaqpNfHigZX/cGI2eMxkNrgwwd9f+AU6t nickolaj@minilab
|
||||||
Loading…
Add table
Add a link
Reference in a new issue