Add littlelink
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -233,11 +233,11 @@ in
|
|||||||
unitConfig.ConditionPathExists = [ (lib.strings.escape [ " " ] c.source) ];
|
unitConfig.ConditionPathExists = [ (lib.strings.escape [ " " ] c.source) ];
|
||||||
what = c.source;
|
what = c.source;
|
||||||
where = c.target;
|
where = c.target;
|
||||||
options = lib.strings.concatStringsSep "," ([
|
options = lib.strings.concatStringsSep "," [
|
||||||
"bind"
|
"bind"
|
||||||
"X-fstrim.notrim"
|
"X-fstrim.notrim"
|
||||||
"x-gvfs-hide"
|
"x-gvfs-hide"
|
||||||
]);
|
];
|
||||||
}) all;
|
}) all;
|
||||||
|
|
||||||
services = builtins.listToAttrs (
|
services = builtins.listToAttrs (
|
||||||
|
@@ -8,6 +8,7 @@ in
|
|||||||
(import ./authelia { inherit user home; })
|
(import ./authelia { inherit user home; })
|
||||||
(import ./gitea { inherit user home; })
|
(import ./gitea { inherit user home; })
|
||||||
(import ./grafana { inherit user home; })
|
(import ./grafana { inherit user home; })
|
||||||
|
(import ./littlelink { inherit user home; })
|
||||||
(import ./media { inherit user home; })
|
(import ./media { inherit user home; })
|
||||||
(import ./nextcloud { inherit user home; })
|
(import ./nextcloud { inherit user home; })
|
||||||
(import ./ntfy { inherit user home; })
|
(import ./ntfy { inherit user home; })
|
||||||
|
@@ -0,0 +1,75 @@
|
|||||||
|
{ user, home }:
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
system,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
selfPkgs = inputs.self.packages.${system};
|
||||||
|
hmConfig = config.home-manager.users.${user};
|
||||||
|
inherit (hmConfig.virtualisation.quadlet) networks;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
home-manager.users.${user} = {
|
||||||
|
virtualisation.quadlet.containers.littlelink.containerConfig = {
|
||||||
|
image = "docker-archive:${selfPkgs.docker-littlelink-server}";
|
||||||
|
networks = [ networks.traefik.ref ];
|
||||||
|
environments = {
|
||||||
|
NAME = "Nikolaos Karaolidis";
|
||||||
|
META_TITLE = "Nikolaos Karaolidis";
|
||||||
|
META_DESCRIPTION = "Connect with me!";
|
||||||
|
META_AUTHOR = "Nikolaos Karaolidis";
|
||||||
|
META_INDEX_STATUS = "all";
|
||||||
|
|
||||||
|
LANG = "en";
|
||||||
|
THEME = "Dark";
|
||||||
|
|
||||||
|
OG_TITLE = "Nikolaos Karaolidis";
|
||||||
|
OG_SITE_NAME = "Nikolaos Karaolidis";
|
||||||
|
OG_URL = "https://social.karaolidis.com";
|
||||||
|
|
||||||
|
OG_IMAGE = "https://cloud.karaolidis.com/s/profile/preview";
|
||||||
|
OG_IMAGE_WIDTH = "400";
|
||||||
|
OG_IMAGE_HEIGHT = "400";
|
||||||
|
|
||||||
|
FAVICON_URL = "https://cloud.karaolidis.com/s/jupiter-favicon/preview";
|
||||||
|
|
||||||
|
AVATAR_URL = "https://cloud.karaolidis.com/s/profile/preview";
|
||||||
|
AVATAR_2X_URL = "https://cloud.karaolidis.com/s/profile/preview";
|
||||||
|
AVATAR_ALT = "Nick Karaolidis Profile Picture";
|
||||||
|
|
||||||
|
BUTTON_ORDER = lib.strings.concatStringsSep "," [
|
||||||
|
"GHOST"
|
||||||
|
"EMAIL"
|
||||||
|
"LINKED_IN"
|
||||||
|
"GITEA"
|
||||||
|
"GITHUB"
|
||||||
|
"INSTAGRAM"
|
||||||
|
"DISCORD"
|
||||||
|
"REDDIT"
|
||||||
|
"YOUTUBE"
|
||||||
|
"STEAM"
|
||||||
|
];
|
||||||
|
|
||||||
|
GHOST = "https://blog.karaolidis.com/";
|
||||||
|
EMAIL = "nick@karaolidis.com";
|
||||||
|
EMAIL_TEXT = "E-mail";
|
||||||
|
LINKED_IN = "https://www.linkedin.com/in/nikolaos-karaolidis";
|
||||||
|
GITEA = "https://git.karaolidis.com/karaolidis";
|
||||||
|
GITHUB = "https://github.com/karaolidis";
|
||||||
|
INSTAGRAM = "https://www.instagram.com/karaolidis";
|
||||||
|
DISCORD = "https://discord.com/users/Nick%%20Karaolidis#1594";
|
||||||
|
REDDIT = "https://www.reddit.com/user/Nikas36";
|
||||||
|
YOUTUBE = "https://www.youtube.com/@karaolidis";
|
||||||
|
STEAM = "https://steamcommunity.com/profiles/76561198118267119";
|
||||||
|
};
|
||||||
|
labels = [
|
||||||
|
"traefik.enable=true"
|
||||||
|
"traefik.http.routers.littlelink.rule=Host(`social.karaolidis.com`)"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@@ -82,7 +82,6 @@ in
|
|||||||
'oidc_login_provider_url' => 'https://id.karaolidis.com',
|
'oidc_login_provider_url' => 'https://id.karaolidis.com',
|
||||||
'oidc_login_client_id' => '${autheliaClientId}',
|
'oidc_login_client_id' => '${autheliaClientId}',
|
||||||
'oidc_login_client_secret' => '${hmConfig.sops.placeholder."nextcloud/authelia/password"}',
|
'oidc_login_client_secret' => '${hmConfig.sops.placeholder."nextcloud/authelia/password"}',
|
||||||
'oidc_login_auto_redirect' => true,
|
|
||||||
'oidc_login_logout_url' => 'https://id.karaolidis.com/logout',
|
'oidc_login_logout_url' => 'https://id.karaolidis.com/logout',
|
||||||
'oidc_login_end_session_redirect' => false,
|
'oidc_login_end_session_redirect' => false,
|
||||||
'oidc_login_button_text' => 'Log in with Authelia',
|
'oidc_login_button_text' => 'Log in with Authelia',
|
||||||
@@ -184,7 +183,7 @@ in
|
|||||||
"${volumes.nextcloud-log.ref}:/var/log/nextcloud"
|
"${volumes.nextcloud-log.ref}:/var/log/nextcloud"
|
||||||
"${volumes.nextcloud-config.ref}:/var/www/nextcloud/config"
|
"${volumes.nextcloud-config.ref}:/var/www/nextcloud/config"
|
||||||
"${volumes.nextcloud-apps.ref}:/var/www/nextcloud/apps"
|
"${volumes.nextcloud-apps.ref}:/var/www/nextcloud/apps"
|
||||||
"${hmConfig.sops.templates.nextcloud.path}:/var/www/nextcloud/config/override.config.php:ro"
|
"${hmConfig.sops.templates.nextcloud.path}:/var/www/nextcloud/config/config.override.php:ro"
|
||||||
];
|
];
|
||||||
environments = {
|
environments = {
|
||||||
POSTGRES_HOST = "nextcloud-postgresql";
|
POSTGRES_HOST = "nextcloud-postgresql";
|
||||||
|
@@ -12,21 +12,23 @@ pkgs.stdenv.mkDerivation rec {
|
|||||||
hash = "sha256-5aoGkqxMyvyK8EDsSE6kZa+dpExxVH2GRx2n87VusKE=";
|
hash = "sha256-5aoGkqxMyvyK8EDsSE6kZa+dpExxVH2GRx2n87VusKE=";
|
||||||
};
|
};
|
||||||
|
|
||||||
npmSrc = pkgs.buildNpmPackage ({
|
npmSrc = pkgs.buildNpmPackage {
|
||||||
inherit src pname version;
|
inherit src pname version;
|
||||||
|
|
||||||
npmDepsHash = "sha256-K/x9ZEMNO8D+SkvVPfqVJtZaDXY5gDApRRocg/POY68=";
|
npmDepsHash = "sha256-K/x9ZEMNO8D+SkvVPfqVJtZaDXY5gDApRRocg/POY68=";
|
||||||
dontNpmBuild = true;
|
dontNpmBuild = true;
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
cp -r . $out
|
cp -r . $out
|
||||||
'';
|
'';
|
||||||
});
|
};
|
||||||
|
|
||||||
# FIXME: https://github.com/NixOS/nixpkgs/issues/255890
|
# FIXME: https://github.com/NixOS/nixpkgs/issues/255890
|
||||||
wrapper = pkgs.writeShellApplication {
|
wrapper = pkgs.writeShellApplication {
|
||||||
name = pname;
|
name = pname;
|
||||||
runtimeInputs = with pkgs; [ bun ];
|
runtimeInputs = with pkgs; [ bun ];
|
||||||
text = ''
|
text = ''
|
||||||
bun ${npmSrc}/src/index.ts "$@"
|
exec bun ${npmSrc}/src/index.ts "$@"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -18,6 +18,7 @@
|
|||||||
docker-grafana-image-renderer = import ./docker/grafana-image-renderer { inherit pkgs; };
|
docker-grafana-image-renderer = import ./docker/grafana-image-renderer { inherit pkgs; };
|
||||||
docker-jellyfin = import ./docker/jellyfin { inherit pkgs inputs system; };
|
docker-jellyfin = import ./docker/jellyfin { inherit pkgs inputs system; };
|
||||||
docker-jellyseerr = import ./docker/jellyseerr { inherit pkgs; };
|
docker-jellyseerr = import ./docker/jellyseerr { inherit pkgs; };
|
||||||
|
docker-littlelink-server = import ./docker/littlelink-server { inherit pkgs inputs system; };
|
||||||
docker-mariadb = import ./docker/mariadb { inherit pkgs; };
|
docker-mariadb = import ./docker/mariadb { inherit pkgs; };
|
||||||
docker-nextcloud = import ./docker/nextcloud { inherit pkgs; };
|
docker-nextcloud = import ./docker/nextcloud { inherit pkgs; };
|
||||||
docker-ntfy = import ./docker/ntfy { inherit pkgs; };
|
docker-ntfy = import ./docker/ntfy { inherit pkgs; };
|
||||||
@@ -58,6 +59,8 @@
|
|||||||
|
|
||||||
linux-firmware-latest = import ./linux-firmware-latest { inherit pkgs; };
|
linux-firmware-latest = import ./linux-firmware-latest { inherit pkgs; };
|
||||||
|
|
||||||
|
littlelink-server = import ./littlelink-server { inherit pkgs; };
|
||||||
|
|
||||||
obsidian-plugin-better-word-count = import ./obsidian/plugins/better-word-count { inherit pkgs; };
|
obsidian-plugin-better-word-count = import ./obsidian/plugins/better-word-count { inherit pkgs; };
|
||||||
obsidian-plugin-dataview = import ./obsidian/plugins/dataview { inherit pkgs; };
|
obsidian-plugin-dataview = import ./obsidian/plugins/dataview { inherit pkgs; };
|
||||||
obsidian-plugin-excalidraw = import ./obsidian/plugins/excalidraw { inherit pkgs; };
|
obsidian-plugin-excalidraw = import ./obsidian/plugins/excalidraw { inherit pkgs; };
|
||||||
|
26
packages/docker/littlelink-server/default.nix
Normal file
26
packages/docker/littlelink-server/default.nix
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
system,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
selfPkgs = inputs.self.packages.${system};
|
||||||
|
in
|
||||||
|
pkgs.dockerTools.buildImage {
|
||||||
|
name = "littlelink-server";
|
||||||
|
fromImage = import ../base { inherit pkgs; };
|
||||||
|
|
||||||
|
copyToRoot = pkgs.buildEnv {
|
||||||
|
name = "root";
|
||||||
|
paths = with selfPkgs; [ littlelink-server ];
|
||||||
|
pathsToLink = [ "/bin" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
Entrypoint = [ "littlelink-server" ];
|
||||||
|
ExposedPorts = {
|
||||||
|
"3000/tcp" = { };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
52
packages/littlelink-server/default.nix
Normal file
52
packages/littlelink-server/default.nix
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
# AUTO-UPDATE: nix-update --flake --version=branch=main littlelink-server --subpackage yarnSrc
|
||||||
|
pkgs.stdenv.mkDerivation rec {
|
||||||
|
pname = "littlelink-server";
|
||||||
|
version = "0-unstable-2025-07-16";
|
||||||
|
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "techno-tim";
|
||||||
|
repo = "littlelink-server";
|
||||||
|
rev = "fa9fb3a20375c6287ae134af9c2e9e754e0aebb6";
|
||||||
|
hash = "sha256-BUPqXpiofHlLKgbOYkZr+QEoRIdRgr8alrUzcGS9edc=";
|
||||||
|
};
|
||||||
|
|
||||||
|
yarnSrc = pkgs.stdenv.mkDerivation {
|
||||||
|
inherit src pname version;
|
||||||
|
|
||||||
|
offlineCache = pkgs.fetchYarnDeps {
|
||||||
|
yarnLock = src + "/yarn.lock";
|
||||||
|
hash = "sha256-nv1NgMm56wWlAYqqdH9UKTnWNhjxWBs1lmG+UCCQAzk=";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = with pkgs; [
|
||||||
|
nodejs
|
||||||
|
yarnConfigHook
|
||||||
|
yarnBuildHook
|
||||||
|
npmHooks.npmInstallHook
|
||||||
|
];
|
||||||
|
|
||||||
|
yarnBuildFlags = [ "--noninteractive" ];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/lib/${pname}
|
||||||
|
cp -r build node_modules $out/lib/${pname}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
wrapper = pkgs.writeShellApplication {
|
||||||
|
name = pname;
|
||||||
|
runtimeInputs = with pkgs; [ nodejs_20 ];
|
||||||
|
text = ''
|
||||||
|
cd ${yarnSrc}/lib/${pname}
|
||||||
|
exec node build/server.js "$@"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
cp ${wrapper}/bin/${pname} $out/bin/
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta.mainProgram = pname;
|
||||||
|
}
|
Reference in New Issue
Block a user