From 5e9122a3b6e6d158d8156f967e674f3b6c913e84 Mon Sep 17 00:00:00 2001 From: "Lucy :3" Date: Wed, 18 Sep 2024 18:01:45 +0200 Subject: [PATCH 1/2] added flake dev env, still need to debug some stuff --- flake.lock | 27 +++++++++++++++++++++++++++ flake.nix | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..65dd1c1 --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1726463316, + "narHash": "sha256-gI9kkaH0ZjakJOKrdjaI/VbaMEo9qBbSUl93DnU7f4c=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "99dc8785f6a0adac95f5e2ab05cc2e1bf666d172", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..d36aa26 --- /dev/null +++ b/flake.nix @@ -0,0 +1,33 @@ +{ + description = "A very basic flake"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; + }; + + outputs = { self, nixpkgs }: + let + INPUTDIR = "./content"; + OUTPUTDIR = "./tmp"; + CONFFILE = "./pelicanconf.py"; + serve = pkgs.writeScriptBin "serve_page.sh" '' + #!/usr/bin/env bash + + if [ -n "$PORT" ]; then + pelican -l ${INPUTDIR} -o ${OUTPUTDIR} -s ${CONFFILE} -p port + else + pelican -l ${INPUTDIR} -o ${OUTPUTDIR} -s ${CONFFILE} + fi + ''; + pkgs = nixpkgs.legacyPackages.x86_64-linux.pkgs; + in { + devShells.x86_64-linux.default = pkgs.mkShell { + name = "build enviroment"; + buildInputs = [ + serve + pkgs.python312 + pkgs.python312Packages.pelican + ]; + }; + }; +} From 58d51e757fb536bb43c1270cb87b9089b2ae6554 Mon Sep 17 00:00:00 2001 From: Lucy <69870860+mrtuxa@users.noreply.github.com> Date: Wed, 18 Sep 2024 18:02:27 +0200 Subject: [PATCH 2/2] Update flake.nix --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index d36aa26..337ee4c 100644 --- a/flake.nix +++ b/flake.nix @@ -1,5 +1,5 @@ { - description = "A very basic flake"; + description = "chaos.jetzt website flake"; inputs = { nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";