diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 00000000..b55d76cd --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,3 @@ +# Nix stuff is owned by Rory& - we& want to be notified if these are changed. +/flake.nix root@rory.gay +/nix-update.sh root@rory.gay \ No newline at end of file diff --git a/.github/workflows/nix-build.yml b/.github/workflows/nix-build.yml new file mode 100644 index 00000000..ae9afa2e --- /dev/null +++ b/.github/workflows/nix-build.yml @@ -0,0 +1,18 @@ +name: Nix build + +on: + push: + pull_request: + +jobs: + build-nix: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - uses: cachix/install-nix-action@v25 + with: + nix_path: nixpkgs=channel:nixos-unstable + - uses: DeterminateSystems/magic-nix-cache-action@v2 + - run: nix build -L + - run: nix develop --command echo OK diff --git a/.gitignore b/.gitignore index bc780d64..e62c03d6 100644 --- a/.gitignore +++ b/.gitignore @@ -18,4 +18,5 @@ build *.log.ansi *.tmp tmp/ -dump/ \ No newline at end of file +dump/ +result diff --git a/.husky/pre-commit b/.husky/pre-commit index 1bc5a8c6..702231b5 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1,28 @@ #!/usr/bin/env sh +#!nix-shell -i "bash" -p bash prefetch-npm-deps jq nodejs nix-output-monitor . "$(dirname -- "$0")/_/husky.sh" -npx -y lint-staged \ No newline at end of file +# Check if nix is available +if [ -x "$(/usr/bin/env which nix-shell 2>/dev/null)" ]; then + # Check if we haven't re-executed ourselves yet + if [ ! "$HOOK_NIX_SHELL" ]; then + echo "Nix is available, updating nix flake..." + export HOOK_NIX_SHELL=1 + nix-shell $0 + exit $? + else + nix flake update + # run ./nix-update.sh if package lock has changed and has no unstaged changes + if [ -n "$(git status --porcelain=v1 2>/dev/null | grep -E '^(MM| M) package-lock.json')" ]; then + echo "package-lock.json has unstaged changes. Skipping update of nix dependencies." + elif [ ! -n "$(git status --porcelain=v1 2>/dev/null | grep -E '^M package-lock.json')" ]; then + echo "package-lock.json has no changes. Skipping update of nix dependencies." + else + ./nix-update.sh || exit $? + fi + fi +else + echo "You do not appear to have nix installed. Skipping update of nix dependencies." +fi + +npx -y lint-staged diff --git a/assets/email_templates/new_login_location.html b/assets/email_templates/new_login_location.html index 8c188def..b8c4a4fb 100644 --- a/assets/email_templates/new_login_location.html +++ b/assets/email_templates/new_login_location.html @@ -1,102 +1,120 @@ - + +
+ + + + ++
- Hey {userUsername}, -
-- It looks like someone tried to log into your {instanceName} - account from a new location. If this is you, follow the link - below to authorize logging in from this location on your - account. If this isn't you, we suggest changing your - password as soon as possible. -
-
- IP Address: {ipAddress}
-
- Location: {locationCity}, {locationRegion},
- {locationCountryName}
-
+ It looks like someone tried to log into your {instanceName} + account from a new location. If this is you, follow the link + below to authorize logging in from this location on your + account. If this isn't you, we suggest changing your + password as soon as possible. +
+
+ IP Address: {ipAddress}
+
+ Location: {locationCity}, {locationRegion},
+ {locationCountryName}
+
- Alternatively, you can directly paste this link into - your browser: -
- {actionUrl} + " + > ++ Alternatively, you can directly paste this link into + your browser: +
+ {actionUrl} +