You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
957 B
29 lines
957 B
{
|
|
description = "Wedding site for Chris & Scotia 2023.";
|
|
|
|
inputs = {
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
};
|
|
|
|
outputs = inputs @ { self, nixpkgs, ... }:
|
|
inputs.flake-utils.lib.eachDefaultSystem (system:
|
|
let pkgs = nixpkgs.legacyPackages.${system};
|
|
weddingSiteDir = "$HOME/.local/source/wedding-site/public/";
|
|
weddingSiteTgt = "ubuntu@chrishayward.xyz:/var/www/wedding";
|
|
weddingSiteBuild = pkgs.writeShellScriptBind "wedding-site-build" ''
|
|
pushd ${weddingSiteDir}../ && ${pkgs.hugo}/bin/hugo -v && popd
|
|
'';
|
|
weddingSiteUpdate = pkgs.writeShellScriptBin "wedding-site-update" ''
|
|
${pkgs.rsync}/bin/rsync -aP ${weddingSiteDir} ${weddingSiteTgt}
|
|
'';
|
|
in
|
|
rec {
|
|
devShell = pkgs.mkShell {
|
|
buildInputs = with pkgs; [
|
|
hugo
|
|
weddingSiteUpdate
|
|
];
|
|
};
|
|
}
|
|
);
|
|
}
|