backup since codeberg is down

This commit is contained in:
2026-03-27 13:35:43 +01:00
commit 8a61a214c6
45 changed files with 5038 additions and 0 deletions

34
flake.nix Normal file
View File

@@ -0,0 +1,34 @@
# This is for my retarded nixos jupyter notebook setup. It makes a shell with requrements.txt and jupynium bs installed.
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
pyproject-nix.url = "github:pyproject-nix/pyproject.nix";
bozo_nixpkgs.url = "github:DuarteSJ/nixpkgs/4e926b09ba06301b08d0f12afd0640c079bdc4dc";
};
outputs =
{ nixpkgs, pyproject-nix, bozo_nixpkgs, ... }:
let
project = pyproject-nix.lib.project.loadRequirementsTxt { projectRoot = ./.; };
pkgs = nixpkgs.legacyPackages.x86_64-linux;
bozo_pkgs = bozo_nixpkgs.legacyPackages.x86_64-linux;
python = pkgs.python3;
pythonEnv = pkgs.python3.withPackages (pkgs:
let base = project.renderers.withPackages { inherit python; } pkgs;
in base ++ (with pkgs; [ notebook nbclassic jupyter-console ipython]));
mental_retardation = bozo_pkgs.python3.withPackages (python-pkgs: with python-pkgs; [ jupynium ]);
in
{
devShells.x86_64-linux.default = pkgs.mkShell {
packages = [ pythonEnv mental_retardation ];
shellHook = ''
export SHELL="which fish"
if [[ $- == *i* ]] && [ -z "$TMUX" ]; then
tmux new-session -A -s GDS-fake-news
fi
'';
};
};
}