vikunja implementation on b4l

This commit is contained in:
2025-07-24 11:39:06 +07:00
parent 1bfda37cba
commit 4fa7edfa1f
7 changed files with 54 additions and 3 deletions

16
flake.lock generated
View File

@@ -121,6 +121,21 @@
"type": "github"
}
},
"import-tree": {
"locked": {
"lastModified": 1752730890,
"narHash": "sha256-GES8fapSLGz36MMPRVNkSUWXUTtqvGQNXHjRmRLfJUY=",
"owner": "vic",
"repo": "import-tree",
"rev": "6ebb8cb87987b20264c09296166543fd3761d274",
"type": "github"
},
"original": {
"owner": "vic",
"repo": "import-tree",
"type": "github"
}
},
"nix-darwin": {
"inputs": {
"nixpkgs": [
@@ -191,6 +206,7 @@
"clan-core": "clan-core",
"devshell": "devshell",
"flake-parts": "flake-parts",
"import-tree": "import-tree",
"nixpkgs": "nixpkgs",
"treefmt-nix": "treefmt-nix"
}

View File

@@ -15,6 +15,7 @@
inputs.nixpkgs-lib.follows = "nixpkgs";
url = "github:hercules-ci/flake-parts";
};
import-tree.url = "github:vic/import-tree";
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
treefmt-nix = {
url = "github:numtide/treefmt-nix";

View File

@@ -54,6 +54,13 @@
};
roles.default.machines.b4l = { };
};
vikunja = {
module = {
name = "vikunja";
input = "self";
};
roles.default.machines.b4l = { };
};
};
services = {

View File

@@ -1,7 +1,7 @@
{ config, ... }:
{ inputs, config, ... }:
{
imports = [
(inputs.import-tree ./services)
];
nixpkgs.hostPlatform = {
system = "x86_64-linux";

View File

@@ -0,0 +1,26 @@
{ config, ... }:
{
clan.core.vars.generators.vikunja = {
files.subdomain.secret = false;
prompts = {
subdomain = {
persist = true;
type = "line";
description = "Sub-domain for Vikunja todo app. Default:(todo)";
};
};
script = ''cat $prompts/subdomain | echo "todo" > $out/subdomain'';
};
services.vikunja = {
frontendHostname = "${config.clan.core.vars.generators.vikunja.files.subdomain.value}.${config.networking.fqdn}";
};
services.nginx.virtualHosts."${config.services.vikunja.frontendHostname}" = {
useACMEHost = "${config.networking.fqdn}";
forceSSL = true;
locations."/" = {
proxyPass = "${config.services.vikunja.frontendScheme}://${config.services.vikunja.frontendHostname}:${builtins.toString config.services.vikunja.port}";
};
};
}

View File

@@ -6,7 +6,7 @@
clan = {
meta.name = "NewEdgeClan";
machines = { };
specialArgs = { inherit self; };
specialArgs = { inherit inputs self; };
inherit self;
};
}

View File

@@ -0,0 +1 @@
todo