nixos-configs/apps/update/src/app.ts

71 lines
1.5 KiB
TypeScript
Raw Normal View History

import { spawnSync } from 'node:child_process';
import { parseArgs } from './lib.ts';
2024-07-20 20:30:43 -04:00
import { updateFirefoxAddons } from '././firefox.ts';
import { updateDocker, updateFlakeInputs, updateVuetorrent } from './misc.ts';
2024-07-20 20:30:43 -04:00
/* Constants */
const FLAKE = process.env.FLAKE;
if (!FLAKE) {
console.error('Env var FLAKE not found');
process.exit(1);
}
const args = parseArgs();
2024-07-20 20:30:43 -04:00
if (args['d'] || args['docker']) {
console.log(updateDocker());
}
if (args['i'] || args['inputs']) {
console.log(updateFlakeInputs());
}
2024-07-20 20:30:43 -04:00
if (args['f'] || args['firefox']) {
console.log(updateFirefoxAddons());
}
if (args['v'] || args['vuetorrent']) {
console.log(updateVuetorrent());
}
if (args['a'] || args['all']) {
chore: update flake.lock Flake Inputs: • Updated input 'discord-overlay': 'github:matt1432/discord-nightly-overlay/798e83f' (2024-07-27) → 'github:matt1432/discord-nightly-overlay/4df152b' (2024-07-29) • Updated input 'gpu-screen-recorder-src': 'git+https://repo.dec05eba.com/gpu-screen-recorder?ref=refs/heads/master&rev=5e2a233' (2024-07-26) → 'git+https://repo.dec05eba.com/gpu-screen-recorder?ref=refs/heads/master&rev=ddf3fa5' (2024-07-28) • Updated input 'gtk-theme-src': 'github:dracula/gtk/c9896cb' (2024-07-21) → 'github:dracula/gtk/100310f' (2024-07-29) • Updated input 'headscale': 'github:juanfont/headscale/4ad3f3c' (2024-07-22) → 'github:juanfont/headscale/06f0705' (2024-07-28) • Updated input 'home-manager': 'github:nix-community/home-manager/975b83c' (2024-07-27) → 'github:nix-community/home-manager/89670e2' (2024-07-29) • Updated input 'hyprland': 'git+https://github.com/hyprwm/Hyprland?ref=refs/heads/main&rev=729b47d46d0c749efbffe01ea863a124fad562b4&submodules=1' (2024-07-27) → 'git+https://github.com/hyprwm/Hyprland?ref=refs/heads/main&rev=e67322034037fef22079c8e480be38c1d04b5a4a&submodules=1' (2024-07-29) • Updated input 'hyprland/aquamarine': 'github:hyprwm/aquamarine/f95d1509370b7f40ef356ff69a332bd0356ab044?narHash=sha256-GFDSPWxOqEkNrbuSfyoQHGIaRhJNapn2Rv0EEmBGR9A%3D' (2024-07-26) → 'github:hyprwm/aquamarine/4918e57979bbdbd05aabb20f63e1cb5dc289bcbd?narHash=sha256-75Hcx5Zu0f%2BBeCkZxN1frkYacjbkwgCq%2Bz3doVgr4Hw%3D' (2024-07-27) • Updated input 'hyprland/hyprutils': 'github:hyprwm/hyprutils/962582a090bc233c4de9d9897f46794280288989?narHash=sha256-WAZ0X6yJW1hFG6otkHBfyJDKRpNP5stsRqdEuHrFRpk%3D' (2024-07-18) → 'github:hyprwm/hyprutils/5dcbbc1e3de40b2cecfd2007434d86e924468f1f?narHash=sha256-D3wIZlBNh7LuZ0NaoCpY/Pvu%2BxHxIVtSN%2BKkWZYvvVs%3D' (2024-07-27) • Updated input 'hyprland/xdph': 'github:hyprwm/xdg-desktop-portal-hyprland/5555f467f68ce7cdf1060991c24263073b95e9da?narHash=sha256-O17b38bQnmfxv7It3OnVYx7fp1seEdI7xxnw5vJFv30%3D' (2024-07-23) → 'github:hyprwm/xdg-desktop-portal-hyprland/0e2f3b9c85f7bab3983098a01366876d34daf383?narHash=sha256-Lj/g1UzrsTZUixtveQix6eB3pon2j23qv5/5pzTx0LQ%3D' (2024-07-28) • Updated input 'hyprland/xdph/hyprland-protocols': 'github:hyprwm/hyprland-protocols/1b61f0093afff20ab44d88ad707aed8bf2215290?narHash=sha256-HUklK5u86w2Yh9dOkk4FdsL8eehcOZ95jPhLixGDRQY%3D' (2024-06-18) → 'github:hyprwm/hyprland-protocols/5a11232266bf1a1f5952d5b179c3f4b2facaaa84?narHash=sha256-zCu4R0CSHEactW9JqYki26gy8h9f6rHmSwj4XJmlHgg%3D' (2024-07-18) • Updated input 'hyprgrass': 'github:horriblename/hyprgrass/736119f' (2024-06-14) → 'github:horriblename/hyprgrass/5c93341' (2024-07-28) • Updated input 'nix-gaming': 'github:fufexan/nix-gaming/dc966ed' (2024-07-27) → 'github:fufexan/nix-gaming/7a07614' (2024-07-29) • Updated input 'nix-gaming/umu': 'git+https://github.com/Open-Wine-Components/umu-launcher/?dir=packaging/nix&ref=refs/heads/main&rev=abbdeed&submodules=1' (2024-07-20) → 'git+https://github.com/Open-Wine-Components/umu-launcher/?dir=packaging/nix&ref=refs/heads/main&rev=7e00027&submodules=1' (2024-07-26) • Updated input 'nix-index-db': 'github:Mic92/nix-index-database/b6db9fd' (2024-07-21) → 'github:Mic92/nix-index-database/c0ca47e' (2024-07-28) • Updated input 'nixpkgs-wayland': 'github:nix-community/nixpkgs-wayland/9cf33b4' (2024-07-27) → 'github:nix-community/nixpkgs-wayland/6642ef6' (2024-07-28) • Updated input 'nixpkgs-wayland/lib-aggregate': 'github:nix-community/lib-aggregate/e0ea775' (2024-07-21) → 'github:nix-community/lib-aggregate/4ce8efe' (2024-07-28) • Updated input 'nixpkgs-wayland/lib-aggregate/nixpkgs-lib': 'github:nix-community/nixpkgs.lib/31a9902' (2024-07-21) → 'github:nix-community/nixpkgs.lib/d15f6f6' (2024-07-28) Docker Images: • rssbridge/rss-bridge latest: sha256:94480c924f35512e81ad846fd9968591c63d20221484b7774083055b990ab31f → sha256:5d8906da7276396e077e054eb7e646f4f02d639be60a0b3bded97ec751fc0700 • ghcr.io/linuxserver/calibre-web latest: sha256:604ae903f520bd5485bcbdb2f70ea460c90a559bca3d4ac3fc05b93da2737a0a → sha256:49660a8890e2e4356cbc4b8874ff5ad1ebc40f647fdb2419fc289700affebcf0 • ghcr.io/linuxserver/radarr latest: sha256:2a02b311cefb344cd0caf74a443b9d6318daf15bda5280a3bc732381db983dc3 → sha256:9d6f0548fd805edb30108fdd06d0fc5a4436c9bd708b57bd4119d7aefa815fe4 • ghcr.io/fallenbagel/jellyseerr develop: sha256:4faf2f19c7a2be559354821e7da57477c236a22afb78e17a40dd40a75a120435 → sha256:788f508bdb33812a77acc8281e1299ff95ddebd07aee40d452e4f0c74bb15dc9
2024-07-30 01:45:01 -04:00
// Update this first because of nix run cmd
const firefoxOutput = updateFirefoxAddons();
console.log(firefoxOutput);
const flakeOutput = updateFlakeInputs();
console.log(flakeOutput);
const dockerOutput = updateDocker();
console.log(dockerOutput);
const vuetorrentOutput = updateVuetorrent();
console.log(vuetorrentOutput);
chore: update flake.lock Flake Inputs: • Updated input 'discord-overlay': 'github:matt1432/discord-nightly-overlay/1e367d5' (2024-08-05) → 'github:matt1432/discord-nightly-overlay/b9f8aa6' (2024-08-06) • Updated input 'gtk-theme-src': 'github:dracula/gtk/100310f' (2024-07-29) → 'github:dracula/gtk/f339612' (2024-08-06) • Updated input 'home-manager': 'github:nix-community/home-manager/afc892d' (2024-08-02) → 'github:nix-community/home-manager/a6c7439' (2024-08-06) • Updated input 'hyprland': 'git+https://github.com/hyprwm/Hyprland?ref=refs/heads/main&rev=2b52057&submodules=1' (2024-08-04) → 'git+https://github.com/hyprwm/Hyprland?ref=refs/heads/main&rev=b0a70f6&submodules=1' (2024-08-06) • Updated input 'jovian': 'github:Jovian-Experiments/Jovian-NixOS/bcfe9dc' (2024-08-03) → 'github:Jovian-Experiments/Jovian-NixOS/99099d7' (2024-08-06) • Updated input 'nixd': 'github:nix-community/nixd/d938026' (2024-08-02) → 'github:nix-community/nixd/af1255e' (2024-08-06) • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/d049530' (2024-08-02) → 'github:NixOS/nixpkgs/cb9a96f' (2024-08-04) • Updated input 'nixpkgs-wayland': 'github:nix-community/nixpkgs-wayland/c2ccf4e' (2024-08-05) → 'github:nix-community/nixpkgs-wayland/2c512b8' (2024-08-06) • Updated input 'pcsd': 'github:matt1432/nixos-pcsd/bd2cfa7' (2024-08-02) → 'github:matt1432/nixos-pcsd/f7870c6' (2024-08-06) • Updated input 'sops-nix': 'github:Mic92/sops-nix/eb34eb5' (2024-07-27) → 'github:Mic92/sops-nix/8ae4779' (2024-08-05) • Updated input 'ts-for-gir-src': 'github:gjsify/ts-for-gir/70838c7' (2024-07-26) → 'github:gjsify/ts-for-gir/0141c0e' (2024-08-05) Docker Images: • rssbridge/rss-bridge latest: sha256:e13b87cd36a828237d9e284e66ca6fb55e1d9819d6c925e35a689e6b529aeb39 → sha256:5b080be160ac5e5c5a0d450f9e431a472b2ee9e95353d905628ed804efd96783 • ghcr.io/linuxserver/bazarr latest: sha256:e70de8a714ac57395d45052392001ec433b8f48aa1c204f13dae312cbcbe43af → sha256:4222fa316c51c2d0257384e5562541059698c220abbb00170eb93c3ddfa52d18 • ghcr.io/linuxserver/calibre-web latest: sha256:14c3eafe5aec2344581e27991adc6545c9928f54020b50affe1678b8b5f22021 → sha256:ff7e870dec503f5bd02c5a528ba1f96617900cb4853ef05176bfbc278b5d263d • craumix/jmusicbot latest: sha256:0afa4efbd43a718fba9108cdab8865f80bb1690f690920e732303d081507868d → sha256:ba0d7e7e4b1dba86981687e3c8ada6b7a7170c6b4884c12a16c6ee046e2df763
2024-08-06 22:23:42 -04:00
spawnSync('nix-fast-build', ['-f', `${FLAKE}#nixFastChecks`], {
shell: true,
stdio: [process.stdin, process.stdout, process.stderr],
});
console.log([
'chore: update flake.lock',
`Flake Inputs:\n${flakeOutput}`,
`Docker Images:\n${dockerOutput}`,
`Firefox Addons:\n${firefoxOutput}`,
`Misc Sources:\n${vuetorrentOutput}`,
].join('\n\n'));
}
spawnSync('alejandra', ['-q', FLAKE], { shell: true });