refactor(3d): split printing and modeling modules
This commit is contained in:
+10
-24
@@ -1,31 +1,17 @@
|
|||||||
{
|
{ lib, ... }:
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
let
|
|
||||||
cfg = config.modules."3d";
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
options.modules."3d" = {
|
options.modules."3d" = {
|
||||||
printing.enable = lib.mkEnableOption "3D printing tools";
|
printing = {
|
||||||
modeling.enable = lib.mkEnableOption "3D modeling tools";
|
enable = lib.mkEnableOption "3D printing tools";
|
||||||
|
};
|
||||||
|
modeling = {
|
||||||
|
enable = lib.mkEnableOption "3D modeling tools";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkMerge [
|
imports = [
|
||||||
(lib.mkIf cfg.printing.enable {
|
./printing.nix
|
||||||
home.packages = with pkgs; [
|
./modeling.nix
|
||||||
orca-slicer
|
|
||||||
];
|
|
||||||
})
|
|
||||||
(lib.mkIf cfg.modeling.enable {
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
blender
|
|
||||||
openscad-lsp
|
|
||||||
openscad-unstable
|
|
||||||
];
|
|
||||||
})
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
config = lib.mkIf config.modules."3d".modeling.enable {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
blender
|
||||||
|
openscad-lsp
|
||||||
|
openscad-unstable
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
config = lib.mkIf config.modules."3d".printing.enable {
|
||||||
|
home.packages = with pkgs; [ orca-slicer ];
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user