aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoris2022-04-02 17:40:00 +0200
committerJoris2022-04-02 17:40:00 +0200
commit1d855b7a50b61650f7ddf40f604c788de1c9e914 (patch)
tree5dcc98fcd4fa1a1ff753010fccacf664d426d5f5
parenta45ed4328fad91878ed904c7bee7539c97708500 (diff)
Use nix flakes
-rw-r--r--README.md4
-rw-r--r--flake.lock42
-rw-r--r--flake.nix21
3 files changed, 65 insertions, 2 deletions
diff --git a/README.md b/README.md
index 9f5b91f..47c92d0 100644
--- a/README.md
+++ b/README.md
@@ -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
+ ];
+ }; }
+ );
+}