From ea474489c2c8482e54c7a4c056ae5ee0cc5dcf2a Mon Sep 17 00:00:00 2001 From: Daniel Kempkens Date: Fri, 27 May 2022 11:55:22 +0200 Subject: [PATCH] Cloudflare Pages --- .envrc | 1 + .gitignore | 1 + content/_headers | 6 ++++++ flake.lock | 43 ++++++++++++++++++++++++++++++++++++++++++ flake.nix | 18 ++++++++++++++++++ themes/hello-friend-ng | 2 +- 6 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 .envrc create mode 100644 content/_headers create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/.gitignore b/.gitignore index 9c63350..81db986 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ resources/ *~ *.swp *.swo +.hugo_build.lock diff --git a/content/_headers b/content/_headers new file mode 100644 index 0000000..5a25857 --- /dev/null +++ b/content/_headers @@ -0,0 +1,6 @@ +https://kempkens.io/* + X-Frame-Options: DENY + X-XSS-Protection: 1; mode=block + X-Content-Type-Options: nosniff + Referrer-Policy: no-referrer + Content-Security-Policy: default-src 'none'; script-src 'self'; img-src 'self'; style-src 'self' 'unsafe-inline' https://cdnjs.cloudflare.com; font-src 'self'; form-action 'none'; frame-ancestors 'none'; base-uri 'self' diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..808cf95 --- /dev/null +++ b/flake.lock @@ -0,0 +1,43 @@ +{ + "nodes": { + "flake-utils": { + "locked": { + "lastModified": 1652776076, + "narHash": "sha256-gzTw/v1vj4dOVbpBSJX4J0DwUR6LIyXo7/SuuTJp1kM=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "04c1b180862888302ddfb2e3ad9eaa63afc60cf8", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1653326962, + "narHash": "sha256-W8feCYqKTsMre4nAEpv5Kx1PVFC+hao/LwqtB2Wci/8=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "41cc1d5d9584103be4108c1815c350e07c807036", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..7ca8e7c --- /dev/null +++ b/flake.nix @@ -0,0 +1,18 @@ +{ + description = "kempkens.io build environment"; + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + inputs.flake-utils.url = "github:numtide/flake-utils"; + + outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = nixpkgs.legacyPackages.${system}; + in + { + devShells.default = pkgs.mkShell { + packages = with pkgs; [ + hugo + ]; + }; + }); +} diff --git a/themes/hello-friend-ng b/themes/hello-friend-ng index 57bd108..fff3cc7 160000 --- a/themes/hello-friend-ng +++ b/themes/hello-friend-ng @@ -1 +1 @@ -Subproject commit 57bd108819c412e1099ba090a92569e530867619 +Subproject commit fff3cc7bcd46476834e5a975e13dce0766c813bd