From 1dd590fd695d6bf044a14bd0d3b675f66e1442c1 Mon Sep 17 00:00:00 2001 From: Aditya Date: Tue, 28 May 2024 07:37:03 +0530 Subject: [PATCH] initial commit --- .gitmodules | 3 +++ archetypes/default.md | 5 +++++ flake.lock | 26 ++++++++++++++++++++++++++ flake.nix | 23 +++++++++++++++++++++++ hugo.toml | 3 +++ themes/hugo-book | 1 + 6 files changed, 61 insertions(+) create mode 100644 .gitmodules create mode 100644 archetypes/default.md create mode 100644 flake.lock create mode 100644 flake.nix create mode 100644 hugo.toml create mode 160000 themes/hugo-book diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..12744dd --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "themes/hugo-book"] + path = themes/hugo-book + url = https://github.com/alex-shpak/hugo-book diff --git a/archetypes/default.md b/archetypes/default.md new file mode 100644 index 0000000..c6f3fce --- /dev/null +++ b/archetypes/default.md @@ -0,0 +1,5 @@ ++++ +title = '{{ replace .File.ContentBaseName "-" " " | title }}' +date = {{ .Date }} +draft = true ++++ diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..248051d --- /dev/null +++ b/flake.lock @@ -0,0 +1,26 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1716819864, + "narHash": "sha256-mpmHHIruvDZIM0uUcr1ZEe3Eem4nnOLvaxjyhjJlKVI=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "b98544a6c41552f4e9557a22f1673182b1f51f0d", + "type": "github" + }, + "original": { + "owner": "nixos", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..fae27c4 --- /dev/null +++ b/flake.nix @@ -0,0 +1,23 @@ +{ + description = "A flake for publishing DSA stuff to https://dsa.adityakumar.xyz/"; + + inputs.nixpkgs.url = "github:nixos/nixpkgs"; + + outputs = { + self, + nixpkgs, + }: { + packages.x86_64-linux.default = with import nixpkgs {system = "x86_64-linux";}; + stdenv.mkDerivation { + name = "dsa"; + buildInputs = with pkgs; [ + bash + hugo + rsync + ]; + src = self; + buildPhase = "hugo server -D"; + installPhase = "bash deploy.sh"; + }; + }; +} diff --git a/hugo.toml b/hugo.toml new file mode 100644 index 0000000..7e568b8 --- /dev/null +++ b/hugo.toml @@ -0,0 +1,3 @@ +baseURL = 'https://example.org/' +languageCode = 'en-us' +title = 'My New Hugo Site' diff --git a/themes/hugo-book b/themes/hugo-book new file mode 160000 index 0000000..7c26d9b --- /dev/null +++ b/themes/hugo-book @@ -0,0 +1 @@ +Subproject commit 7c26d9b8b731d556a2bf89848f59e8300eabc44b