Compare commits

...

2 commits

Author SHA1 Message Date
c295604a13 flake.nix: expose mattermost under packages.*
this makes it easier to update, e.g. by doing "nix-update -F
mattermost".
2024-08-30 17:56:10 +02:00
4dc9cdac91 flake.nix: move websites from packages.* to apps.*
this should not change their behaviour with "nix run", which was
the reason for putting them there in the first place (however, it does
remove the ability to build them with "nix build", but afaik this has
never been used by anyone).

This means the packages.* output is now left unused, so we can use it
instead for things that actually are programs which want to expose
(see the next commit after this one for an example).
2024-08-30 17:55:03 +02:00
7 changed files with 23 additions and 14 deletions

View file

@ -73,11 +73,20 @@
(system: deployLib: deployLib.deployChecks self.deploy)
deploy-rs.lib;
packages.x86_64-linux =
apps.x86_64-linux =
let
websites = self.nixosConfigurations.parsons.config.hacc.websites.builders;
mkApp = pkg: {
type = "app";
program = pkgs.lib.getExe pkg;
};
websites = pkgs.lib.mapAttrs (name: mkApp)
self.nixosConfigurations.parsons.config.hacc.websites.builders;
in
{ docs = websites."docs.hacc.space"; } // websites;
packages.x86_64-linux = {
inherit (pkgs) mattermost;
};
};
}

View file

@ -1,4 +1,4 @@
{ copyPathToStore, stdenvNoCC, zola, writeScriptBin }:
{ copyPathToStore, stdenvNoCC, zola, writeShellScriptBin }:
stdenvNoCC.mkDerivation rec {
name = "docs.hacc.space-static";
@ -15,7 +15,7 @@ stdenvNoCC.mkDerivation rec {
zola build --output-dir $out
'';
watch = writeScriptBin "watch" ''
watch = writeShellScriptBin "watch" ''
cd $(git rev-parse --show-toplevel)/websites/docs.hacc.space
${zola}/bin/zola serve --output-dir /tmp/hacc-docs "$@"
'';

View file

@ -1,4 +1,4 @@
{ stdenvNoCC, sfz, writeScriptBin }:
{ stdenvNoCC, sfz, writeShellScriptBin }:
stdenvNoCC.mkDerivation rec {
name = "hacc.earth-static";
@ -13,7 +13,7 @@ stdenvNoCC.mkDerivation rec {
rm $out/default.nix
'';
watch = writeScriptBin "watch" ''
watch = writeShellScriptBin "watch" ''
cd $(git rev-parse --show-toplevel)/websites/hacc.earth
${sfz}/bin/sfz "$@"
'';

View file

@ -1,4 +1,4 @@
{ stdenvNoCC, sfz, writeScriptBin }:
{ stdenvNoCC, sfz, writeShellScriptBin }:
stdenvNoCC.mkDerivation rec {
name = "muc.hacc.earth-static";
@ -13,7 +13,7 @@ stdenvNoCC.mkDerivation rec {
rm $out/default.nix
'';
watch = writeScriptBin "watch" ''
watch = writeShellScriptBin "watch" ''
cd $(git rev-parse --show-toplevel)/websites/help.studentsforfuture.info
${sfz}/bin/sfz "$@"
'';

View file

@ -1,4 +1,4 @@
{ jekyll, stdenvNoCC, writeScriptBin }:
{ jekyll, stdenvNoCC, writeShellScriptBin }:
stdenvNoCC.mkDerivation rec {
name = "infra4future.de-static";
@ -11,7 +11,7 @@ stdenvNoCC.mkDerivation rec {
${jekyll}/bin/jekyll build -d $out --disable-disk-cache
'';
watch = writeScriptBin "watch" ''
watch = writeShellScriptBin "watch" ''
cd $(git rev-parse --show-toplevel)/websites/infra4future.de
rm -rf /tmp/hacc-website
${jekyll}/bin/jekyll serve --disable-disk-cache -d /tmp/hacc-website "$@"

View file

@ -1,4 +1,4 @@
{ stdenvNoCC, sfz, writeScriptBin }:
{ stdenvNoCC, sfz, writeShellScriptBin }:
stdenvNoCC.mkDerivation rec {
name = "muc.hacc.earth-static";
@ -13,7 +13,7 @@ stdenvNoCC.mkDerivation rec {
rm $out/default.nix
'';
watch = writeScriptBin "watch" ''
watch = writeShellScriptBin "watch" ''
cd $(git rev-parse --show-toplevel)/websites/muc.hacc.earth
${sfz}/bin/sfz "$@"
'';

View file

@ -1,4 +1,4 @@
{ jekyll, stdenvNoCC, writeScriptBin }:
{ jekyll, stdenvNoCC, writeShellScriptBin }:
stdenvNoCC.mkDerivation rec {
name = "mumble.infra4future.de-static";
@ -11,7 +11,7 @@ stdenvNoCC.mkDerivation rec {
${jekyll}/bin/jekyll build -d $out --disable-disk-cache
'';
watch = writeScriptBin "watch" ''
watch = writeShellScriptBin "watch" ''
cd $(git rev-parse --show-toplevel)/websites/mumble.infra4future.de
rm -rf /tmp/hacc-website
${jekyll}/bin/jekyll serve --disable-disk-cache -d /tmp/hacc-website "$@"