vikunja clanService
This commit is contained in:
22
modules/clan/vikunja/default.nix
Normal file
22
modules/clan/vikunja/default.nix
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
_class = "clan.service";
|
||||||
|
manifest.name = "vikunja";
|
||||||
|
manifest.description = "The to-do app to organize your life.";
|
||||||
|
manifest.categories = [ "System" ];
|
||||||
|
|
||||||
|
roles.default = {
|
||||||
|
perInstance.nixosModule =
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
services.vikunja = {
|
||||||
|
enable = lib.mkDefault true;
|
||||||
|
frontendScheme = lib.mkDefault "http";
|
||||||
|
frontendHostname = lib.mkDefault "localhost";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
18
modules/clan/vikunja/flake-module.nix
Normal file
18
modules/clan/vikunja/flake-module.nix
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{ lib, ... }:
|
||||||
|
let
|
||||||
|
module = lib.modules.importApply ./default.nix { };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
clan.modules = {
|
||||||
|
vikunja = module;
|
||||||
|
};
|
||||||
|
perSystem =
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
clan.nixosTests.vikunja = {
|
||||||
|
imports = [ ./tests/vm/default.nix ];
|
||||||
|
|
||||||
|
clan.modules."@clan/vikunja" = module;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
39
modules/clan/vikunja/tests/vm/default.nix
Normal file
39
modules/clan/vikunja/tests/vm/default.nix
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
name = "service-vikunja";
|
||||||
|
|
||||||
|
clan = {
|
||||||
|
directory = ./.;
|
||||||
|
inventory = {
|
||||||
|
machines.server = { };
|
||||||
|
|
||||||
|
instances = {
|
||||||
|
vikunja-test = {
|
||||||
|
module.name = "@clan/vikunja";
|
||||||
|
module.input = "self";
|
||||||
|
roles.default.machines."server".settings = { };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
nodes = {
|
||||||
|
server = {
|
||||||
|
services.vikunja = {
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
testScript = ''
|
||||||
|
start_all()
|
||||||
|
|
||||||
|
server.wait_for_unit("vikunja")
|
||||||
|
|
||||||
|
# Check that garage is running
|
||||||
|
server.succeed("systemctl status vikunja")
|
||||||
|
|
||||||
|
'';
|
||||||
|
}
|
Reference in New Issue
Block a user