diff options
| author | Franck Cuny <franck@fcuny.net> | 2022-05-25 19:19:24 -0700 |
|---|---|---|
| committer | Franck Cuny <franck@fcuny.net> | 2022-05-25 19:19:24 -0700 |
| commit | c54e3a336fe460db3b4ec156beac452850838555 (patch) | |
| tree | 7dca8abd153d8d21a3afa6e2bd21687c37d7d77d /users/fcuny/notes/default.nix | |
| parent | ref(notes): don't rely on git for modified date (diff) | |
| download | infra-c54e3a336fe460db3b4ec156beac452850838555.tar.gz | |
ref(notes): drop flake.nix
There's no need to have a flake.nix for the notes, we can use the same
mechanism as for the blog and resume.
Add a README so I remember how to use this in the future.
Diffstat (limited to 'users/fcuny/notes/default.nix')
| -rw-r--r-- | users/fcuny/notes/default.nix | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/users/fcuny/notes/default.nix b/users/fcuny/notes/default.nix new file mode 100644 index 0000000..ee9ebb9 --- /dev/null +++ b/users/fcuny/notes/default.nix @@ -0,0 +1,30 @@ +{ pkgs, ... }: + +pkgs.stdenv.mkDerivation rec { + name = "notes.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/notes + export PATH=${pkgs.lib.makeBinPath [ pkgs.hugo pkgs.git ]} + hugo server -D + ''; + + meta = with pkgs.lib; { + description = "franck cuny's notes"; + homepage = "https://notes.fcuny.net"; + license = licenses.mit; + platforms = platforms.linux; + maintainers = [ ]; + }; +} |
