matt1432
838727c4be
All checks were successful
Discord / discord commits (push) Has been skipped
Flake Inputs: • Updated input 'astal': 'github:Aylur/astal/004b123' (2024-10-22) → 'github:Aylur/astal/306e649' (2024-10-23) • Updated input 'custom-sidebar-src': 'github:elchininet/custom-sidebar/80942f5' (2024-10-21) → 'github:elchininet/custom-sidebar/5962ac7' (2024-10-24) • Updated input 'discord-overlay': 'github:matt1432/discord-nightly-overlay/256588e' (2024-10-06) → 'github:matt1432/discord-nightly-overlay/e4547ee' (2024-10-23) • Updated input 'gpu-screen-recorder-src': 'git+https://repo.dec05eba.com/gpu-screen-recorder?ref=refs/heads/master&rev=1016597' (2024-10-18) → 'git+https://repo.dec05eba.com/gpu-screen-recorder?ref=refs/heads/master&rev=422f214' (2024-10-22) • Updated input 'gtk-theme-src': 'github:dracula/gtk/e5c95d7' (2024-10-12) → 'github:dracula/gtk/a698492' (2024-10-21) • Updated input 'home-manager': 'github:nix-community/home-manager/1e27f21' (2024-10-20) → 'github:nix-community/home-manager/5ec753a' (2024-10-21) • Updated input 'hyprgrass': 'github:horriblename/hyprgrass/1535962' (2024-10-09) → 'github:horriblename/hyprgrass/76063c5' (2024-10-24) • Updated input 'hyprland': 'github:hyprwm/Hyprland/62ee5cc' (2024-10-19) → 'github:hyprwm/Hyprland/cdac649' (2024-10-23) • Updated input 'jovian': 'github:Jovian-Experiments/Jovian-NixOS/bb69165' (2024-10-17) → 'github:Jovian-Experiments/Jovian-NixOS/82bdda1' (2024-10-21) • Updated input 'material-rounded-theme-src': 'github:Nerwyn/material-rounded-theme/40f93bd' (2024-10-10) → 'github:Nerwyn/material-rounded-theme/c722d1e' (2024-10-23) • Updated input 'material-symbols-src': 'github:beecho01/material-symbols/12c2a76' (2024-10-22) → 'github:beecho01/material-symbols/26224d6' (2024-10-23) • Updated input 'nix-gaming': 'github:fufexan/nix-gaming/177e270' (2024-10-20) → 'github:fufexan/nix-gaming/af2e2e0' (2024-10-24) • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/4c2fcb0' (2024-10-18) → 'github:NixOS/nixpkgs/1997e4a' (2024-10-20) • Updated input 'nixpkgs-wayland': 'github:nix-community/nixpkgs-wayland/7c64c3c' (2024-10-20) → 'github:nix-community/nixpkgs-wayland/7832830' (2024-10-23) • Updated input 'sops-nix': 'github:Mic92/sops-nix/c504fd7' (2024-10-20) → 'github:Mic92/sops-nix/d089e74' (2024-10-23) • Updated input 'spotifyplus-src': 'github:thlucas1/homeassistantcomponent_spotifyplus/2cd0654' (2024-10-05) → 'github:thlucas1/homeassistantcomponent_spotifyplus/188f1ec' (2024-10-22) • Updated input 'tuya-local-src': 'github:make-all/tuya-local/38744c0' (2024-10-21) → 'github:make-all/tuya-local/6ebc191' (2024-10-22) Docker Images: • vegardit/gitea-act-runner dind-latest: sha256:74c7cddafcf4c8cadad1317f043cd7ed9f675617197051d38812b262a7afd82b → sha256:456898884eb289ef4590e654804e05b84866279495768bf12bc91451ca160329 • ghcr.io/linuxserver/bazarr latest: sha256:5baf571c177eda579fbaa080ade2135bce9097bc3c165f92d30e399df64d0bc4 → sha256:5e915ab0bdf0aed036f2bce05abcfa85e4fb748df982cdbca1e600a77e02ab24 • ghcr.io/linuxserver/prowlarr latest: sha256:806916104582ff18024b1234a0c82e113c160037f0bf0e6c076e14528bbab331 → sha256:1e2fffd859ecd260e4aae4798cf5be75938cd602161d21b1d58122afb397c864 • ghcr.io/linuxserver/sabnzbd latest: sha256:ab4fc46cb5e2702f640b28bdc9b460c98b73a9898dd61f7068229f140c26409a → sha256:293517b90ef929178387f07c074c1f88d96d94eac3c1d95944ba2891527c1396 Misc Sources: Vuetorrent: 2.14.1 -> 2.15.0
96 lines
2.8 KiB
TypeScript
96 lines
2.8 KiB
TypeScript
import { readdirSync, writeFileSync } from 'node:fs';
|
|
import { spawnSync } from 'node:child_process';
|
|
|
|
import { parseFetchurl } from './lib.ts';
|
|
|
|
|
|
/* Constants */
|
|
const FLAKE = process.env.FLAKE;
|
|
|
|
export const updateFlakeInputs = () => {
|
|
const output = spawnSync(
|
|
`git restore flake.lock &> /dev/null; nix flake update --flake ${FLAKE}` +
|
|
' |& grep -v "warning: updating lock file" |& grep -v "unpacking"',
|
|
[],
|
|
{ shell: true },
|
|
).stdout
|
|
.toString()
|
|
// Add an extra blank line between inputs
|
|
.split('\n•')
|
|
.join('\n\n•')
|
|
// Shorten git revs to help readability
|
|
.split('\n')
|
|
.map((l) => l
|
|
.replace(/.{33}\?narHash=sha256[^']*/, '')
|
|
.replace(/&rev=(.{7})[^'&]*/, (_, backref) => `&rev=${backref}`))
|
|
.join('\n');
|
|
|
|
return output;
|
|
};
|
|
|
|
export const updateDocker = () => {
|
|
let updates = '';
|
|
|
|
console.log('Updating jfa-go image');
|
|
updates += spawnSync('updateImages',
|
|
[`${FLAKE}/devices/nos/modules/jellyfin`],
|
|
{ shell: true })
|
|
.stdout.toString();
|
|
|
|
console.log('Updating netdaemon image');
|
|
updates += spawnSync('updateImages',
|
|
[`${FLAKE}/devices/homie/modules/home-assistant/netdaemon`],
|
|
{ shell: true })
|
|
.stdout.toString();
|
|
|
|
const FILE = `${FLAKE}/devices/nos/modules/docker`;
|
|
|
|
readdirSync(FILE, { withFileTypes: true, recursive: true }).forEach((path) => {
|
|
if (path.name === 'compose.nix') {
|
|
console.log(`Updating ${path.parentPath.split('/').at(-1)} images`);
|
|
updates += spawnSync('updateImages', [path.parentPath], { shell: true })
|
|
.stdout.toString();
|
|
}
|
|
});
|
|
|
|
return updates;
|
|
};
|
|
|
|
const genVueText = (
|
|
version: string,
|
|
hash: string,
|
|
url: string,
|
|
) => `# This file was autogenerated. DO NOT EDIT!
|
|
{
|
|
version = "${version}";
|
|
url = "${url}";
|
|
hash = "${hash}";
|
|
}
|
|
`;
|
|
|
|
export const updateVuetorrent = () => {
|
|
const FILE = `${FLAKE}/devices/nos/modules/qbittorrent/vuetorrent.nix`;
|
|
|
|
const OLD_VERSION = JSON.parse(spawnSync('nix',
|
|
['eval', '-f', FILE, '--json'],
|
|
{ shell: true }).stdout.toString()).version;
|
|
|
|
const VERSION = JSON.parse(spawnSync('curl',
|
|
['-s', 'https://api.github.com/repos/VueTorrent/VueTorrent/releases/latest'],
|
|
{ shell: true }).stdout.toString()).tag_name.replace('v', '');
|
|
|
|
const URL = `https://github.com/VueTorrent/VueTorrent/releases/download/v${VERSION}/vuetorrent.zip`;
|
|
const HASH = parseFetchurl(URL);
|
|
|
|
const fileText = genVueText(VERSION, HASH, URL);
|
|
|
|
writeFileSync(FILE, fileText);
|
|
|
|
return OLD_VERSION !== VERSION ? `Vuetorrent: ${OLD_VERSION} -> ${VERSION}` : '';
|
|
};
|
|
|
|
export const updateCustomSidebarDeps = () => spawnSync(
|
|
`nix run ${FLAKE}#lovelace-components.custom-sidebar.update`,
|
|
[],
|
|
{ shell: true },
|
|
).stderr.toString();
|