Compare commits
6 commits
8e09ea3a93
...
9d6b334c66
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9d6b334c66 | ||
|
|
bb6f0f4a73 | ||
|
|
772a6fb04d | ||
|
|
a88da1fa37 | ||
|
|
1eddc9adf5 | ||
|
|
6789cdd962 |
15
build-with-nix.patch
Normal file
15
build-with-nix.patch
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
diff --git a/src/app/[locale]/layout.tsx b/src/app/[locale]/layout.tsx
|
||||||
|
index 52feac9..f502906 100644
|
||||||
|
--- a/src/app/[locale]/layout.tsx
|
||||||
|
+++ b/src/app/[locale]/layout.tsx
|
||||||
|
@@ -7,9 +7,9 @@ import Head from 'next/head';
|
||||||
|
|
||||||
|
import { ThemeProvider } from "@/components/providers";
|
||||||
|
import { translations } from "@/i18n/translations";
|
||||||
|
-import { Oxanium } from "next/font/google";
|
||||||
|
+import localFont from "next/font/local";
|
||||||
|
import { headers } from "next/headers";
|
||||||
|
-const oxanium = Oxanium({ subsets: ["latin-ext"] })
|
||||||
|
+const oxanium = localFont({ src: './Oxanium.ttf' })
|
||||||
|
|
||||||
|
import type { Metadata } from 'next';
|
||||||
38
default.nix
Normal file
38
default.nix
Normal file
|
|
@ -0,0 +1,38 @@
|
||||||
|
{ pkgs ? import <nixpkgs> {}, ... }: let
|
||||||
|
package-json = (builtins.fromJSON (builtins.readFile ./package.json));
|
||||||
|
in pkgs.buildNpmPackage {
|
||||||
|
pname = package-json.name;
|
||||||
|
version = package-json.version;
|
||||||
|
src = ./.;
|
||||||
|
|
||||||
|
patches = [ ./build-with-nix.patch ];
|
||||||
|
|
||||||
|
preBuild = ''
|
||||||
|
cp "${
|
||||||
|
pkgs.google-fonts.override { fonts = [ "Oxanium" ]; }
|
||||||
|
}/share/fonts/truetype/Oxanium[wght].ttf" src/app/\[locale\]/Oxanium.ttf
|
||||||
|
'';
|
||||||
|
|
||||||
|
npmDeps = pkgs.importNpmLock {
|
||||||
|
npmRoot = ./.;
|
||||||
|
};
|
||||||
|
|
||||||
|
npmConfigHook = pkgs.importNpmLock.npmConfigHook;
|
||||||
|
|
||||||
|
nativeBuildInputs = with pkgs; [
|
||||||
|
keepBuildTree
|
||||||
|
];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
cp -r public $out/
|
||||||
|
mkdir $out/.next
|
||||||
|
cp -r .next/standalone/{.*,*} $out/
|
||||||
|
cp -r .next/static $out/.next
|
||||||
|
mkdir $out/bin
|
||||||
|
echo "#! /usr/bin/env bash" > $out/bin/cebula-site
|
||||||
|
echo 'SOURCE=''${BASH_SOURCE[0]}' >> $out/bin/cebula-site
|
||||||
|
echo 'cd $(dirname $SOURCE)/..' >> $out/bin/cebula-site
|
||||||
|
echo 'exec ${pkgs.nodejs}/bin/node server.js' >> $out/bin/cebula-site
|
||||||
|
chmod +x $out/bin/cebula-site
|
||||||
|
'';
|
||||||
|
}
|
||||||
61
flake.lock
Normal file
61
flake.lock
Normal file
|
|
@ -0,0 +1,61 @@
|
||||||
|
{
|
||||||
|
"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": 1739055578,
|
||||||
|
"narHash": "sha256-2MhC2Bgd06uI1A0vkdNUyDYsMD0SLNGKtD8600mZ69A=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "a45fa362d887f4d4a7157d95c28ca9ce2899b70e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-24.11",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"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
|
||||||
|
}
|
||||||
14
flake.nix
Normal file
14
flake.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
|
||||||
|
inputs.flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs, flake-utils }: {
|
||||||
|
# nixosModules.default = import ./module.nix self;
|
||||||
|
} // (flake-utils.lib.eachDefaultSystem (system: let
|
||||||
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
package-json = (builtins.fromJSON (builtins.readFile ./package.json));
|
||||||
|
in {
|
||||||
|
packages.default = import ./default.nix { inherit pkgs; };
|
||||||
|
}
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
@ -29,7 +29,7 @@ export async function generateMetadata(
|
||||||
const t = translations[currentLang];
|
const t = translations[currentLang];
|
||||||
|
|
||||||
return {
|
return {
|
||||||
title: "CebulaCamp",
|
title: t.siteTitle,
|
||||||
description: "An amazing gathering of hackers and open source enthusiasts.",
|
description: "An amazing gathering of hackers and open source enthusiasts.",
|
||||||
icons: {
|
icons: {
|
||||||
icon: [
|
icon: [
|
||||||
|
|
@ -60,7 +60,7 @@ export async function generateMetadata(
|
||||||
},
|
},
|
||||||
twitter: {
|
twitter: {
|
||||||
card: 'summary_large_image',
|
card: 'summary_large_image',
|
||||||
title: 'CebulaCamp',
|
title: t.siteTitle,
|
||||||
description: 'An amazing gathering of hackers and open source enthusiasts.',
|
description: 'An amazing gathering of hackers and open source enthusiasts.',
|
||||||
images: ['https://cebula.camp/web-app-manifest-512x512.png'],
|
images: ['https://cebula.camp/web-app-manifest-512x512.png'],
|
||||||
},
|
},
|
||||||
|
|
@ -99,7 +99,7 @@ export default async function RootLayout({
|
||||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||||
<link rel="shortcut icon" href="/favicon.ico" />
|
<link rel="shortcut icon" href="/favicon.ico" />
|
||||||
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
|
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
|
||||||
<meta name="apple-mobile-web-app-title" content="CebulaCamp" />
|
<meta name="apple-mobile-web-app-title" content="{t.siteTitle}" />
|
||||||
<link rel="manifest" href="/site.webmanifest" />
|
<link rel="manifest" href="/site.webmanifest" />
|
||||||
|
|
||||||
</Head>
|
</Head>
|
||||||
|
|
|
||||||
|
|
@ -13,12 +13,12 @@ export default function Map({ t }: {
|
||||||
return (
|
return (
|
||||||
<div className='h-screen max-h-[400px] pt-8 relative mx-auto max-w-3xl'>
|
<div className='h-screen max-h-[400px] pt-8 relative mx-auto max-w-3xl'>
|
||||||
{/* @ts-expect-error dragging IS a valid prop. */}
|
{/* @ts-expect-error dragging IS a valid prop. */}
|
||||||
<MapContainer dragging={false} center={[51.105173, 17.087157]} zoom={40} scrollWheelZoom={false} className="h-full w-full">
|
<MapContainer dragging={false} center={[51.104955057760804, 17.087378768775697]} zoom={40} scrollWheelZoom={false} className="h-full w-full">
|
||||||
{/* @ts-expect-error attribution IS a valid prop. */}
|
{/* @ts-expect-error attribution IS a valid prop. */}
|
||||||
<TileLayer attribution='© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
<TileLayer attribution='© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
||||||
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
|
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
|
||||||
/>
|
/>
|
||||||
<Marker position={[51.105173, 17.087157]}>
|
<Marker position={[51.104955057760804, 17.087378768775697]}>
|
||||||
<Popup>
|
<Popup>
|
||||||
{t.where.location}
|
{t.where.location}
|
||||||
</Popup>
|
</Popup>
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ const common = {
|
||||||
};
|
};
|
||||||
|
|
||||||
const pl = {
|
const pl = {
|
||||||
siteTitle: "CebulaCamp",
|
siteTitle: "CebulaCamp 2025",
|
||||||
nav: {
|
nav: {
|
||||||
title: "CEBULACAMP",
|
title: "CEBULACAMP",
|
||||||
hero: "Cebula",
|
hero: "Cebula",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue