fix nixpkgs and trillium

This commit is contained in:
RingOfStorms (Joshua Bell) 2025-10-09 16:06:18 -05:00
parent 9e58c21946
commit 58348b3c83
4 changed files with 19 additions and 7 deletions

6
hosts/h001/flake.lock generated
View file

@ -1779,11 +1779,11 @@
}, },
"trilium-nixpkgs": { "trilium-nixpkgs": {
"locked": { "locked": {
"lastModified": 1759733170, "lastModified": 1759831965,
"narHash": "sha256-TXnlsVb5Z8HXZ6mZoeOAIwxmvGHp1g4Dw89eLvIwKVI=", "narHash": "sha256-vgPm2xjOmKdZ0xKA6yLXPJpjOtQPHfaZDRtH+47XEBo=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "8913c168d1c56dc49a7718685968f38752171c3b", "rev": "c9b6fb798541223bbb396d287d16f43520250518",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -4,7 +4,7 @@
}: }:
let let
declaration = "services/misc/litellm.nix"; declaration = "services/misc/litellm.nix";
nixpkgs = inputs.open-webui-nixpkgs; nixpkgs = inputs.litellm-nixpkgs;
pkgs = import nixpkgs { pkgs = import nixpkgs {
system = "x86_64-linux"; system = "x86_64-linux";
config.allowUnfree = true; config.allowUnfree = true;

View file

@ -5,7 +5,7 @@
}: }:
let let
declaration = "services/security/oauth2-proxy.nix"; declaration = "services/security/oauth2-proxy.nix";
nixpkgs = inputs.open-webui-nixpkgs; nixpkgs = inputs.oauth2-proxy-nixpkgs;
pkgs = import nixpkgs { pkgs = import nixpkgs {
system = "x86_64-linux"; system = "x86_64-linux";
config.allowUnfree = true; config.allowUnfree = true;
@ -40,7 +40,7 @@ in
# show-debug-on-error = "true"; # show-debug-on-error = "true";
# errors-to-info-log = "true"; # errors-to-info-log = "true";
}; };
cookie.refresh = "30m"; cookie.refresh = "12h";
# setXauthrequest = true; # setXauthrequest = true;
}; };

View file

@ -1,10 +1,11 @@
{ {
inputs, inputs,
lib,
... ...
}: }:
let let
declaration = "services/web-apps/trilium.nix"; declaration = "services/web-apps/trilium.nix";
nixpkgs = inputs.open-webui-nixpkgs; nixpkgs = inputs.trilium-nixpkgs;
pkgs = import nixpkgs { pkgs = import nixpkgs {
system = "x86_64-linux"; system = "x86_64-linux";
config.allowUnfree = true; config.allowUnfree = true;
@ -20,12 +21,23 @@ in
port = 9111; port = 9111;
host = "127.0.0.1"; host = "127.0.0.1";
dataDir = "/var/lib/trilium"; dataDir = "/var/lib/trilium";
# NOTE using oauth2-proxy for auth, ensure that is not removed below while keeping this on
noAuthentication = true; noAuthentication = true;
instanceName = "joshuabell"; instanceName = "joshuabell";
}; };
systemd.services.trilium-server.environment = { systemd.services.trilium-server.environment = {
TRILIUM_NO_UPLOAD_LIMIT = "true"; TRILIUM_NO_UPLOAD_LIMIT = "true";
# TRILIUM_PUBLIC_URL = "https://notes.joshuabell.xyz";
# TODO this did not work... sad we use oauth2-proxy instead
# TRILIUM_OAUTH_BASE_URL = "https://notes.joshuabell.xyz";
# TRILIUM_OAUTH_CLIENT_ID = "REPLACE";
# TRILIUM_OAUTH_CLIENT_SECRET = "REPLACE";
# TRILIUM_OAUTH_ISSUER_BASE_URL = "https://sso.joshuabell.xyz/.well-known/openid-configuration";
# TRILIUM_OAUTH_ISSUER_NAME = "SSO";
# TRILIUM_OAUTH_ISSUER_ICON = "https://cdn.jsdelivr.net/gh/selfhst/icons/svg/zitadel.svg";
}; };
services.oauth2-proxy.nginx.virtualHosts."notes.joshuabell.xyz" = { services.oauth2-proxy.nginx.virtualHosts."notes.joshuabell.xyz" = {