From 41014a0006f76aaec1e59259c2ece8602c539b4d Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Wed, 22 Sep 2021 21:57:17 +0200 Subject: Update CMS, add simple server for testing --- flake.lock | 27 ++++++++++++++++++++++----- flake.nix | 19 ++++++++++++++++++- 2 files changed, 40 insertions(+), 6 deletions(-) diff --git a/flake.lock b/flake.lock index 4469ec9..e60e7a5 100644 --- a/flake.lock +++ b/flake.lock @@ -6,11 +6,11 @@ "pkgs-personal": "pkgs-personal" }, "locked": { - "lastModified": 1629657671, - "narHash": "sha256-cmg2QMzQLAhpQg3n3Illx/Wgr3Sac6VuScStbLgJUA8=", + "lastModified": 1632338037, + "narHash": "sha256-Uj/6702xXVq0UDrY2v/LtmUQBguNpfuVmNyKisc4+Gg=", "ref": "master", - "rev": "254b008436f3649e77cd55154c77c949fdf3d3b4", - "revCount": 248, + "rev": "24373f1e7d2f536efac22caa71de50223aca12d7", + "revCount": 249, "type": "git", "url": "https://code.kummerlaender.eu/blog.kummerlaender.eu" }, @@ -71,7 +71,24 @@ }, "root": { "inputs": { - "cms": "cms" + "cms": "cms", + "stable": "stable" + } + }, + "stable": { + "locked": { + "lastModified": 1632291606, + "narHash": "sha256-oEN24XJYAFK9tsD13TzLEizpgQigEfgC6i9x1b/1pVU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "83413f47809790e4ca012e314e7782adeae36cf2", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-21.05", + "repo": "nixpkgs", + "type": "github" } } }, diff --git a/flake.nix b/flake.nix index 41a5ddd..5241ae6 100644 --- a/flake.nix +++ b/flake.nix @@ -2,10 +2,27 @@ 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, cms, ... }: { + 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"; + }; }; } -- cgit v1.2.3