Compare commits

...

2 commits

Author SHA1 Message Date
5a276cf483
feat(webdev): Add flake 2024-12-28 21:03:48 +01:00
75e0ad6954
docs(sage): Add how to run 2024-12-28 17:59:33 +01:00
3 changed files with 109 additions and 6 deletions

View file

@ -1,5 +1,15 @@
{
description = "Sagemath flake";
description = ''
Sagemath flake
You'll want to run the flake with the following command:
$ sage --nodotsage -n=jupyterlab --notebook-dir /path/to/notebooks
For example:
$ sage --nodotsage -n=jupyterlab --notebook-dir .
'';
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils";
@ -14,12 +24,8 @@
in {
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
sage
sageWithDoc
];
shellHook = ''
sage --nodotsage -n=jupyterlab --notebook-dir .
'';
};
}
);

61
webdev/flake.lock generated Normal file
View file

@ -0,0 +1,61 @@
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1735268880,
"narHash": "sha256-7QEFnKkzD13SPxs+UFR5bUFN2fRw+GlL0am72ZjNre4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "7cc0bff31a3a705d3ac4fdceb030a17239412210",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

36
webdev/flake.nix Normal file
View file

@ -0,0 +1,36 @@
{
description = ''
Web development flake
'';
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem
( system:
let
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
in {
devShells.default = pkgs.mkShell {
packages = with pkgs; [
nodejs
playwright-driver.browsers
# IDE's
(jetbrains.plugins.addPlugins jetbrains.webstorm [ "github-copilot" ])
];
shellHook = ''
export PLAYWRIGHT_BROWSERS_PATH=${pkgs.playwright-driver.browsers}
export PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS=true
'';
};
});
}