No description
  • Haskell 75.1%
  • Nix 23.1%
  • Shell 1.8%
Find a file
Andrei Borzenkov 89c5e41e11
All checks were successful
/ Build (push) Successful in 30m4s
Update flake.nix and add CI for caches
2026-02-06 15:24:57 +04:00
.forgejo/workflows Update flake.nix and add CI for caches 2026-02-06 15:24:57 +04:00
app Add default GHC version 2024-04-20 16:36:43 +04:00
scripts update scripts 2023-04-25 19:53:07 +04:00
src/Playground Update flake.nix and add CI for caches 2026-02-06 15:24:57 +04:00
.envrc init 2022-11-24 18:07:26 +04:00
.gitignore yet one fix 2023-04-17 21:15:38 +04:00
.stylish-haskell.yaml huge UX update 2023-04-17 19:17:11 +04:00
cabal.project init 2022-11-24 18:07:26 +04:00
CHANGELOG.md init 2022-11-24 18:07:26 +04:00
flake.lock Update flake.nix and add CI for caches 2026-02-06 15:24:57 +04:00
flake.nix Update flake.nix and add CI for caches 2026-02-06 15:24:57 +04:00
LICENSE init 2022-11-24 18:07:26 +04:00
playground-hs.cabal hopefully finally fix timeout 2024-05-30 14:10:25 +04:00
pre-deploy-to.sh add pre-deploy system 2023-04-21 14:07:26 +04:00
README.md Update flake.nix and add CI for caches 2026-02-06 15:24:57 +04:00

playground-hs

In-telegram feature-rich playground for Haskell with libraries support.

Deployment

Warning: the first building of the environment can take more than 1 hour due to the huge lack of caches.

Add new input into /etc/nixos/flake.nix, use provided module, and configure playground-hs:

{
  inputs = {
    nixpkgs.url = github:NixOS/nixpkgs;
    playground-hs.url = "https://git.sandwitch.dev/sand-witch/playground-hs/archive/master.tar.gz";
  };

  outputs = { self, nixpkgs, playground-hs, ... }: {
    nixosConfigurations.nixos = nixpkgs.lib.nixosSystem rec {
      system = "x86_64-linux";
      modules =
        [ playground-hs.nixosModules.${system}.default
          {
            services.playground-hs = {
              enable = true;
              envFile = "/path/to/the/environment/file.env";
              workersCount = 8; # optional
              timeout = { # optional
                compiler = {
                  term = 2;
                  kill = 3;
                };
                prog = {
                  term = 1;
                  kill = 2;
                };
              };
            };
          }
          ...
        ];
    };
  };
}

The environment file should contain a telegram bot token in the following form:

TG_TOKEN=...

Usage

You can play with this playground, using https://t.me/runhaskellbot

Type /help_haskell to get more info.