adds jupyter notebook service

This commit is contained in:
Moritz Böhme 2021-11-22 11:09:21 +01:00
parent f948ce6298
commit 33532253e6
2 changed files with 46 additions and 1 deletions

View file

@ -1,7 +1,14 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
{ {
imports = [ ./dunst ./agenix.nix ./diskstation ./picom.nix ./kdeconnect.nix ]; imports = [
./agenix.nix
./diskstation
./dunst
./jupyter.nix
./kdeconnect.nix
./picom.nix
];
services = { services = {
printing.enable = true; printing.enable = true;

View 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;
};
};
};
}