adds jupyter notebook service
This commit is contained in:
parent
f948ce6298
commit
33532253e6
2 changed files with 46 additions and 1 deletions
|
@ -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;
|
||||
|
|
38
modules/services/jupyter.nix
Normal file
38
modules/services/jupyter.nix
Normal file
|
@ -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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue