aboutsummaryrefslogtreecommitdiff
path: root/users/fcuny/blog/flake.nix
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-05-01 13:35:46 -0700
committerFranck Cuny <franck@fcuny.net>2022-05-01 13:35:46 -0700
commit5f41fd8b8b7cc2db152d4c353ce7da4c75e2dcf2 (patch)
treea0ce881de5ed91a24d6fb4fad6ffbca0ef581c9c /users/fcuny/blog/flake.nix
parentlayout: improve readability and remove /notes (diff)
downloadinfra-5f41fd8b8b7cc2db152d4c353ce7da4c75e2dcf2.tar.gz
build: slowly moving to nix
Add a `flake.nix' configuration to pull the required dependencies and run the server. Remove a few targets from the Makefile and move the deployment part to a script.
Diffstat (limited to 'users/fcuny/blog/flake.nix')
-rw-r--r--users/fcuny/blog/flake.nix19
1 files changed, 19 insertions, 0 deletions
diff --git a/users/fcuny/blog/flake.nix b/users/fcuny/blog/flake.nix
new file mode 100644
index 0000000..59ef578
--- /dev/null
+++ b/users/fcuny/blog/flake.nix
@@ -0,0 +1,19 @@
+{
+ description = "Franck Cuny's personal website.";
+
+ inputs = { nixpkgs.url = "github:nixos/nixpkgs"; };
+
+ outputs = { self, nixpkgs }:
+ let pkgs = nixpkgs.legacyPackages.x86_64-linux;
+ in {
+ defaultApp.x86_64-linux = self.apps.server;
+ apps.server = pkgs.writers.writeBashBin "server" ''
+ set -e
+ set -o pipefail
+ PATH=${pkgs.lib.makeBinPath [ pkgs.hugo pkgs.git ]}
+ hugo server
+ '';
+ devShell.x86_64-linux =
+ pkgs.mkShell { buildInputs = with pkgs; [ hugo flyctl git ]; };
+ };
+}