refactor(modules/nixos): move stuff around
All checks were successful
/ check (push) Successful in 9s
/ check-renovaterc (push) Successful in 3s
/ build-packages (push) Successful in 14s
/ build-vm (push) Successful in 1s
/ report-size (push) Successful in 4s

This makes the module a bit clearer and easier to extend.
This commit is contained in:
Jalil David Salamé Messina 2025-03-21 17:50:23 +01:00
parent 673f989e99
commit 917d131cde
Signed by: jalil
GPG key ID: F016B9E770737A0B
9 changed files with 374 additions and 359 deletions

18
modules/nixos/dev.nix Normal file
View file

@ -0,0 +1,18 @@
{ lib, config, ... }:
let
cfg = config.jconfig.dev;
in
{
config = lib.mkIf (config.jconfig.enable && cfg.enable) {
# Enable dev documentation
documentation.dev = { inherit (cfg) enable; };
users.extraUsers = lib.mkIf cfg.jupyter.enable { jupyter.group = "jupyter"; };
services.jupyter = {
inherit (cfg.jupyter) enable;
group = "jupyter";
user = "jupyter";
};
};
}