Initial Deployment Schema
This commit is contained in:
29
flake.nix
29
flake.nix
@@ -14,7 +14,34 @@
|
|||||||
# see https://github.com/nix-community/poetry2nix/tree/master#api for more functions and examples.
|
# see https://github.com/nix-community/poetry2nix/tree/master#api for more functions and examples.
|
||||||
inherit (poetry2nix.legacyPackages.${system}) mkPoetryApplication mkPoetryEnv;
|
inherit (poetry2nix.legacyPackages.${system}) mkPoetryApplication mkPoetryEnv;
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
in {
|
in rec {
|
||||||
|
|
||||||
|
hydraJobs = lib.optionalAttrs
|
||||||
|
(system == "x86_64-linux" ) {
|
||||||
|
handyhelper = packages.handyhelper;
|
||||||
|
runCommandHook = {
|
||||||
|
|
||||||
|
handyhelper = pkgs.runCommand "Handy Helper Deploy" {
|
||||||
|
nativeBuildInputs = [newalan];
|
||||||
|
} ''
|
||||||
|
cat << 'DOC' >> $out
|
||||||
|
#!${pkgs.runtimeShell}
|
||||||
|
export tmp=$(mktemp -d)
|
||||||
|
pushd $tmp
|
||||||
|
${pkgs.wget}/bin/wget \
|
||||||
|
https://git.syzygial.cc/Syzygial/HandyHelper/archive/${self.rev}.bundle
|
||||||
|
git clone * src
|
||||||
|
${pkgs.tree}/bin/tree
|
||||||
|
cd src
|
||||||
|
${pkgs.sops}/bin/sops -i -d secrets/deploy.nix
|
||||||
|
${pkgs.sops}/bin/sops -i -d secrets/deploy.sh
|
||||||
|
export flake="$tmp/src/deploy"
|
||||||
|
${pkgs.runtimeShell} ./secrets/deploy.sh
|
||||||
|
DOC
|
||||||
|
chmod +x $out
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
packages = {
|
packages = {
|
||||||
handyhelper = mkPoetryApplication { projectDir = self; };
|
handyhelper = mkPoetryApplication { projectDir = self; };
|
||||||
default = self.packages.${system}.myapp;
|
default = self.packages.${system}.myapp;
|
||||||
|
|||||||
Reference in New Issue
Block a user