-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
70 lines (66 loc) · 2.17 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
{
description = "Run Expo Prezzo Live!";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
devshell.url = "github:numtide/devshell";
};
outputs = { self, nixpkgs, flake-utils, devshell }:
flake-utils.lib.eachDefaultSystem (system:
let pkgs = import nixpkgs {
inherit system;
overlays = [
devshell.overlays.default
];
};
in
{
devShells.default =
pkgs.devshell.mkShell {
packages = [
pkgs.nodejs_18
];
env = [
{
name = "NODE_OPTIONS";
value = "--openssl-legacy-provider";
}
{
name = ''PORT'';
value = ''8001'';
}
];
commands = [
{
name = ''start'';
help = ''starts up prezzo's live server'';
command = ''setup && npm start'';
}
{
name = ''setup'';
help = ''ensure everying is installed and ready'';
command = ''npm install'';
}
{
name = ''new'';
help = ''Scaffold a new presentation from the template. ex: new collab-culture'';
command = ''
PREZZY_DIR=$(git rev-parse --show-toplevel)/static/presentations/$1
TEMPLATE_DIR=$(git rev-parse --show-toplevel)/template
mkdir -p $PREZZY_DIR
cp $TEMPLATE_DIR/presentation.org $PREZZY_DIR
cp $TEMPLATE_DIR/presentation.json $PREZZY_DIR
echo "New presentation template '$1' placed at $PREZZY_DIR"
echo "edit its presentation.org to create the slides"
echo "edit its presentation.json to control how it looks in our prezzy app"
echo " have fun!"
'';
}
];
motd = ''
{202}🔨 Welcome to expo prezzo{reset}
$(type -p menu &>/dev/null && menu)
'';
};
});
}