public gitea + nixarchy work
This commit is contained in:
1 parent
8bd66c9975
commit
a7c1b1cc0c
29 files changed
+1192
-97
No files matched your search
+53
-11
@@ -1,16 +1,58 @@
|
||||
{ pkgs, unstablePkgs, ai-usagebar, hermes-agent, ... }:
|
||||
{ pkgs, unstablePkgs, ai-usagebar, hermes-agent, nixarchy, skygUtils, config, ... }:
|
||||
let
|
||||
# Omarchy (nixarchy) shell, hand-wired — no nixarchy modules. The shell is
|
||||
# launched from configs/fwbook/hypr/conf/autostart.lua (omarchy-launch-shell).
|
||||
#
|
||||
# Workaround for an upstream bug in nixarchy v4.0.4-1: the omarchy package's
|
||||
# installPhase is one '' string whose least-indented lines are the shell-quoted
|
||||
# omarchy-theme-set patterns (indent 4), so Nix dedents the whole string by 4
|
||||
# and the inline `python3 -c '...'` menu check stays indented -> IndentationError.
|
||||
# Wrap that one invocation so its code is dedented before Python sees it.
|
||||
dedent = "${pkgs.gawk}/bin/awk 'BEGIN{m=9999} {l[NR]=$0; match($0,/^ */); if ($0 ~ /[^ ]/ && RLENGTH<m) m=RLENGTH} END{for(i=1;i<=NR;i++) print substr(l[i],m+1)}'";
|
||||
omarchy = ((pkgs.extend nixarchy.overlays.default).omarchy).overrideAttrs (old: {
|
||||
installPhase = builtins.replaceStrings
|
||||
[ "python3 -c '" "' $menu\n" ]
|
||||
[ "python3 -c \"$(printf '%s' '" "' | ${dedent})\" $menu\n" ]
|
||||
old.installPhase;
|
||||
});
|
||||
# The shell's runtime deps, minus hyprland (we keep the flake's Hyprland).
|
||||
omarchyRuntime = builtins.filter
|
||||
(d: !(pkgs.lib.hasPrefix "hyprland-" (d.name or "")))
|
||||
omarchy.passthru.runtimeDeps;
|
||||
gdk = pkgs.google-cloud-sdk.withExtraComponents (
|
||||
with pkgs.google-cloud-sdk.components;
|
||||
[
|
||||
gke-gcloud-auth-plugin
|
||||
kubectl
|
||||
]
|
||||
);
|
||||
in
|
||||
{
|
||||
# The shell resolves everything through OMARCHY_PATH.
|
||||
environment.sessionVariables.OMARCHY_PATH = "${omarchy}/share/omarchy";
|
||||
environment.sessionVariables.OMARCHY_SCREENSHOT_EDITOR = "satty-edit";
|
||||
|
||||
# ~/.config/omarchy -> configs/fwbook/omarchy (same pattern as hypr/noctalia).
|
||||
system.userActivationScripts.omarchyConfig.text =
|
||||
skygUtils.makeHyperlinkScriptToConfigs {
|
||||
filePath = "fwbook/omarchy";
|
||||
targetPath = "omarchy";
|
||||
configSource = "/home/${config.skyg.user.name}/nixos-setup/configs";
|
||||
};
|
||||
|
||||
environment.systemPackages =
|
||||
let
|
||||
gdk = pkgs.google-cloud-sdk.withExtraComponents (
|
||||
with pkgs.google-cloud-sdk.components;
|
||||
[
|
||||
gke-gcloud-auth-plugin
|
||||
kubectl
|
||||
]
|
||||
);
|
||||
in
|
||||
(with pkgs; [
|
||||
[ omarchy ]
|
||||
++ omarchyRuntime
|
||||
# Theme application: omarchy-theme-set-gnome writes gsettings, and every
|
||||
# theme names a Yaru icon variant.
|
||||
++ (with pkgs; [
|
||||
glib
|
||||
gsettings-desktop-schemas
|
||||
gnome-themes-extra
|
||||
yaru-theme
|
||||
adwaita-icon-theme
|
||||
])
|
||||
++ (with pkgs; [
|
||||
grim
|
||||
slurp
|
||||
wl-clipboard
|
||||
|
||||
@@ -36,7 +36,7 @@ in
|
||||
{ address = "10.0.101.3"; port = 3000; }
|
||||
{ address = "10.0.101.3"; port = 8080; }
|
||||
{ address = "10.0.101.3"; port = 9102; }
|
||||
{ address = "10.0.10.6"; port = 3000; }
|
||||
{ address = "10.0.101.8"; port = 3000; }
|
||||
];
|
||||
publish = [
|
||||
{ hostPort = ports.hermes; guestPort = 8642; }
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
./docker-registry.nix
|
||||
./gitea.nix
|
||||
./gitea-container.nix
|
||||
./nitw-gc.nix
|
||||
./public-gitea.nix
|
||||
./acme.nix
|
||||
./portainer.nix
|
||||
./iu.nix
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
{ config, skyg-secrets, ... }:
|
||||
{
|
||||
# Secret app. The whole container definition lives in the agenix secret
|
||||
# (see secrets/nitw-gc.age); this file only points at it.
|
||||
age.secrets.nitw-gc.file = skyg-secrets.nitw-gc;
|
||||
age.secrets.nitw-gc-home.file = skyg-secrets.nitw-gc-home;
|
||||
|
||||
skyg.nixos.common.container-services.nitw-gc = {
|
||||
enable = true;
|
||||
autoUpdate.enable = true;
|
||||
composeFile = config.age.secrets.nitw-gc.path;
|
||||
networks.lan = config.skyg.nixos.common.containers.networks.ipvlanLab.compose;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
{{template "base/head" .}}
|
||||
<div class="page-content home">
|
||||
<div class="ui container">
|
||||
|
||||
<div class="skyg-hero">
|
||||
<div class="skyg-logo">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 780 300" role="img" aria-label="SkyG logo">
|
||||
<defs>
|
||||
<linearGradient id="sky" x1="140" y1="24" x2="140" y2="250" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0" stop-color="#7EBAE4"/>
|
||||
<stop offset="0.42" stop-color="#B7DCF6"/>
|
||||
<stop offset="1" stop-color="#F4FBFF"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="shardA" x1="0" y1="0" x2="1" y2="1">
|
||||
<stop offset="0" stop-color="#7EBAE4"/>
|
||||
<stop offset="1" stop-color="#5277C3"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="shardB" x1="0" y1="0" x2="0" y2="1">
|
||||
<stop offset="0" stop-color="#649AFA"/>
|
||||
<stop offset="1" stop-color="#415E9A"/>
|
||||
</linearGradient>
|
||||
<clipPath id="hexClip">
|
||||
<polygon points="146,36 236,86 236,186 146,236 56,186 56,86"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
<g id="mark">
|
||||
<polygon points="146,28 244,82 244,190 146,244 48,190 48,82" fill="url(#sky)"/>
|
||||
<g clip-path="url(#hexClip)">
|
||||
<path d="M48 168 L86 136 L112 154 L146 118 L176 146 L206 128 L244 162 L244 244 L48 244 Z" fill="#D5EEFB"/>
|
||||
<path d="M92.0 168.0 L120.8 244.0 L100.1 242.3 L92.6 221.5 L77.4 239.1 L66.0 237.5 L61.7 226.5 L85.2 199.6 L76.4 179.7 Z" fill="#7EB1DD"/>
|
||||
<path d="M150.0 108.0 L202.7 204.1 L174.8 205.7 L160.8 179.3 L143.8 205.7 L128.3 205.7 L120.5 191.7 L146.9 151.4 L131.4 126.6 Z" fill="url(#shardA)"/>
|
||||
<path d="M198.0 150.0 L248.4 222.6 L226.1 226.2 L212.7 206.3 L201.3 228.8 L188.8 230.1 L181.4 219.6 L199.2 185.1 L184.7 166.5 Z" fill="url(#shardB)"/>
|
||||
<path d="M56 214 L108 168 L128 190 L146 156 L170 196 L196 166 L230 198 L244 214 L244 244 L56 244 Z" fill="#415E9A" opacity="0.92"/>
|
||||
<path d="M108 168 L128 190 L112 206 Z" fill="#7EBAE4"/>
|
||||
<path d="M170 196 L196 166 L214 188 Z" fill="#649AFA"/>
|
||||
<path d="M132 176 L150 148 L164 170" fill="none" stroke="#F4FBFF" stroke-width="3" stroke-linejoin="round" stroke-linecap="round"/>
|
||||
</g>
|
||||
<polygon points="146,28 244,82 244,190 146,244 48,190 48,82" fill="none" stroke="#5277C3" stroke-width="3.25" stroke-linejoin="round"/>
|
||||
<g fill="none" stroke="#4A6BAF" stroke-width="1.35" stroke-linecap="round">
|
||||
<path d="M146 62 V78"/>
|
||||
<path d="M146 62 H172 L184 74"/>
|
||||
<path d="M172 62 V50"/>
|
||||
</g>
|
||||
<g fill="#649AFA">
|
||||
<circle cx="146" cy="56" r="3"/>
|
||||
<circle cx="172" cy="62" r="2.1"/>
|
||||
<circle cx="184" cy="74" r="2.1"/>
|
||||
<circle cx="150" cy="108" r="2.4"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="wordmark">
|
||||
<text x="286" y="176" font-family="Montserrat, Segoe UI, Century Gothic, Futura, sans-serif" font-size="92" font-weight="600" letter-spacing="-1.2" fill="#1E3A66">Sky<tspan fill="#5277C3">G</tspan></text>
|
||||
<path d="M290 196 H408" fill="none" stroke="#7EBAE4" stroke-width="1.7" stroke-linecap="round"/>
|
||||
<circle cx="418" cy="196" r="2.2" fill="#649AFA"/>
|
||||
<path d="M428 196 H452" fill="none" stroke="#7EBAE4" stroke-width="1.7" stroke-linecap="round"/>
|
||||
</g>
|
||||
</svg>
|
||||
</div>
|
||||
<p class="skyg-tagline">Ariel Sosnovsky's Personal Projects and stuff</p>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.skyg-hero {
|
||||
text-align: center;
|
||||
padding: 56px 12px 24px;
|
||||
}
|
||||
.skyg-logo {
|
||||
max-width: 520px;
|
||||
margin: 0 auto;
|
||||
animation: skyg-rise .7s ease both;
|
||||
}
|
||||
.skyg-logo svg {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
.skyg-tagline {
|
||||
margin: 24px 0 0;
|
||||
font-size: 1.35rem;
|
||||
font-weight: 500;
|
||||
opacity: .75;
|
||||
animation: skyg-rise .7s .12s ease both;
|
||||
}
|
||||
@keyframes skyg-rise {
|
||||
from { opacity: 0; transform: translateY(14px); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
@media (max-width: 480px) {
|
||||
.skyg-hero { padding-top: 32px; }
|
||||
.skyg-tagline { font-size: 1.1rem; }
|
||||
}
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.skyg-logo,
|
||||
.skyg-tagline { animation: none !important; }
|
||||
}
|
||||
</style>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
@@ -0,0 +1,34 @@
|
||||
{ config, ... }:
|
||||
let
|
||||
app = config.skyg.internalNetworkingMap.apps.public-gitea;
|
||||
domain = "gitea.skyg.ca";
|
||||
in
|
||||
{
|
||||
skyg.nixos.common.container-services.public-gitea = {
|
||||
enable = true;
|
||||
autoUpdate.enable = true;
|
||||
networks.lan = config.skyg.nixos.common.containers.networks.ipvlanLab.compose;
|
||||
volumes.public-gitea-data = {
|
||||
driver = "local";
|
||||
driver_opts = {
|
||||
type = "nfs";
|
||||
o = "addr=tnas1.lab.internal,rw,nfsvers=4.0,nolock,hard,noatime";
|
||||
device = ":/mnt/SmallG/public-gitea-data";
|
||||
};
|
||||
};
|
||||
services.public-gitea = {
|
||||
image = "gitea/gitea:latest";
|
||||
networks.lan.ipv4_address = app.ip;
|
||||
environment = {
|
||||
GITEA_CUSTOM = "/data/custom";
|
||||
GITEA__server__DOMAIN = domain;
|
||||
GITEA__server__ROOT_URL = "https://${domain}/";
|
||||
GITEA__server__HTTP_PORT = "80";
|
||||
GITEA__service__DISABLE_REGISTRATION = "true";
|
||||
};
|
||||
volumes = [ "public-gitea-data:/data" ];
|
||||
files."/data/custom/templates/home.tmpl" =
|
||||
builtins.readFile ./public-gitea-home.tmpl;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -10,5 +10,9 @@
|
||||
postRun = "${pkgs.docker}/bin/docker restart caddy-caddy-1";
|
||||
orderBefore = [ "container-services-caddy" ];
|
||||
};
|
||||
certs."gitea.skyg.ca" = {
|
||||
postRun = "${pkgs.docker}/bin/docker restart caddy-caddy-1";
|
||||
orderBefore = [ "container-services-caddy" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -4,7 +4,9 @@ let
|
||||
nvr = config.skyg.internalNetworkingMap.apps.nvr;
|
||||
jellyfin = config.skyg.internalNetworkingMap.apps.jellyfin;
|
||||
portainer = config.skyg.internalNetworkingMap.apps.portainer;
|
||||
publicGitea = config.skyg.internalNetworkingMap.apps.public-gitea;
|
||||
certDomain = "home.sosnovsky.ca";
|
||||
giteaCertDomain = "gitea.skyg.ca";
|
||||
in
|
||||
{
|
||||
skyg.nixos.common.container-services.caddy = {
|
||||
@@ -27,10 +29,16 @@ in
|
||||
tls /etc/caddy/tls/fullchain.pem /etc/caddy/tls/key.pem
|
||||
reverse_proxy ${portainer.ip}:9000
|
||||
}
|
||||
gitea.skyg.ca {
|
||||
tls /etc/caddy/tls/gitea/fullchain.pem /etc/caddy/tls/gitea/key.pem
|
||||
reverse_proxy ${publicGitea.ip}:80
|
||||
}
|
||||
'';
|
||||
volumes = [
|
||||
"/var/lib/acme/${certDomain}/fullchain.pem:/etc/caddy/tls/fullchain.pem:ro"
|
||||
"/var/lib/acme/${certDomain}/key.pem:/etc/caddy/tls/key.pem:ro"
|
||||
"/var/lib/acme/${giteaCertDomain}/fullchain.pem:/etc/caddy/tls/gitea/fullchain.pem:ro"
|
||||
"/var/lib/acme/${giteaCertDomain}/key.pem:/etc/caddy/tls/gitea/key.pem:ro"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user