diff options
author | Joris | 2022-04-02 17:40:00 +0200 |
---|---|---|
committer | Joris | 2022-04-02 17:40:00 +0200 |
commit | 1d855b7a50b61650f7ddf40f604c788de1c9e914 (patch) | |
tree | 5dcc98fcd4fa1a1ff753010fccacf664d426d5f5 | |
parent | a45ed4328fad91878ed904c7bee7539c97708500 (diff) |
Use nix flakes
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | flake.lock | 42 | ||||
-rw-r--r-- | flake.nix | 21 |
3 files changed, 65 insertions, 2 deletions
@@ -1,9 +1,9 @@ # Getting started -Run: +Having nix installed, run: ```sh -nix-shell --run bin/watch.sh +nix develop --command bin/watch.sh ``` Then, open your browser at `http://localhost:8000`. diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..a0f22fb --- /dev/null +++ b/flake.lock @@ -0,0 +1,42 @@ +{ + "nodes": { + "flake-utils": { + "locked": { + "lastModified": 1648297722, + "narHash": "sha256-W+qlPsiZd8F3XkzXOzAoR+mpFqzm3ekQkJNa+PIh1BQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "0f8662f1319ad6abf89b3380dd2722369fc51ade", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1648912099, + "narHash": "sha256-aZrPTPlRaOdI1bPdBuzcV1dS9BGSQrZHDZjdJjW4zb0=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "247c48bc3afe677ed31e21ab32ee0018f9e70307", + "type": "github" + }, + "original": { + "owner": "nixos", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..92bf81f --- /dev/null +++ b/flake.nix @@ -0,0 +1,21 @@ +{ + inputs = { + nixpkgs.url = "github:nixos/nixpkgs"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem + (system: + let pkgs = nixpkgs.legacyPackages.${system}; + in { devShell = pkgs.mkShell { + buildInputs = with pkgs; [ + nodePackages.typescript + python3 + psmisc + esbuild + watchexec + ]; + }; } + ); +} |