mirror of
https://github.com/thegeneralist01/config.git
synced 2026-12-04 18:56:56 +01:00
thegeneralist: add archivr Claude Code credentials and iPhone transfer support
This commit is contained in:
parent
2d7bab16d4
commit
8be7c15005
5 changed files with 41 additions and 0 deletions
BIN
hosts/thegeneralist/archivr/claude-credentials.age
Normal file
BIN
hosts/thegeneralist/archivr/claude-credentials.age
Normal file
Binary file not shown.
|
|
@ -16,9 +16,31 @@ in
|
||||||
];
|
];
|
||||||
environment = {
|
environment = {
|
||||||
ARCHIVR_TWITTER_CREDENTIALS_FILE = "/mnt/usb/archivr/creds.txt";
|
ARCHIVR_TWITTER_CREDENTIALS_FILE = "/mnt/usb/archivr/creds.txt";
|
||||||
|
ARCHIVR_CLAUDE_CLI = "/run/current-system/sw/bin/claude";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Claude Code credentials for the archivr service user (summarization provider).
|
||||||
|
age.secrets.claudeCredentials = {
|
||||||
|
file = ./claude-credentials.age;
|
||||||
|
owner = "archivr";
|
||||||
|
group = "archivr";
|
||||||
|
};
|
||||||
|
|
||||||
|
# claude binary in the system env so the archivr user can execute it.
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
claude-code
|
||||||
|
];
|
||||||
|
|
||||||
|
systemd.services.archivr-server.preStart = lib.mkAfter ''
|
||||||
|
${pkgs.coreutils}/bin/mkdir -p /var/lib/archivr-server/.claude
|
||||||
|
${pkgs.coreutils}/bin/cp ${config.age.secrets.claudeCredentials.path} /var/lib/archivr-server/.claude/.credentials.json
|
||||||
|
${pkgs.coreutils}/bin/chmod 600 /var/lib/archivr-server/.claude/.credentials.json
|
||||||
|
if [ ! -f /var/lib/archivr-server/.claude.json ]; then
|
||||||
|
${pkgs.coreutils}/bin/printf '{"hasCompletedOnboarding": true}\n' > /var/lib/archivr-server/.claude.json
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
|
||||||
# Ensure data directory ownership and mounts
|
# Ensure data directory ownership and mounts
|
||||||
systemd.services.archivr-data-ownership = {
|
systemd.services.archivr-data-ownership = {
|
||||||
description = "Prepare archivr permissions on /mnt/usb/archivr and /var/lib/archivr-server";
|
description = "Prepare archivr permissions on /mnt/usb/archivr and /var/lib/archivr-server";
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
./iphone-transfer.nix
|
||||||
./site.nix
|
./site.nix
|
||||||
./tailscale-ip.nix
|
./tailscale-ip.nix
|
||||||
./cache
|
./cache
|
||||||
|
|
@ -120,6 +121,14 @@
|
||||||
services.libinput.enable = true;
|
services.libinput.enable = true;
|
||||||
programs.firefox.enable = true;
|
programs.firefox.enable = true;
|
||||||
programs.zsh.enable = true;
|
programs.zsh.enable = true;
|
||||||
|
# NixOS needs nix-ld to run dynamically linked upstream binaries
|
||||||
|
# (Claude Code ships claude.exe linked against /lib64/ld-linux-x86-64.so.2).
|
||||||
|
programs.nix-ld.enable = true;
|
||||||
|
programs.nix-ld.libraries = with pkgs; [
|
||||||
|
stdenv.cc.cc.lib
|
||||||
|
zlib
|
||||||
|
openssl
|
||||||
|
];
|
||||||
|
|
||||||
# Set your time zone.
|
# Set your time zone.
|
||||||
time.timeZone = "Europe/Berlin";
|
time.timeZone = "Europe/Berlin";
|
||||||
|
|
|
||||||
9
hosts/thegeneralist/iphone-transfer.nix
Normal file
9
hosts/thegeneralist/iphone-transfer.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
services.usbmuxd.enable = true;
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
ifuse
|
||||||
|
libimobiledevice
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -6,6 +6,7 @@ in
|
||||||
"hosts/thegeneralist/acme/acmeEnvironment.age".publicKeys = [ thegeneralist ];
|
"hosts/thegeneralist/acme/acmeEnvironment.age".publicKeys = [ thegeneralist ];
|
||||||
"hosts/thegeneralist/cert.pem.age".publicKeys = [ thegeneralist ];
|
"hosts/thegeneralist/cert.pem.age".publicKeys = [ thegeneralist ];
|
||||||
"hosts/thegeneralist/credentials.age".publicKeys = [ thegeneralist ];
|
"hosts/thegeneralist/credentials.age".publicKeys = [ thegeneralist ];
|
||||||
|
"hosts/thegeneralist/archivr/claude-credentials.age".publicKeys = [ thegeneralist ];
|
||||||
"hosts/thegeneralist/cache/key.age".publicKeys = [ thegeneralist ];
|
"hosts/thegeneralist/cache/key.age".publicKeys = [ thegeneralist ];
|
||||||
"hosts/thegeneralist/forgejo/forgejo-runner-token.age".publicKeys = [ thegeneralist ];
|
"hosts/thegeneralist/forgejo/forgejo-runner-token.age".publicKeys = [ thegeneralist ];
|
||||||
"hosts/thegeneralist/readlater-bot-token.age".publicKeys = [ thegeneralist ];
|
"hosts/thegeneralist/readlater-bot-token.age".publicKeys = [ thegeneralist ];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue