From e87770f6ca04ffae1f4601f5cc9ea3594707f17a Mon Sep 17 00:00:00 2001 From: Lyn Fugmann Date: Wed, 11 Sep 2024 17:33:55 +0200 Subject: [PATCH] add nix flake and devShell --- .envrc | 1 + .gitignore | 2 ++ README.md | 13 ++++++++++-- flake.lock | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 22 ++++++++++++++++++++ 5 files changed, 97 insertions(+), 2 deletions(-) create mode 100644 .envrc create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/.gitignore b/.gitignore index ceaea36..e294232 100644 --- a/.gitignore +++ b/.gitignore @@ -130,3 +130,5 @@ dist .yarn/install-state.gz .pnp.* +# ---> direnv +.direnv/ diff --git a/README.md b/README.md index f6bdd8d..6b55cfc 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,12 @@ -# ese-website2 +# ESE Website -Neue ESE-Website \ No newline at end of file +This is the WIP rewrite of the ESE website. + +## Building + +(TODO) + +## Nix DevShell +A nix development shell that provides all required tools for developing and building the project is provided for convenience. Using it is by no means required, although we encourage it. + +You can activate the devShell using `nix develop` – or automatically, whenever entering/leaving this project's directory, using direnv (run `direnv allow` once). diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..d4abe38 --- /dev/null +++ b/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1725983898, + "narHash": "sha256-4b3A9zPpxAxLnkF9MawJNHDtOOl6ruL0r6Og1TEDGCE=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "1355a0cbfeac61d785b7183c0caaec1f97361b43", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-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 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..7744f1c --- /dev/null +++ b/flake.nix @@ -0,0 +1,22 @@ +{ + description = "ESE Website"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = nixpkgs.legacyPackages.${system}; + in + { + devShells.default = pkgs.mkShell { + packages = with pkgs; [ + nodejs # latest LTS version + ]; + }; + } + ); +}