diff options
author | notgne2 | 2020-09-28 16:17:31 -0700 |
---|---|---|
committer | notgne2 | 2020-09-28 16:17:31 -0700 |
commit | edaed825650eea32878441d3b8c7eb40e8877882 (patch) | |
tree | ba0e313a5cd2711de11e9fe9d973073171519ee5 /examples/simple/flake.nix | |
parent | 239d0f8999b47e9e76589ee1fa2d9f3459c47335 (diff) |
Add examples
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; + }; +} |