add auto updater

This commit is contained in:
Abel Luck 2026-02-24 15:47:21 +01:00
parent eac7453a0d
commit b0eadea19e
17 changed files with 423 additions and 55 deletions

41
flake.nix Normal file
View file

@ -0,0 +1,41 @@
{
description = "Pinned matrix package versions";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
outputs =
{ self, nixpkgs, ... }:
let
forAllSystems = nixpkgs.lib.genAttrs [
"x86_64-linux"
"aarch64-linux"
];
in
{
packages = forAllSystems (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
update = pkgs.writeShellApplication {
name = "update-pins";
runtimeInputs = [
pkgs.git
pkgs.nix
pkgs.jq
pkgs.coreutils
];
text = builtins.readFile ./update.sh;
};
}
);
apps = forAllSystems (system: {
update = {
type = "app";
program = "${self.packages.${system}.update}/bin/update-pins";
};
});
};
}