diff options
Diffstat (limited to '')
-rw-r--r-- | examples/simple/flake.nix | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/examples/simple/flake.nix b/examples/simple/flake.nix new file mode 100644 index 0000000..6e516d3 --- /dev/null +++ b/examples/simple/flake.nix @@ -0,0 +1,23 @@ +{ + description = "Deploy GNU hello to localhost"; + + outputs = { self, nixpkgs }: { + deploy.nodes.example = { + hostname = "localhost"; + profiles.hello = { + user = "test_deploy"; + path = nixpkgs.legacyPackages.x86_64-linux.hello; + # Just to test that it's working + activate = "$PROFILE/bin/hello"; + }; + }; + checks = builtins.mapAttrs + (_: pkgs: { + jsonschema = pkgs.runCommandNoCC "jsonschema-deploy-simple" { } + "${pkgs.python3.pkgs.jsonschema}/bin/jsonschema -i ${ + pkgs.writeText "deploy.json" (builtins.toJSON self.deploy) + } ${../../interface/deploy.json} && touch $out"; + }) + nixpkgs.legacyPackages; + }; +} |