diff options
author | Emile <git@emile.space> | 2024-03-26 10:30:12 +0100 |
---|---|---|
committer | Emile <git@emile.space> | 2024-03-26 10:32:37 +0100 |
commit | cb20d078360ec9235b9b3a78d7950ded1f601267 (patch) | |
tree | 52d5ab591c843d9a7e888369f8315410c86e2203 /nix/hosts/corrino/www/jupyter.emile.space.nix | |
parent | dfed6d17ebc3494fc783b7a345b342d59e4e325a (diff) |
ports.nix file containing the used ports in a central location
Done and deployed in the 15min train ride to the office, quick and easy!
Diffstat (limited to 'nix/hosts/corrino/www/jupyter.emile.space.nix')
-rw-r--r-- | nix/hosts/corrino/www/jupyter.emile.space.nix | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/nix/hosts/corrino/www/jupyter.emile.space.nix b/nix/hosts/corrino/www/jupyter.emile.space.nix index d1d951c..18e56a0 100644 --- a/nix/hosts/corrino/www/jupyter.emile.space.nix +++ b/nix/hosts/corrino/www/jupyter.emile.space.nix @@ -1,22 +1,24 @@ -{ pkgs, lib, config, ... }: +{ pkgs, config, ... }: -{ +let + ports = import ../ports.nix; +in { services.nginx.virtualHosts."jupyter.emile.space" = { forceSSL = true; enableACME = true; locations = { "/" = { - proxyPass = "http://127.0.0.1:8004"; + proxyPass = "http://127.0.0.1:${toString config.services.jupyter.port}"; }; }; }; - services.jupyter = rec { + services.jupyter = { enable = true; ip = "127.0.0.1"; - port = 8004; + port = ports.jupyter; # ; python3 # >>> from notebook.auth import passwd @@ -57,4 +59,4 @@ users.users.jupyter.group = "jupyter"; users.groups.jupyter = {}; -} \ No newline at end of file +} |