Skip to content

Commit 1ba5b2f

Browse files
committed
WIP projects/Goupile: init
Signed-off-by: phanirithvij <phanirithvij2000@gmail.com>
1 parent a98dd3a commit 1ba5b2f

File tree

6 files changed

+137
-0
lines changed

6 files changed

+137
-0
lines changed

projects/Goupile/default.nix

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{
2+
lib,
3+
pkgs,
4+
sources,
5+
...
6+
}@args:
7+
8+
{
9+
metadata = {
10+
summary = "Free design tool for Secure forms including Clinical Report Forms (eCRF)";
11+
subgrants = {
12+
Core = [ "Goupile" ];
13+
};
14+
links = {
15+
repo = {
16+
text = "Repository";
17+
url = "https://github.com/Koromix/rygel/tree/master/src/goupile";
18+
};
19+
homepage = {
20+
text = "Homepage";
21+
url = "https://goupile.org/en";
22+
};
23+
docs = {
24+
text = "User Documentation";
25+
url = "https://goupile.org/en/main";
26+
};
27+
};
28+
};
29+
30+
nixos.modules.services = {
31+
goupile = {
32+
name = "Goupile";
33+
module = ./services/goupile/module.nix;
34+
examples.basic = {
35+
module = ./services/goupile/examples/basic.nix;
36+
description = ''
37+
TODO example description
38+
'';
39+
tests.basic.module = import ./services/goupile/tests/basic.nix args;
40+
};
41+
links = {
42+
build = {
43+
text = "Build from source";
44+
url = "https://goupile.org/en/build";
45+
};
46+
test = {
47+
text = "Test instructions";
48+
url = "https://goupile.org/en/setup";
49+
};
50+
};
51+
};
52+
};
53+
54+
nixos.demo.shell = {
55+
module = ./demo/module.nix;
56+
module-demo = ./demo/module-demo.nix;
57+
usage-instructions = [
58+
{
59+
instruction = ''
60+
Run the vm
61+
'';
62+
}
63+
{
64+
instruction = ''
65+
Visit [http://127.0.0.1:8080](http://127.0.0.1:8080) in your browser
66+
'';
67+
}
68+
];
69+
tests.demo.module = import ./services/goupile/tests/basic.nix args;
70+
};
71+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
lib,
3+
config,
4+
...
5+
}:
6+
let
7+
cfg = config.services.goupile;
8+
in
9+
{
10+
config = lib.mkIf cfg.enable { };
11+
}

projects/Goupile/demo/module.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{ ... }:
2+
{
3+
services.goupile.enable = true;
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{ ... }:
2+
{
3+
services.goupile.enable = true;
4+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
config,
3+
lib,
4+
pkgs,
5+
...
6+
}:
7+
let
8+
cfg = config.services.goupile;
9+
in
10+
{
11+
options.services.goupile = {
12+
enable = lib.mkEnableOption "Goupile server";
13+
package = lib.mkPackageOption pkgs "goupile" { };
14+
};
15+
16+
config = lib.mkIf cfg.enable {
17+
systemd.services.goupile = { };
18+
};
19+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
sources,
3+
...
4+
}:
5+
6+
{
7+
name = "Goupile server";
8+
9+
nodes = {
10+
machine =
11+
{ ... }:
12+
{
13+
imports = [
14+
sources.modules.ngipkgs
15+
sources.modules.services.goupile
16+
sources.examples.Goupile.basic
17+
];
18+
};
19+
};
20+
21+
testScript =
22+
{ nodes, ... }:
23+
''
24+
start_all()
25+
26+
machine.succeed()
27+
'';
28+
}

0 commit comments

Comments
 (0)