From cef5106e1c19b42ab68c72f67ae0a4cfedb6d25d Mon Sep 17 00:00:00 2001 From: Alexandru Scvortov Date: Thu, 25 Jul 2024 17:13:34 +0100 Subject: [PATCH 1/3] maintainers: add scvalex --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index cba9fce1d529..5c0de4aae087 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -18222,6 +18222,12 @@ githubId = 11587657; keys = [ { fingerprint = "E173 237A C782 296D 98F5 ADAC E13D FD4B 4712 7951"; } ]; }; + scvalex = { + name = "Alexandru Scvorțov"; + email = "github@abstractbinary.org"; + github = "scvalex"; + githubId = 2588; + }; sdaqo = { name = "sdaqo"; email = "sdaqo.dev@protonmail.com"; From f147a306d52417ea577d9b61405af1de3f39e150 Mon Sep 17 00:00:00 2001 From: Alexandru Scvortov Date: Thu, 25 Jul 2024 17:15:36 +0100 Subject: [PATCH 2/3] livebook: add munksgaard and scvalex as maintainers --- nixos/modules/services/development/livebook.nix | 5 ++++- pkgs/servers/web-apps/livebook/default.nix | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/nixos/modules/services/development/livebook.nix b/nixos/modules/services/development/livebook.nix index c7a6e3537579..937d854d4dc5 100644 --- a/nixos/modules/services/development/livebook.nix +++ b/nixos/modules/services/development/livebook.nix @@ -98,5 +98,8 @@ in }; }; - meta.doc = ./livebook.md; + meta = { + doc = ./livebook.md; + maintainers = with lib.maintainers; [ munksgaard scvalex ]; + }; } diff --git a/pkgs/servers/web-apps/livebook/default.nix b/pkgs/servers/web-apps/livebook/default.nix index 990f658ce9f7..8e8e0b997464 100644 --- a/pkgs/servers/web-apps/livebook/default.nix +++ b/pkgs/servers/web-apps/livebook/default.nix @@ -36,7 +36,7 @@ beamPackages.mixRelease rec { license = licenses.asl20; homepage = "https://livebook.dev/"; description = "Automate code & data workflows with interactive Elixir notebooks"; - maintainers = with maintainers; [ munksgaard ]; + maintainers = with maintainers; [ munksgaard scvalex ]; platforms = platforms.unix; }; } From 742ee97845df9afa82cd51c54c81f8388a9deed1 Mon Sep 17 00:00:00 2001 From: Alexandru Scvortov Date: Thu, 25 Jul 2024 14:28:25 +0100 Subject: [PATCH 3/3] livebook: fix service not starting when LIVEBOOK_COOKIE was not set --- nixos/modules/services/development/livebook.nix | 7 +++++++ nixos/tests/livebook-service.nix | 5 +---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/nixos/modules/services/development/livebook.nix b/nixos/modules/services/development/livebook.nix index 937d854d4dc5..859083635201 100644 --- a/nixos/modules/services/development/livebook.nix +++ b/nixos/modules/services/development/livebook.nix @@ -89,6 +89,13 @@ in EnvironmentFile = cfg.environmentFile; ExecStart = "${cfg.package}/bin/livebook start"; KillMode = "mixed"; + + # Fix for the issue described here: + # https://github.com/livebook-dev/livebook/issues/2691 + # + # Without this, the livebook service fails to start and gets + # stuck running a `cat /dev/urandom | tr | fold` pipeline. + IgnoreSIGPIPE = false; }; environment = mapAttrs (name: value: if isBool value then boolToString value else toString value) diff --git a/nixos/tests/livebook-service.nix b/nixos/tests/livebook-service.nix index f428412e1644..2d699efb1e3e 100644 --- a/nixos/tests/livebook-service.nix +++ b/nixos/tests/livebook-service.nix @@ -11,9 +11,6 @@ import ./make-test-python.nix ({ lib, pkgs, ... }: { enableUserService = true; environment = { LIVEBOOK_PORT = 20123; - LIVEBOOK_COOKIE = "chocolate chip"; - LIVEBOOK_TOKEN_ENABLED = true; - }; environmentFile = pkgs.writeText "livebook.env" '' LIVEBOOK_PASSWORD = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" @@ -38,7 +35,7 @@ import ./make-test-python.nix ({ lib, pkgs, ... }: { machine.succeed("loginctl enable-linger alice") machine.wait_until_succeeds("${sudo} systemctl --user is-active livebook.service") - machine.wait_for_open_port(20123) + machine.wait_for_open_port(20123, timeout=10) machine.succeed("curl -L localhost:20123 | grep 'Type password'") '';