diff --git a/modules/services/default.nix b/modules/services/default.nix index 26cf3a4..254e93c 100644 --- a/modules/services/default.nix +++ b/modules/services/default.nix @@ -1,7 +1,14 @@ { config, lib, pkgs, ... }: { - imports = [ ./dunst ./agenix.nix ./diskstation ./picom.nix ./kdeconnect.nix ]; + imports = [ + ./agenix.nix + ./diskstation + ./dunst + ./jupyter.nix + ./kdeconnect.nix + ./picom.nix + ]; services = { printing.enable = true; diff --git a/modules/services/jupyter.nix b/modules/services/jupyter.nix new file mode 100644 index 0000000..0c70dd9 --- /dev/null +++ b/modules/services/jupyter.nix @@ -0,0 +1,38 @@ +{ config, lib, pkgs, ... }: + +{ + # Create jupyter user + users.users.jupyter.group = "jupyter"; + users.users.jupyter.isSystemUser = true; + users.groups.jupyter = { }; + + services.jupyter = { + enable = true; + password = + "'argon2:$argon2id$v=19$m=10240,t=10,p=8$rILNOtQ9WhacuEhV5zW2CQ$Gvbql8TEqBxPhKeMVwKZPQ'"; + kernels = { + python3 = + let + env = pkgs.python3.withPackages (pythonPackages: + with pythonPackages; [ + ipykernel + pandas + scikit-learn + ]); + in + { + displayName = "Python 3 for machine learning"; + argv = [ + "${env.interpreter}" + "-m" + "ipykernel_launcher" + "-f" + "{connection_file}" + ]; + language = "python"; + logo32 = null; + logo64 = null; + }; + }; + }; +}