container lab

This commit is contained in:
2026-09-10 15:27:03 +09:00
parent 37e2184d36
commit 691926aa4f
8 changed files with 94 additions and 32 deletions
+4
View File
@@ -373,6 +373,7 @@ modules/profiles/
│ ├── development/ │ ├── development/
│ ├── game/ │ ├── game/
│ ├── machine-learning/ │ ├── machine-learning/
│ ├── network-lab/
│ ├── personal/ │ ├── personal/
│ ├── photography/ │ ├── photography/
│ ├── server/ │ ├── server/
@@ -632,6 +633,7 @@ A host registry may use a specification like this:
"security.tpm-storage" "security.tpm-storage"
"workload.camera" "workload.camera"
"workload.development" "workload.development"
"workload.network-lab"
"workload.personal" "workload.personal"
]; ];
}; };
@@ -654,6 +656,7 @@ A host registry may use a specification like this:
"workload.development" "workload.development"
"workload.game" "workload.game"
"workload.machine-learning" "workload.machine-learning"
"workload.network-lab"
"workload.personal" "workload.personal"
"workload.photography" "workload.photography"
]; ];
@@ -692,6 +695,7 @@ uses dedicated NixOS partitions, LUKS, Secure Boot, and TPM-backed disk unlock.
It selects `workload.photography` for AI-enabled darktable. The application It selects `workload.photography` for AI-enabled darktable. The application
chooses CUDA support from the NVIDIA hardware unit's enable state and keeps chooses CUDA support from the NVIDIA hardware unit's enable state and keeps
the default CUDA targets, including RTX 3060 Ti support, to reuse binary caches. the default CUDA targets, including RTX 3060 Ti support, to reuse binary caches.
galleria and x1g13 select `workload.network-lab` for containerlab and Docker.
m2 is the daily-use macOS development and personal machine with the macOS m2 is the daily-use macOS development and personal machine with the macOS
interface defaults. Keep the desktop sessions independently selectable, and interface defaults. Keep the desktop sessions independently selectable, and
keep the development and personal profiles usable across NixOS and Darwin. keep the development and personal profiles usable across NixOS and Darwin.
Generated
+67 -32
View File
@@ -239,6 +239,24 @@
"type": "github" "type": "github"
} }
}, },
"containerlab": {
"inputs": {
"nixpkgs": "nixpkgs_4"
},
"locked": {
"lastModified": 1788902093,
"narHash": "sha256-BUwJClTgVrx1gOXFw89cUWFCB3jen3dd94DdlGusODc=",
"owner": "srl-labs",
"repo": "containerlab",
"rev": "72564c13516d19b81474a2b486cfc8e6b9c3ffc3",
"type": "github"
},
"original": {
"owner": "srl-labs",
"repo": "containerlab",
"type": "github"
}
},
"crane": { "crane": {
"locked": { "locked": {
"lastModified": 1784407669, "lastModified": 1784407669,
@@ -582,7 +600,7 @@
"inputs": { "inputs": {
"flake-compat": "flake-compat_2", "flake-compat": "flake-compat_2",
"home-manager": "home-manager_2", "home-manager": "home-manager_2",
"nixpkgs": "nixpkgs_4", "nixpkgs": "nixpkgs_5",
"systems": "systems_4", "systems": "systems_4",
"zig": "zig", "zig": "zig",
"zon2nix": "zon2nix" "zon2nix": "zon2nix"
@@ -627,7 +645,7 @@
"git-hooks-nix": { "git-hooks-nix": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_3", "flake-compat": "flake-compat_3",
"nixpkgs": "nixpkgs_5" "nixpkgs": "nixpkgs_6"
}, },
"locked": { "locked": {
"lastModified": 1788267358, "lastModified": 1788267358,
@@ -791,7 +809,7 @@
"inputs": { "inputs": {
"bun2nix": "bun2nix_2", "bun2nix": "bun2nix_2",
"flake-parts": "flake-parts_4", "flake-parts": "flake-parts_4",
"nixpkgs": "nixpkgs_6", "nixpkgs": "nixpkgs_7",
"systems": "systems_5", "systems": "systems_5",
"treefmt-nix": "treefmt-nix_3" "treefmt-nix": "treefmt-nix_3"
}, },
@@ -827,7 +845,7 @@
}, },
"nani-translate-linux": { "nani-translate-linux": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_7" "nixpkgs": "nixpkgs_8"
}, },
"locked": { "locked": {
"lastModified": 1786578029, "lastModified": 1786578029,
@@ -847,7 +865,7 @@
"inputs": { "inputs": {
"niri-stable": "niri-stable", "niri-stable": "niri-stable",
"niri-unstable": "niri-unstable", "niri-unstable": "niri-unstable",
"nixpkgs": "nixpkgs_8", "nixpkgs": "nixpkgs_9",
"nixpkgs-stable": "nixpkgs-stable", "nixpkgs-stable": "nixpkgs-stable",
"xwayland-satellite-stable": "xwayland-satellite-stable", "xwayland-satellite-stable": "xwayland-satellite-stable",
"xwayland-satellite-unstable": "xwayland-satellite-unstable" "xwayland-satellite-unstable": "xwayland-satellite-unstable"
@@ -978,7 +996,7 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_9" "nixpkgs": "nixpkgs_10"
}, },
"locked": { "locked": {
"lastModified": 1788335262, "lastModified": 1788335262,
@@ -998,7 +1016,7 @@
"nixos-wsl": { "nixos-wsl": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_5", "flake-compat": "flake-compat_5",
"nixpkgs": "nixpkgs_10" "nixpkgs": "nixpkgs_11"
}, },
"locked": { "locked": {
"lastModified": 1784642409, "lastModified": 1784642409,
@@ -1109,6 +1127,19 @@
} }
}, },
"nixpkgs_10": { "nixpkgs_10": {
"locked": {
"lastModified": 1767892417,
"narHash": "sha256-8bW3q88CEg2u4hSP66Vf4lpbLonHz7hqDNBMcCY7E9U=",
"rev": "3497aa5c9457a9d88d71fa93a4a8368816fbeeba",
"type": "tarball",
"url": "https://releases.nixos.org/nixos/unstable/nixos-26.05pre924538.3497aa5c9457/nixexprs.tar.xz"
},
"original": {
"type": "tarball",
"url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz"
}
},
"nixpkgs_11": {
"locked": { "locked": {
"lastModified": 1783776592, "lastModified": 1783776592,
"narHash": "sha256-UgCQzxeWI75XM8G+hPrPh+MKzEPjG3SpAj7dtqSbksA=", "narHash": "sha256-UgCQzxeWI75XM8G+hPrPh+MKzEPjG3SpAj7dtqSbksA=",
@@ -1124,7 +1155,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_11": { "nixpkgs_12": {
"locked": { "locked": {
"lastModified": 1788405554, "lastModified": 1788405554,
"narHash": "sha256-r2f1oUwixlgq9zOdYLqJLfS/lWBT60/IITjhTKI59JU=", "narHash": "sha256-r2f1oUwixlgq9zOdYLqJLfS/lWBT60/IITjhTKI59JU=",
@@ -1140,7 +1171,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_12": { "nixpkgs_13": {
"locked": { "locked": {
"lastModified": 1787900134, "lastModified": 1787900134,
"narHash": "sha256-5GWj0FI2uOwKNpXkmpWrSFDe1rCaNBCUQ8d+HDtFQPI=", "narHash": "sha256-5GWj0FI2uOwKNpXkmpWrSFDe1rCaNBCUQ8d+HDtFQPI=",
@@ -1153,7 +1184,7 @@
"url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.zst" "url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.zst"
} }
}, },
"nixpkgs_13": { "nixpkgs_14": {
"locked": { "locked": {
"lastModified": 1770107345, "lastModified": 1770107345,
"narHash": "sha256-tbS0Ebx2PiA1FRW8mt8oejR0qMXmziJmPaU1d4kYY9g=", "narHash": "sha256-tbS0Ebx2PiA1FRW8mt8oejR0qMXmziJmPaU1d4kYY9g=",
@@ -1169,7 +1200,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_14": { "nixpkgs_15": {
"locked": { "locked": {
"lastModified": 1787900134, "lastModified": 1787900134,
"narHash": "sha256-VYXO0XZlgj06dxJZRhrD3WoSsvq/c7+/Akyoa22pefw=", "narHash": "sha256-VYXO0XZlgj06dxJZRhrD3WoSsvq/c7+/Akyoa22pefw=",
@@ -1218,6 +1249,22 @@
} }
}, },
"nixpkgs_4": { "nixpkgs_4": {
"locked": {
"lastModified": 1787900134,
"narHash": "sha256-VYXO0XZlgj06dxJZRhrD3WoSsvq/c7+/Akyoa22pefw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "83199d0d373dd3ac2b9a1996b1d0263f76ab7a4c",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1787424095, "lastModified": 1787424095,
"narHash": "sha256-SpMiSe9OSfWseGAupsdcED3He9mTYTbGMtWb7EVt6pE=", "narHash": "sha256-SpMiSe9OSfWseGAupsdcED3He9mTYTbGMtWb7EVt6pE=",
@@ -1230,7 +1277,7 @@
"url": "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.zst" "url": "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.zst"
} }
}, },
"nixpkgs_5": { "nixpkgs_6": {
"locked": { "locked": {
"lastModified": 1787631388, "lastModified": 1787631388,
"narHash": "sha256-vMiXptXarfSdJb1Gkc+FYVOAibuBRj7qxGa8z68q1Uw=", "narHash": "sha256-vMiXptXarfSdJb1Gkc+FYVOAibuBRj7qxGa8z68q1Uw=",
@@ -1246,7 +1293,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_6": { "nixpkgs_7": {
"locked": { "locked": {
"lastModified": 1788372231, "lastModified": 1788372231,
"narHash": "sha256-7aqErvrAEz/5OcPA5p3M+tVOqeYc4oJXkNIPXfCqxAw=", "narHash": "sha256-7aqErvrAEz/5OcPA5p3M+tVOqeYc4oJXkNIPXfCqxAw=",
@@ -1262,7 +1309,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_7": { "nixpkgs_8": {
"locked": { "locked": {
"lastModified": 1785454630, "lastModified": 1785454630,
"narHash": "sha256-LQy14TZp77TwbQf40gg1V3jo8FwJG0jGDkAH+zRHqg8=", "narHash": "sha256-LQy14TZp77TwbQf40gg1V3jo8FwJG0jGDkAH+zRHqg8=",
@@ -1278,7 +1325,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_8": { "nixpkgs_9": {
"locked": { "locked": {
"lastModified": 1785828668, "lastModified": 1785828668,
"narHash": "sha256-8fsyqeO+mJqvIzeO4xIpgJe/f7MTbbVTEC6RT6WSXNs=", "narHash": "sha256-8fsyqeO+mJqvIzeO4xIpgJe/f7MTbbVTEC6RT6WSXNs=",
@@ -1294,19 +1341,6 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_9": {
"locked": {
"lastModified": 1767892417,
"narHash": "sha256-8bW3q88CEg2u4hSP66Vf4lpbLonHz7hqDNBMcCY7E9U=",
"rev": "3497aa5c9457a9d88d71fa93a4a8368816fbeeba",
"type": "tarball",
"url": "https://releases.nixos.org/nixos/unstable/nixos-26.05pre924538.3497aa5c9457/nixexprs.tar.xz"
},
"original": {
"type": "tarball",
"url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz"
}
},
"nixvim": { "nixvim": {
"inputs": { "inputs": {
"flake-parts": "flake-parts_5", "flake-parts": "flake-parts_5",
@@ -1332,7 +1366,7 @@
}, },
"noctalia": { "noctalia": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_12" "nixpkgs": "nixpkgs_13"
}, },
"locked": { "locked": {
"lastModified": 1788556054, "lastModified": 1788556054,
@@ -1423,6 +1457,7 @@
"browser-previews": "browser-previews", "browser-previews": "browser-previews",
"codex-desktop-linux": "codex-desktop-linux", "codex-desktop-linux": "codex-desktop-linux",
"codex-session-usage": "codex-session-usage", "codex-session-usage": "codex-session-usage",
"containerlab": "containerlab",
"disko": "disko", "disko": "disko",
"flake-parts": "flake-parts_3", "flake-parts": "flake-parts_3",
"ghostty": "ghostty", "ghostty": "ghostty",
@@ -1437,7 +1472,7 @@
"nix-index-database": "nix-index-database", "nix-index-database": "nix-index-database",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixos-wsl": "nixos-wsl", "nixos-wsl": "nixos-wsl",
"nixpkgs": "nixpkgs_11", "nixpkgs": "nixpkgs_12",
"nixpkgs-unstable": "nixpkgs-unstable", "nixpkgs-unstable": "nixpkgs-unstable",
"nixvim": "nixvim", "nixvim": "nixvim",
"noctalia": "noctalia", "noctalia": "noctalia",
@@ -1884,7 +1919,7 @@
}, },
"treefmt-nix_4": { "treefmt-nix_4": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_13" "nixpkgs": "nixpkgs_14"
}, },
"locked": { "locked": {
"lastModified": 1786901030, "lastModified": 1786901030,
@@ -1902,7 +1937,7 @@
}, },
"vicinae": { "vicinae": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_14", "nixpkgs": "nixpkgs_15",
"numen": "numen", "numen": "numen",
"soulver-cpp": "soulver-cpp", "soulver-cpp": "soulver-cpp",
"systems": "systems_9" "systems": "systems_9"
+1
View File
@@ -114,6 +114,7 @@
nani-translate-linux.url = "git+https://github.com/zunoser/nani-translate-linux.git"; nani-translate-linux.url = "git+https://github.com/zunoser/nani-translate-linux.git";
containerlab.url = "github:srl-labs/containerlab";
}; };
outputs = outputs =
+2
View File
@@ -91,6 +91,7 @@
"security.tpm-storage" "security.tpm-storage"
"workload.development" "workload.development"
"workload.game" "workload.game"
"workload.network-lab"
"workload.personal" "workload.personal"
]; ];
@@ -116,6 +117,7 @@
"workload.development" "workload.development"
"workload.game" "workload.game"
"workload.machine-learning" "workload.machine-learning"
"workload.network-lab"
"workload.personal" "workload.personal"
"workload.photography" "workload.photography"
"workload.camera" "workload.camera"
@@ -0,0 +1,8 @@
{ inputs, ... }:
{
description = "Container-based networking labs";
includes = [ "services.docker" ];
imports.nixos = [ inputs.containerlab.nixosModules.default ];
}
@@ -0,0 +1,3 @@
{
programs.containerlab.enable = true;
}
+4
View File
@@ -41,6 +41,7 @@ required on every supported host.
| `workload.development` | NixOS, macOS with Home Manager | | `workload.development` | NixOS, macOS with Home Manager |
| `workload.game` | NixOS, macOS | | `workload.game` | NixOS, macOS |
| `workload.machine-learning` | NixOS with Home Manager | | `workload.machine-learning` | NixOS with Home Manager |
| `workload.network-lab` | NixOS |
| `workload.personal` | NixOS, macOS with Home Manager | | `workload.personal` | NixOS, macOS with Home Manager |
| `workload.photography` | NixOS with Home Manager | | `workload.photography` | NixOS with Home Manager |
| `workload.remote-access` | NixOS, macOS | | `workload.remote-access` | NixOS, macOS |
@@ -74,6 +75,9 @@ Neovim, Yazi, and the remaining interactive command-line tools.
`workload.machine-learning` provides the Hugging Face Hub CLI for hosts used `workload.machine-learning` provides the Hugging Face Hub CLI for hosts used
to download and publish machine learning models and datasets. to download and publish machine learning models and datasets.
`workload.network-lab` provides containerlab using its upstream NixOS module
and the Docker service. It is selected by galleria and x1g13.
`workload.photography` provides darktable with AI support from the locked `workload.photography` provides darktable with AI support from the locked
unstable package set. Its ONNX Runtime uses CUDA when the NVIDIA hardware unit unstable package set. Its ONNX Runtime uses CUDA when the NVIDIA hardware unit
is enabled, and CPU inference otherwise. Keep the default CUDA capabilities is enabled, and CPU inference otherwise. Keep the default CUDA capabilities
@@ -0,0 +1,5 @@
{
description = "Container-based network lab environment";
includes = [ "applications.containerlab" ];
}