23 lines
611 B
Nix
23 lines
611 B
Nix
|
{ config, lib, pkgs, inputs, ... }:
|
||
|
let
|
||
|
repo-updater = pkgs.writeShellScriptBin "repo-updater"
|
||
|
(builtins.readFile ../../scripts/gitea/update-repo.sh);
|
||
|
in {
|
||
|
# Automate updating rust utility flake
|
||
|
systemd.services."rust-util-update" = {
|
||
|
environment = { XDG_RUNTIME_DIR = "/tmp"; };
|
||
|
path = with pkgs; [
|
||
|
git
|
||
|
inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.nurl
|
||
|
jq
|
||
|
curl
|
||
|
];
|
||
|
serviceConfig = {
|
||
|
ExecStart =
|
||
|
"${repo-updater}/bin/repo-updater gitea@git.stranger.systems:nix/Rust.git trunk";
|
||
|
Type = "oneshot";
|
||
|
User = "nathan";
|
||
|
};
|
||
|
};
|
||
|
}
|