aboutsummaryrefslogtreecommitdiff
path: root/users/fcuny/blog/default.nix
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-05-25 17:53:12 -0700
committerFranck Cuny <franck@fcuny.net>2022-05-25 17:53:12 -0700
commitfa4da9546d321b7837469cfd006ee45c57c3ae29 (patch)
treec4d47129fd9515b0fe5377da235f6e4b7eb2fe26 /users/fcuny/blog/default.nix
parentref(blog): drop the `enableGitInfo` option (diff)
downloadinfra-fa4da9546d321b7837469cfd006ee45c57c3ae29.tar.gz
ref(blog): drop the flake configuration
There's no need to have multiple `flake.nix` in the repository. Make the blog part of the flake configuration at the root level of the repository, delete the one in the blog, and update the documentation.
Diffstat (limited to 'users/fcuny/blog/default.nix')
-rw-r--r--users/fcuny/blog/default.nix30
1 files changed, 30 insertions, 0 deletions
diff --git a/users/fcuny/blog/default.nix b/users/fcuny/blog/default.nix
new file mode 100644
index 0000000..8c817f5
--- /dev/null
+++ b/users/fcuny/blog/default.nix
@@ -0,0 +1,30 @@
+{ pkgs, ... }:
+
+pkgs.stdenv.mkDerivation rec {
+ name = "fcuny.net";
+
+ src = ./.;
+
+ nativeBuildInputs = [ pkgs.hugo pkgs.git ];
+
+ installPhase = ''
+ mkdir -p $out
+ ${pkgs.hugo}/bin/hugo --minify -d $out/
+ '';
+
+ server = pkgs.writers.writeBashBin "run-server" ''
+ set -ueo pipefail
+ cd $(git rev-parse --show-toplevel)
+ cd users/fcuny/blog
+ export PATH=${pkgs.lib.makeBinPath [ pkgs.hugo pkgs.git ]}
+ hugo server -D
+ '';
+
+ meta = with pkgs.lib; {
+ description = "franck cuny's blog";
+ homepage = "https://fcuny.net";
+ license = licenses.mit;
+ platforms = platforms.linux;
+ maintainers = [ ];
+ };
+}