add auto updater
This commit is contained in:
parent
eac7453a0d
commit
b0eadea19e
17 changed files with 423 additions and 55 deletions
41
flake.nix
Normal file
41
flake.nix
Normal 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";
|
||||
};
|
||||
});
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue