diff --git a/website/.gitignore b/website/.gitignore new file mode 100644 index 0000000..b2be92b --- /dev/null +++ b/website/.gitignore @@ -0,0 +1 @@ +result diff --git a/website/content/english/pages/Grants.md b/website/content/english/pages/Grants.md deleted file mode 100755 index 7554fbf..0000000 --- a/website/content/english/pages/Grants.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: "Grants" -# meta title -meta_title: "Grants" -# meta description -description: "How to apply for grants as part of the Fediversity Project." -# save as draft -draft: false ---- - -Fediversity invites other people to join this ambitious development effort. It is a vast domain with many more challenges than what any preconceived effort could tackle by itself. This is why we invite your contribution to help us reshape the state of play, and together create an open, trustworthy and reliable internet for all. - -This is your opportunity to make a real difference. You tell us how your project can help Fediversity go harder, better, faster, stronger. In order to enable you to make such contributions, NLnet will award 450 000 euro in small to medium-size R&D grants towards solutions that bring the next generation of social networks closer. NLnet is seeking project proposals between 5.000 and 50.000 euro’s — which should get you on your way. - -Noteworthy fact: many projects which are to be deployed inside Fediversity were themselves bootstrapped on precisely such a grant from NGI, and now it is your turn. - -For more information on how to apply, check the NLnet website. diff --git a/website/content/fediversity.nix b/website/content/fediversity.nix new file mode 100644 index 0000000..b651078 --- /dev/null +++ b/website/content/fediversity.nix @@ -0,0 +1,19 @@ +rec { + title = "Fediversity"; + description = "More information about the Fediversity project"; + summary = '' + The Fediversity Project is a comprehensive effort to bring easy-to-use, hosted cloud services that have service portability and personal freedom at their core to everyone. + ''; + outPath = "fediversity.html"; + body = '' + # ${title} + + Fediversity is a comprehensive effort to bring easy-to-use, hosted cloud services with service portability and personal freedom at their core to everyone. It wants to provide everyone with high-quality, secure IT systems for everyday use. Without tracking, without exploitation, in a way that runs everywhere and scales effortlessly. Fediversity is based on NixOS, a disruptive Linux distribution with a unique approach to package and configuration management. Built on top of the Nix package manager, NixOS is completely declarative, makes upgrading systems reliable, and has many other advantages. Because it is reproducible, it is ideally suited for complex deployment scenario’s where consistent behaviour, stability and configurability matter. + + One such “complex” deployment scenario is running state-of-the-art services for the Fediverse, like PeerTube, Mastodon, Owncast or Lemmy — especially if you want to for instance add services like live chat or transcoding. But even running more traditional services like modern e-mail servers with possible whistles and bells can be daunting. The same holds for deploying a VPN, private cloud storage, wiki, etc. Fediversity will enable all of these use cases, and more — finally bringing these to the market in a way that is as conveient as using a hosted service. + + Fediversity is a pilot funded by the European Commission, building on many projects funding through the Next Generation Internet initiative. The results of the project should greatly simplify the creation and delivery of robust and secure services, on the web and beyond. + + Fediversity will deliver an ambitious development effort, but this is a vast domain with many more challenges than what any preconceived effort could tackle by itself. This is why we invite your contribution to help us reshape the state of play, and together create an open, trustworthy and reliable internet for all. + ''; +} diff --git a/website/content/grants.nix b/website/content/grants.nix new file mode 100644 index 0000000..fb5eb3e --- /dev/null +++ b/website/content/grants.nix @@ -0,0 +1,17 @@ +{ + title = "Grants"; + description = "How to apply for grants as part of the Fediversity Project"; + summary = '' + Fediversity will award 450 000 euro in small to medium-size R&D grants towards solutions that bring the next generation of social networks closer. We are seeking project proposals between 5.000 and 50.000 euro’s — which should get you on your way. + ''; + outPath = "grants.html"; + body = '' + Fediversity invites other people to join this ambitious development effort. It is a vast domain with many more challenges than what any preconceived effort could tackle by itself. This is why we invite your contribution to help us reshape the state of play, and together create an open, trustworthy and reliable internet for all. + + This is your opportunity to make a real difference. You tell us how your project can help Fediversity go harder, better, faster, stronger. In order to enable you to make such contributions, NLnet will award 450 000 euro in small to medium-size R&D grants towards solutions that bring the next generation of social networks closer. NLnet is seeking project proposals between 5.000 and 50.000 euro’s — which should get you on your way. + + Noteworthy fact: many projects which are to be deployed inside Fediversity were themselves bootstrapped on precisely such a grant from NGI, and now it is your turn. + + For more information on how to apply, check the NLnet website. + ''; +} diff --git a/website/content/index.nix b/website/content/index.nix new file mode 100644 index 0000000..2372473 --- /dev/null +++ b/website/content/index.nix @@ -0,0 +1,22 @@ +let + grants = import ./grants.nix; + fediversity = import ./fediversity.nix; +in +{ + title = "Fediversity"; + description = "NGI Zero Fediversity"; + outPath = "index.html"; + body = '' + # Welcome to the Fediversity project + + ${fediversity.summary} + + [Learn more about Fediversity](./${fediversity}) + + # Fediversity grants + + ${grants.summary} + + [Learn more about our grants](./${grants}) + ''; +} diff --git a/website/content/english/_index.md b/website/content_/english/_index.md similarity index 86% rename from website/content/english/_index.md rename to website/content_/english/_index.md index 4e44143..20884aa 100755 --- a/website/content/english/_index.md +++ b/website/content_/english/_index.md @@ -2,7 +2,7 @@ # Banner banner: title: "Welcome to the Fediversity Project" - content: "The Fediversity Project is a comprehensive effort to bring easy-to-use, hosted cloud services that have service portability and personal freedom at their core to everyone." + content: "" # image: "/images/checkbox-illustration-scaled.png" image: "/images/home.svg" button: @@ -55,7 +55,7 @@ features3: features: - title: "Fediversity Grants" image: "/images/stepping-up.png" - content: "Fediversity will award 450 000 euro in small to medium-size R&D grants towards solutions that bring the next generation of social networks closer. We are seeking project proposals between 5.000 and 50.000 euro’s — which should get you on your way." + content: "" button: enable: true label: "Learn more" diff --git a/website/content/english/authors/_index.md b/website/content_/english/authors/_index.md similarity index 100% rename from website/content/english/authors/_index.md rename to website/content_/english/authors/_index.md diff --git a/website/content/english/authors/laurens-hof.md b/website/content_/english/authors/laurens-hof.md similarity index 100% rename from website/content/english/authors/laurens-hof.md rename to website/content_/english/authors/laurens-hof.md diff --git a/website/content/english/blog/New-website-launch.md b/website/content_/english/blog/New-website-launch.md similarity index 100% rename from website/content/english/blog/New-website-launch.md rename to website/content_/english/blog/New-website-launch.md diff --git a/website/content/english/blog/_index.md b/website/content_/english/blog/_index.md similarity index 100% rename from website/content/english/blog/_index.md rename to website/content_/english/blog/_index.md diff --git a/website/content/english/blog/fediversity-tech-session.md b/website/content_/english/blog/fediversity-tech-session.md similarity index 100% rename from website/content/english/blog/fediversity-tech-session.md rename to website/content_/english/blog/fediversity-tech-session.md diff --git a/website/content/english/blog/nordunet-conference-2024.md b/website/content_/english/blog/nordunet-conference-2024.md similarity index 100% rename from website/content/english/blog/nordunet-conference-2024.md rename to website/content_/english/blog/nordunet-conference-2024.md diff --git a/website/content/english/blog/project-launch.md b/website/content_/english/blog/project-launch.md similarity index 100% rename from website/content/english/blog/project-launch.md rename to website/content_/english/blog/project-launch.md diff --git a/website/content/english/blog/publicspaces-conference.md b/website/content_/english/blog/publicspaces-conference.md similarity index 100% rename from website/content/english/blog/publicspaces-conference.md rename to website/content_/english/blog/publicspaces-conference.md diff --git a/website/content/english/contact/_index.md b/website/content_/english/contact/_index.md similarity index 100% rename from website/content/english/contact/_index.md rename to website/content_/english/contact/_index.md diff --git a/website/content/english/events/_index.md b/website/content_/english/events/_index.md similarity index 100% rename from website/content/english/events/_index.md rename to website/content_/english/events/_index.md diff --git a/website/content/english/events/owc-annual-conference-2024.md b/website/content_/english/events/owc-annual-conference-2024.md similarity index 100% rename from website/content/english/events/owc-annual-conference-2024.md rename to website/content_/english/events/owc-annual-conference-2024.md diff --git a/website/content/english/events/publicspaces-annual-conference.md b/website/content_/english/events/publicspaces-annual-conference.md similarity index 100% rename from website/content/english/events/publicspaces-annual-conference.md rename to website/content_/english/events/publicspaces-annual-conference.md diff --git a/website/content/english/events/waag-state-internet-2024.md b/website/content_/english/events/waag-state-internet-2024.md similarity index 100% rename from website/content/english/events/waag-state-internet-2024.md rename to website/content_/english/events/waag-state-internet-2024.md diff --git a/website/content/english/pages/Consortium.md b/website/content_/english/pages/Consortium.md similarity index 100% rename from website/content/english/pages/Consortium.md rename to website/content_/english/pages/Consortium.md diff --git a/website/content/english/pages/Developers.md b/website/content_/english/pages/Developers.md similarity index 100% rename from website/content/english/pages/Developers.md rename to website/content_/english/pages/Developers.md diff --git a/website/content/english/pages/EC.md b/website/content_/english/pages/EC.md similarity index 100% rename from website/content/english/pages/EC.md rename to website/content_/english/pages/EC.md diff --git a/website/content/english/pages/Fediversity.md b/website/content_/english/pages/Fediversity.md similarity index 100% rename from website/content/english/pages/Fediversity.md rename to website/content_/english/pages/Fediversity.md diff --git a/website/content_/english/pages/Grants.md b/website/content_/english/pages/Grants.md new file mode 100755 index 0000000..7e22938 --- /dev/null +++ b/website/content_/english/pages/Grants.md @@ -0,0 +1,17 @@ +{ +meta = { + title = "Grants"; + description = "How to apply for grants as part of the Fediversity Project"; +}; +body = '' + Fediversity invites other people to join this ambitious development effort. It is a vast domain with many more challenges than what any preconceived effort could tackle by itself. This is why we invite your contribution to help us reshape the state of play, and together create an open, trustworthy and reliable internet for all. + + This is your opportunity to make a real difference. You tell us how your project can help Fediversity go harder, better, faster, stronger. In order to enable you to make such contributions, NLnet will award 450 000 euro in small to medium-size R&D grants towards solutions that bring the next generation of social networks closer. NLnet is seeking project proposals between 5.000 and 50.000 euro’s — which should get you on your way. + + Noteworthy fact: many projects which are to be deployed inside Fediversity were themselves bootstrapped on precisely such a grant from NGI, and now it is your turn. + + For more information on how to apply, check the NLnet website. +''; +} +--- + diff --git a/website/content/english/pages/Individuals.md b/website/content_/english/pages/Individuals.md similarity index 100% rename from website/content/english/pages/Individuals.md rename to website/content_/english/pages/Individuals.md diff --git a/website/content/english/pages/NLnet.md b/website/content_/english/pages/NLnet.md similarity index 100% rename from website/content/english/pages/NLnet.md rename to website/content_/english/pages/NLnet.md diff --git a/website/content/english/pages/NORDUnet.md b/website/content_/english/pages/NORDUnet.md similarity index 100% rename from website/content/english/pages/NORDUnet.md rename to website/content_/english/pages/NORDUnet.md diff --git a/website/content/english/pages/OID.md b/website/content_/english/pages/OID.md similarity index 100% rename from website/content/english/pages/OID.md rename to website/content_/english/pages/OID.md diff --git a/website/content/english/pages/Tweag.md b/website/content_/english/pages/Tweag.md similarity index 100% rename from website/content/english/pages/Tweag.md rename to website/content_/english/pages/Tweag.md diff --git a/website/content/english/pages/privacy-policy.md b/website/content_/english/pages/privacy-policy.md similarity index 100% rename from website/content/english/pages/privacy-policy.md rename to website/content_/english/pages/privacy-policy.md diff --git a/website/content/english/sections/call-to-action.md b/website/content_/english/sections/call-to-action.md similarity index 100% rename from website/content/english/sections/call-to-action.md rename to website/content_/english/sections/call-to-action.md diff --git a/website/content/english/sections/testimonial.md b/website/content_/english/sections/testimonial.md similarity index 100% rename from website/content/english/sections/testimonial.md rename to website/content_/english/sections/testimonial.md diff --git a/website/default.nix b/website/default.nix new file mode 100644 index 0000000..7a56fdb --- /dev/null +++ b/website/default.nix @@ -0,0 +1,36 @@ +{ sources ? import ./npins +, system ? builtins.currentSystem +, pkgs ? import sources.nixpkgs { + inherit system; + config = { }; + overlays = [ ]; + } +, lib ? import "${sources.nixpkgs}/lib" +, +}: +let + lib' = pkgs.callPackage ./lib.nix { }; + join = lib.concatStringsSep; +in +{ + site = pkgs.stdenv.mkDerivation { + name = "fediversity.eu"; + src = ./content; + buildPhase = '' + true + ''; + installPhase = '' + mkdir $out + '' + join "\n" (lib.mapAttrsToList + (name: value: '' + cp ${value} $out/${name} + '') + (lib'.files ./content)); + }; + shell = pkgs.mkShellNoCC { + packages = with pkgs; [ + cmark + npins + ]; + }; +} diff --git a/website/lib.nix b/website/lib.nix new file mode 100644 index 0000000..33770db --- /dev/null +++ b/website/lib.nix @@ -0,0 +1,18 @@ +{ pkgs, lib, ... }: +{ + files = dir: lib.mapAttrs' + ( + name: value: + let + html = "${lib.removeSuffix ".nix" name}.html"; + md = "${lib.removeSuffix ".nix" name}.md"; + in + { + name = html; + value = pkgs.runCommand html { buildInputs = with pkgs; [ cmark ]; } '' + cmark ${builtins.toFile md (import "${dir}/${name}").body} > $out + ''; + } + ) + (builtins.readDir dir); +} diff --git a/website/npins/default.nix b/website/npins/default.nix new file mode 100644 index 0000000..5e7d086 --- /dev/null +++ b/website/npins/default.nix @@ -0,0 +1,80 @@ +# Generated by npins. Do not modify; will be overwritten regularly +let + data = builtins.fromJSON (builtins.readFile ./sources.json); + version = data.version; + + mkSource = + spec: + assert spec ? type; + let + path = + if spec.type == "Git" then + mkGitSource spec + else if spec.type == "GitRelease" then + mkGitSource spec + else if spec.type == "PyPi" then + mkPyPiSource spec + else if spec.type == "Channel" then + mkChannelSource spec + else + builtins.throw "Unknown source type ${spec.type}"; + in + spec // { outPath = path; }; + + mkGitSource = + { + repository, + revision, + url ? null, + hash, + branch ? null, + ... + }: + assert repository ? type; + # At the moment, either it is a plain git repository (which has an url), or it is a GitHub/GitLab repository + # In the latter case, there we will always be an url to the tarball + if url != null then + (builtins.fetchTarball { + inherit url; + sha256 = hash; # FIXME: check nix version & use SRI hashes + }) + else + assert repository.type == "Git"; + let + urlToName = + url: rev: + let + matched = builtins.match "^.*/([^/]*)(\\.git)?$" repository.url; + + short = builtins.substring 0 7 rev; + + appendShort = if (builtins.match "[a-f0-9]*" rev) != null then "-${short}" else ""; + in + "${if matched == null then "source" else builtins.head matched}${appendShort}"; + name = urlToName repository.url revision; + in + builtins.fetchGit { + url = repository.url; + rev = revision; + inherit name; + # hash = hash; + }; + + mkPyPiSource = + { url, hash, ... }: + builtins.fetchurl { + inherit url; + sha256 = hash; + }; + + mkChannelSource = + { url, hash, ... }: + builtins.fetchTarball { + inherit url; + sha256 = hash; + }; +in +if version == 3 then + builtins.mapAttrs (_: mkSource) data.pins +else + throw "Unsupported format version ${toString version} in sources.json. Try running `npins upgrade`" diff --git a/website/npins/sources.json b/website/npins/sources.json new file mode 100644 index 0000000..ea60a22 --- /dev/null +++ b/website/npins/sources.json @@ -0,0 +1,11 @@ +{ + "pins": { + "nixpkgs": { + "type": "Channel", + "name": "nixpkgs-unstable", + "url": "https://releases.nixos.org/nixpkgs/nixpkgs-24.11pre691017.b69de56fac8c/nixexprs.tar.xz", + "hash": "0z32pj0lh5ng2a6cn0qfmka8cynnygckn5615mkaxq2aplkvgzx3" + } + }, + "version": 3 +} \ No newline at end of file diff --git a/website/shell.nix b/website/shell.nix new file mode 100644 index 0000000..a6bdf20 --- /dev/null +++ b/website/shell.nix @@ -0,0 +1 @@ +(import ./. { }).shell