diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..128e4d5 --- /dev/null +++ b/flake.lock @@ -0,0 +1,59 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1695837737, + "narHash": "sha256-KcqmJ5hNacLuE7fkz5586kp/vt4NLo6+Prq3DMgrxpQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "517501bcf14ae6ec47efd6a17dda0ca8e6d866f9", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs", + "utils": "utils" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1694529238, + "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..105ef01 --- /dev/null +++ b/flake.nix @@ -0,0 +1,20 @@ +{ + description = "Skynet Almnui Renew"; + + inputs = { + utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, nixpkgs, utils }: utils.lib.eachDefaultSystem (system: + let + pkgs = nixpkgs.legacyPackages."${system}"; + in rec { + # `nix build` + defaultPackage = pkgs.stdenv.mkDerivation { + name = "skynet-website-renew"; + src = self; + installPhase = "mkdir -p $out; cp -R src/* $out"; + }; + } + ); +} \ No newline at end of file diff --git a/update-renew-from-github.sh b/update-renew-from-github.sh deleted file mode 100644 index 45b60ce..0000000 --- a/update-renew-from-github.sh +++ /dev/null @@ -1,23 +0,0 @@ -#! /bin/sh -e - -# keep the files in renew up to date with git repo -# this script will be called from a cronjob every 7 days -# cwalsh 2020-10-10 - -# ensure we are in the correct directory -cd /var/www/html/renew - -# check the repo is available -git ls-remote http://github.com/ULCompSoc/skynet.ie-renew.git -q || { echo 'Repo not available' ; exit 1; } - -# delete all files in directory except for this script -ls | grep -v update-renew-from-github.sh | xargs rm -rf -- - -# clone renew directory -git clone http://github.com/ULCompSoc/skynet.ie-renew.git - -# copy files from git repo to main directory -cp -r skynet.ie-renew/* . - -# remove the git repo from the directory -rm -rf skynet.ie-renew