Add Nextcloud to NixOracle with dynamic project homepage
- services.nextcloud with PostgreSQL, hostName nextcloud.tadix.dev - nginx vhost with ACME for nextcloud.tadix.dev - Homepage PROJECTS section now fetches repos from Forgejo API - Added nextcloud link to footer
This commit is contained in:
parent
2f0af1d113
commit
b047f80dd1
2 changed files with 49 additions and 6 deletions
|
|
@ -69,6 +69,7 @@ in {
|
|||
|
||||
systemd.tmpfiles.rules = [
|
||||
"d /home/${username}/notebooks 0750 ${username} users -"
|
||||
"d /etc/nextcloud-secrets 0750 nextcloud nextcloud -"
|
||||
];
|
||||
|
||||
environment.etc."jupyter/jupyter_server_config.py".text = ''
|
||||
|
|
@ -95,6 +96,10 @@ in {
|
|||
forceSSL = true;
|
||||
root = "${site}";
|
||||
};
|
||||
virtualHosts."nextcloud.tadix.dev" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
};
|
||||
virtualHosts."git.tadix.dev" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
|
|
@ -129,6 +134,22 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
services.nextcloud = {
|
||||
enable = true;
|
||||
package = pkgs.nextcloud31;
|
||||
hostName = "nextcloud.tadix.dev";
|
||||
https = true;
|
||||
database.createLocally = true;
|
||||
config = {
|
||||
adminuser = "admin";
|
||||
adminpassFile = "/etc/nextcloud-secrets/admin-password";
|
||||
};
|
||||
settings = {
|
||||
default_phone_region = "BR";
|
||||
maintenance_window_start = 1;
|
||||
};
|
||||
};
|
||||
|
||||
services.forgejo = {
|
||||
enable = true;
|
||||
database.type = "sqlite3";
|
||||
|
|
|
|||
|
|
@ -22,12 +22,7 @@
|
|||
|
||||
<section>
|
||||
<h2>PROJECTS</h2>
|
||||
<p>
|
||||
<a href="https://biolab.tadix.dev">BioLab</a>
|
||||
<span class="dim"> — bioprocess modeling and parameter estimation tool</span>
|
||||
<br>
|
||||
<span class="dim"><a href="https://git.tadix.dev/ltadeu6/BioLab">source</a> · <a href="https://biolab.tadix.dev">live</a></span>
|
||||
</p>
|
||||
<div id="git-projects"><p class="dim">— loading —</p></div>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
|
|
@ -42,6 +37,33 @@
|
|||
<a href="https://github.com/ltadeu6">github</a>
|
||||
<a href="https://git.tadix.dev">git</a>
|
||||
<a href="https://jupyter.tadix.dev">jupyter</a>
|
||||
<a href="https://nextcloud.tadix.dev">nextcloud</a>
|
||||
</footer>
|
||||
|
||||
<script>
|
||||
(async () => {
|
||||
const el = document.getElementById('git-projects');
|
||||
try {
|
||||
const res = await fetch('https://git.tadix.dev/api/v1/users/ltadeu6/repos?sort=updated&limit=50');
|
||||
if (!res.ok) throw new Error(res.status);
|
||||
const repos = await res.json();
|
||||
const visible = repos.filter(r => !r.archived && !r.fork && !r.empty);
|
||||
if (!visible.length) {
|
||||
el.innerHTML = '<p class="dim">— no public repositories —</p>';
|
||||
return;
|
||||
}
|
||||
el.innerHTML = visible.map(r => {
|
||||
const desc = r.description ? `<span class="dim"> — ${r.description}</span>` : '';
|
||||
const live = r.website ? `<a href="${r.website}">live</a> · ` : '';
|
||||
return `<p>
|
||||
<a href="${r.html_url}">${r.name}</a>${desc}
|
||||
<br><span class="dim">${live}<a href="${r.html_url}">source</a></span>
|
||||
</p>`;
|
||||
}).join('');
|
||||
} catch {
|
||||
el.innerHTML = '<p class="dim">— could not load repositories —</p>';
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue