aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix28
1 files changed, 28 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000..5241ae6
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,28 @@
+{
+ description = "blog.kummerlaender.eu";
+
+ inputs = {
+ stable.url = github:NixOS/nixpkgs/nixos-21.05;
+ cms.url = git+https://code.kummerlaender.eu/blog.kummerlaender.eu;
+ };
+
+ outputs = { self, stable, cms, ... }: {
+ defaultPackage.x86_64-linux = cms.generate ./.;
+
+ defaultApp.x86_64-linux = let
+ system = "x86_64-linux";
+
+ pkgs = import stable { inherit system; };
+
+ serve = pkgs.writeScriptBin "serve" ''
+ #!/bin/sh
+ pushd ${cms.generate ./.}
+ ${pkgs.gatling}/bin/gatling
+ popd
+ '';
+ in {
+ type = "app";
+ program = "${serve}/bin/serve";
+ };
+ };
+}