Revisions
-
infinisil revised this gist
Sep 14, 2017 . 1 changed file with 1 addition and 4 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -47,13 +47,10 @@ in serviceConfig = with cfg; { User = cfg.localUser; ExecStart = "${pkgs.python34Packages.notebook}/bin/jupyter-notebook"; RestartSec = 10; Restart = "on-failure"; }; }; }; } -
Nekroze created this gist
May 19, 2016 .There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,59 @@ { config, lib, pkgs, ... }: with lib; let cfg = config.services.jupyter; in { ###### interface options = { services.jupyter = { enable = mkOption { type = types.bool; default = false; description = '' Whether to enable the jupyter notebook server. ''; }; localUser = mkOption { description = '' Local user to execute as. ''; }; }; }; ###### implementation config = mkIf cfg.enable { environment.systemPackages = with pkgs.python34Packages; [ jupyter_core jupyter_client notebook ipywidgets ]; systemd.services.jupyter = { description = '' Jupyter notebook web server service ''; wantedBy = [ "multi-user.target" ]; serviceConfig = with cfg; { User = cfg.localUser; RestartSec = 10; Restart = "on-failure"; }; script = with pkgs.python34Packages; '' export PYTHONPATH=$PYTHONPATH:${ipywidgets}/lib/python3.4/site-packages /run/current-system/sw/bin/jupyter-notebook ''; }; }; } This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ # This would be imported by /etc/nixos/configuration.nix { config, ... }: { import [ ./jupyter.nix ]; services.jupyter = { enable = true; localUser = "nekroze"; }; }