refactor(3d): split printing and modeling modules
This commit is contained in:
+10
-24
@@ -1,31 +1,17 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{ lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.modules."3d";
|
||||
in
|
||||
{
|
||||
options.modules."3d" = {
|
||||
printing.enable = lib.mkEnableOption "3D printing tools";
|
||||
modeling.enable = lib.mkEnableOption "3D modeling tools";
|
||||
printing = {
|
||||
enable = lib.mkEnableOption "3D printing tools";
|
||||
};
|
||||
modeling = {
|
||||
enable = lib.mkEnableOption "3D modeling tools";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf cfg.printing.enable {
|
||||
home.packages = with pkgs; [
|
||||
orca-slicer
|
||||
];
|
||||
})
|
||||
(lib.mkIf cfg.modeling.enable {
|
||||
home.packages = with pkgs; [
|
||||
blender
|
||||
openscad-lsp
|
||||
openscad-unstable
|
||||
];
|
||||
})
|
||||
imports = [
|
||||
./printing.nix
|
||||
./modeling.nix
|
||||
];
|
||||
}
|
||||
|
||||
@@ -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