Update to Nix setup and clean up links
This commit is contained in:
parent
fa626826ad
commit
115bb5c485
9 changed files with 1251 additions and 151 deletions
1
.envrc
Normal file
1
.envrc
Normal file
|
|
@ -0,0 +1 @@
|
|||
use flake
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -24,3 +24,7 @@ pnpm-debug.log*
|
|||
!.vscode/extensions.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/settings.json
|
||||
|
||||
# Nix files
|
||||
.direnv/
|
||||
result/
|
||||
|
|
|
|||
13
README.md
13
README.md
|
|
@ -6,7 +6,7 @@ For attributions, see [`licenses.toml`](src/data/licenses.toml).
|
|||
|
||||
## Requirements
|
||||
|
||||
- Node.js 20+
|
||||
- Bun
|
||||
- (optional) rsync or LFTP, for remote deployment.
|
||||
|
||||
## Development
|
||||
|
|
@ -16,15 +16,16 @@ For attributions, see [`licenses.toml`](src/data/licenses.toml).
|
|||
```bash
|
||||
git clone https://git.badmanners.xyz/badmanners/badmanners.xyz
|
||||
cd badmanners.xyz
|
||||
npm install
|
||||
direnv allow
|
||||
bun install
|
||||
```
|
||||
|
||||
### Local development
|
||||
|
||||
```bash
|
||||
npm run dev # Start development server (quit with Ctrl-C)
|
||||
npm run sync # Rebuild types from Astro config
|
||||
npm run prettier # Prettier formatting
|
||||
bun dev # Start development server (quit with Ctrl-C)
|
||||
bun sync # Rebuild types from Astro config
|
||||
bun prettier # Prettier formatting
|
||||
```
|
||||
|
||||
### Configuration
|
||||
|
|
@ -38,7 +39,7 @@ The following optional environment variable can be set within a `.env` file:
|
|||
### Build and deploy to remote
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
bun run build
|
||||
```
|
||||
|
||||
Then, if you're using rsync, after configuring the `websitebm` host (or the name of your choosing) in `~/.ssh/config`, you can use a command like:
|
||||
|
|
|
|||
60
flake.lock
generated
Normal file
60
flake.lock
generated
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1768032153,
|
||||
"narHash": "sha256-6kD1MdY9fsE6FgSwdnx29hdH2UcBKs3/+JJleMShuJg=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "3146c6aa9995e7351a398e17470e15305e6e18ff",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"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
|
||||
}
|
||||
30
flake.nix
Normal file
30
flake.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
description = "badmanners.xyz";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "nixpkgs/nixpkgs-unstable";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs =
|
||||
{
|
||||
nixpkgs,
|
||||
flake-utils,
|
||||
...
|
||||
}:
|
||||
flake-utils.lib.eachDefaultSystem (
|
||||
system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
{
|
||||
flakedPkgs = pkgs;
|
||||
devShells.default = pkgs.mkShell {
|
||||
packages = [
|
||||
pkgs.bun
|
||||
pkgs.rsync
|
||||
];
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
@ -5,7 +5,7 @@ url = "https://badmanners.xyz/licenses.toml"
|
|||
title = "badmanners.xyz"
|
||||
description = "Bad Manners's personal website."
|
||||
type = "website"
|
||||
date = "2023-2024"
|
||||
date = "2023-2026"
|
||||
author = { name = "Bad Manners", url = "https://badmanners.xyz", email = "me@badmanners.xyz" }
|
||||
source = "https://git.badmanners.xyz/badmanners/badmanners.xyz"
|
||||
license = { name = "MIT", url = "https://opensource.org/license/mit" }
|
||||
|
|
|
|||
|
|
@ -1,41 +1,30 @@
|
|||
---
|
||||
import { readFile } from "node:fs/promises";
|
||||
import BaseLayout from "@layouts/BaseLayout.astro";
|
||||
import { IconEnvelope, IconBriefcase, IconKey, IconLink, IconCommentDots, IconSSH } from "@components/icons";
|
||||
import { IconEnvelope, IconBriefcase, IconLink, IconCommentDots, IconSSH } from "@components/icons";
|
||||
import {
|
||||
IconBluesky,
|
||||
IconCodeberg,
|
||||
IconDiscord,
|
||||
IconEkasPortal,
|
||||
IconFurAffinity,
|
||||
IconGitGud,
|
||||
IconGithub,
|
||||
IconGitlab,
|
||||
IconGoogle,
|
||||
IconInkbunny,
|
||||
IconItaku,
|
||||
IconItchIO,
|
||||
IconKeybase,
|
||||
IconKeyoxide,
|
||||
IconKofi,
|
||||
IconMastodon,
|
||||
IconNeocities,
|
||||
IconPicarto,
|
||||
IconSignal,
|
||||
IconSoFurry,
|
||||
IconSteam,
|
||||
IconSubscribeStar,
|
||||
IconTelegram,
|
||||
IconTwitch,
|
||||
IconWeasyl,
|
||||
IconYouTube,
|
||||
} from "@components/icons/brands";
|
||||
import EnhancedTooltips from "@components/EnhancedTooltips.astro";
|
||||
|
||||
const [gpgKey, sshKey] = await Promise.all([
|
||||
readFile("./public/gpg.pub", { encoding: "utf-8" }),
|
||||
readFile("./public/ssh.pub", { encoding: "utf-8" }),
|
||||
]);
|
||||
const sshKey = await readFile("./public/ssh.pub", { encoding: "utf-8" });
|
||||
---
|
||||
|
||||
<BaseLayout>
|
||||
|
|
@ -207,20 +196,6 @@ const [gpgKey, sshKey] = await Promise.all([
|
|||
<p class="p-nickname sr-only select-none">BadManners on Fur Affinity</p>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
id="gitgud"
|
||||
class="u-url contact-link group"
|
||||
href="https://gitgud.io/BadMannersXYZ"
|
||||
rel="me"
|
||||
aria-label="GitGud"
|
||||
title="GitGud"
|
||||
data-tooltip
|
||||
>
|
||||
<IconGitGud height="1.75rem" width="1.75rem" class="contact-icon" />
|
||||
<p class="p-nickname sr-only select-none">BadMannersXYZ on GitGud</p>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
id="github"
|
||||
|
|
@ -235,20 +210,6 @@ const [gpgKey, sshKey] = await Promise.all([
|
|||
<p class="p-nickname sr-only select-none">BadMannersXYZ on GitHub</p>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
id="gitlab"
|
||||
class="u-url contact-link group"
|
||||
href="https://gitlab.com/Bad_Manners"
|
||||
rel="me"
|
||||
aria-label="GitLab"
|
||||
title="GitLab"
|
||||
data-tooltip
|
||||
>
|
||||
<IconGitlab height="1.75rem" width="1.75rem" class="contact-icon" />
|
||||
<p class="p-nickname sr-only select-none">Bad_Manners on GitLab</p>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
id="google"
|
||||
|
|
@ -268,22 +229,6 @@ const [gpgKey, sshKey] = await Promise.all([
|
|||
<p class="sr-only select-none">google@badmanners.xyz</p>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
id="gpg"
|
||||
class="u-key contact-link group"
|
||||
href="/gpg.pub"
|
||||
type="text/plain"
|
||||
aria-label="GPG public key"
|
||||
title="GPG public key"
|
||||
data-tooltip
|
||||
x-data={JSON.stringify({ clipboard: gpgKey, tooltip: "GPG key copied to clipboard!" })}
|
||||
@click.prevent="navigator.clipboard.writeText(clipboard).catch(()=>{}); $dispatch('tippyTooltip', { target: $el, content: tooltip })"
|
||||
>
|
||||
<IconKey height="1.75rem" width="1.75rem" class="contact-icon" />
|
||||
<p class="sr-only select-none">GPG public key</p>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
id="inkbunny"
|
||||
|
|
@ -298,20 +243,6 @@ const [gpgKey, sshKey] = await Promise.all([
|
|||
<p class="p-nickname sr-only select-none">BadManners on Inkbunny</p>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
id="itaku"
|
||||
class="u-url contact-link group"
|
||||
href="https://itaku.ee/profile/badmanners"
|
||||
rel="me"
|
||||
aria-label="Itaku"
|
||||
title="Itaku"
|
||||
data-tooltip
|
||||
>
|
||||
<IconItaku height="1.75rem" width="1.75rem" class="contact-icon" />
|
||||
<p class="p-nickname sr-only select-none">badmanners on Itaku</p>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
id="itch"
|
||||
|
|
@ -326,34 +257,6 @@ const [gpgKey, sshKey] = await Promise.all([
|
|||
<p class="p-nickname sr-only select-none">Bad Manners on Itch.io</p>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
id="keybase"
|
||||
class="u-url contact-link group"
|
||||
href="https://keybase.io/badmanners"
|
||||
rel="me"
|
||||
aria-label="Keybase"
|
||||
title="Keybase"
|
||||
data-tooltip
|
||||
>
|
||||
<IconKeybase height="1.75rem" width="1.75rem" class="contact-icon" />
|
||||
<p class="p-nickname sr-only select-none">badmanners on Keybase</p>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
id="keyoxide"
|
||||
class="u-url contact-link group"
|
||||
href="https://keyoxide.org/aspe%3Akeyoxide.org%3AUWYBVFCBFXTVUF2U6FS6AYJHLU"
|
||||
rel="me"
|
||||
aria-label="Keyoxide"
|
||||
title="Keyoxide"
|
||||
data-tooltip
|
||||
>
|
||||
<IconKeyoxide height="1.75rem" width="1.75rem" class="contact-icon" />
|
||||
<p class="p-uid sr-only select-none">aspe:keyoxide.org:UWYBVFCBFXTVUF2U6FS6AYJHLU</p>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
id="ko-fi"
|
||||
|
|
@ -410,34 +313,6 @@ const [gpgKey, sshKey] = await Promise.all([
|
|||
<p class="p-nickname sr-only select-none">BadManners on Picarto</p>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
id="signal"
|
||||
class="u-url contact-link group"
|
||||
href="https://signal.me/#eu/ytt_rk0fFmAB2JAW-x2PbUiJyc_H3kYmfL_Pq4QNh5QIDsiFtjdFHaqFRs1D36tB"
|
||||
rel="me"
|
||||
aria-label="Signal"
|
||||
title="Signal"
|
||||
data-tooltip
|
||||
>
|
||||
<IconSignal height="1.75rem" width="1.75rem" class="contact-icon" />
|
||||
<p class="p-nickname sr-only select-none">badmanners.10 on Signal</p>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
id="sofurry"
|
||||
class="u-url contact-link group"
|
||||
href="https://bad-manners.sofurry.com"
|
||||
rel="me"
|
||||
aria-label="SoFurry"
|
||||
title="SoFurry"
|
||||
data-tooltip
|
||||
>
|
||||
<IconSoFurry height="1.75rem" width="1.75rem" class="contact-icon" />
|
||||
<p class="p-nickname sr-only select-none">Bad Manners on SoFurry</p>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
id="ssh"
|
||||
|
|
@ -524,20 +399,6 @@ const [gpgKey, sshKey] = await Promise.all([
|
|||
<p class="p-nickname sr-only select-none">BadManners on Weasyl</p>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
id="youtube"
|
||||
class="u-url contact-link group"
|
||||
href="https://www.youtube.com/@BadMannersXYZ"
|
||||
rel="me"
|
||||
aria-label="YouTube"
|
||||
title="YouTube"
|
||||
data-tooltip
|
||||
>
|
||||
<IconYouTube height="1.75rem" width="1.75rem" class="contact-icon" />
|
||||
<p class="p-nickname sr-only select-none">@BadMannersXYZ on YouTube</p>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</article>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
"@assets/*": ["src/assets/*"],
|
||||
"@components/*": ["src/components/*"],
|
||||
"@data/*": ["src/data/*"],
|
||||
"@layouts/*": ["src/layouts/*"]
|
||||
}
|
||||
}
|
||||
"@layouts/*": ["src/layouts/*"],
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue