Skip to content

Commit b748f2a

Browse files
committed
webpage: add devenv dev environment
Signed-off-by: Patrizio Bekerle <[email protected]>
1 parent e99ca41 commit b748f2a

File tree

7 files changed

+170
-10
lines changed

7 files changed

+170
-10
lines changed

webpage/.envrc

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,12 @@
1-
use nix
1+
#!/usr/bin/env bash
2+
3+
export DIRENV_WARN_TIMEOUT=20s
4+
5+
eval "$(devenv direnvrc)"
6+
7+
# `use devenv` supports the same options as the `devenv shell` command.
8+
#
9+
# To silence all output, use `--quiet`.
10+
#
11+
# Example usage: use devenv --quiet --impure --option services.postgres.enable:bool true
12+
use devenv

webpage/.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,15 @@ dist
1111
config.local.js
1212
basement_dist
1313
/scripts/vendor/
14+
.shared
15+
16+
# Devenv
17+
.devenv*
18+
devenv.local.nix
19+
devenv.local.yaml
20+
21+
# direnv
22+
.direnv
23+
24+
# pre-commit
25+
.pre-commit-config.yaml

webpage/devenv.lock

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
{
2+
"nodes": {
3+
"devenv": {
4+
"locked": {
5+
"dir": "src/modules",
6+
"lastModified": 1760560333,
7+
"owner": "cachix",
8+
"repo": "devenv",
9+
"rev": "0a4043938f540027e562c5a0feebbe6be872c3ea",
10+
"type": "github"
11+
},
12+
"original": {
13+
"dir": "src/modules",
14+
"owner": "cachix",
15+
"repo": "devenv",
16+
"type": "github"
17+
}
18+
},
19+
"flake-compat": {
20+
"flake": false,
21+
"locked": {
22+
"lastModified": 1747046372,
23+
"owner": "edolstra",
24+
"repo": "flake-compat",
25+
"rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
26+
"type": "github"
27+
},
28+
"original": {
29+
"owner": "edolstra",
30+
"repo": "flake-compat",
31+
"type": "github"
32+
}
33+
},
34+
"git-hooks": {
35+
"inputs": {
36+
"flake-compat": "flake-compat",
37+
"gitignore": "gitignore",
38+
"nixpkgs": [
39+
"nixpkgs"
40+
]
41+
},
42+
"locked": {
43+
"lastModified": 1760646223,
44+
"owner": "cachix",
45+
"repo": "git-hooks.nix",
46+
"rev": "e00bda94303385fb6ba78d792659a0e0d30cb37f",
47+
"type": "github"
48+
},
49+
"original": {
50+
"owner": "cachix",
51+
"repo": "git-hooks.nix",
52+
"type": "github"
53+
}
54+
},
55+
"gitignore": {
56+
"inputs": {
57+
"nixpkgs": [
58+
"git-hooks",
59+
"nixpkgs"
60+
]
61+
},
62+
"locked": {
63+
"lastModified": 1709087332,
64+
"owner": "hercules-ci",
65+
"repo": "gitignore.nix",
66+
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
67+
"type": "github"
68+
},
69+
"original": {
70+
"owner": "hercules-ci",
71+
"repo": "gitignore.nix",
72+
"type": "github"
73+
}
74+
},
75+
"nixpkgs": {
76+
"locked": {
77+
"lastModified": 1758532697,
78+
"owner": "cachix",
79+
"repo": "devenv-nixpkgs",
80+
"rev": "207a4cb0e1253c7658c6736becc6eb9cace1f25f",
81+
"type": "github"
82+
},
83+
"original": {
84+
"owner": "cachix",
85+
"ref": "rolling",
86+
"repo": "devenv-nixpkgs",
87+
"type": "github"
88+
}
89+
},
90+
"root": {
91+
"inputs": {
92+
"devenv": "devenv",
93+
"git-hooks": "git-hooks",
94+
"nixpkgs": "nixpkgs",
95+
"pre-commit-hooks": [
96+
"git-hooks"
97+
],
98+
"shared": "shared"
99+
}
100+
},
101+
"shared": {
102+
"flake": false,
103+
"locked": {
104+
"lastModified": 1760617128,
105+
"owner": "pbek",
106+
"repo": "nix-shared",
107+
"rev": "7bfb2ac1d2b88d8f9c3ba2e21916ac1baf9fbfac",
108+
"type": "github"
109+
},
110+
"original": {
111+
"owner": "pbek",
112+
"repo": "nix-shared",
113+
"type": "github"
114+
}
115+
}
116+
},
117+
"root": "root",
118+
"version": 7
119+
}

webpage/devenv.nix

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{ pkgs, ... }:
2+
3+
{
4+
languages.javascript.package = pkgs.nodejs_20;
5+
6+
# https://devenv.sh/packages/
7+
packages = with pkgs; [
8+
zellij
9+
];
10+
11+
enterShell = ''
12+
echo "🛠️ QOwnNotes Webpage Dev Shell"
13+
'';
14+
}

webpage/devenv.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# yaml-language-server: $schema=https://devenv.sh/devenv.schema.json
2+
inputs:
3+
nixpkgs:
4+
url: github:cachix/devenv-nixpkgs/rolling
5+
shared:
6+
url: github:pbek/nix-shared
7+
flake: false
8+
9+
imports:
10+
- shared/common
11+
- shared/javascript

webpage/justfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Use `just <recipe>` to run a recipe
22
# https://just.systems/man/en/
33

4+
import ".shared/common.just"
5+
46
# By default, run the `--list` command
57
default:
68
@just --list

webpage/shell.nix

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)