Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use the NixOps class interface from NixOS/nixops#1383
- Loading branch information
1 parent
0853724
commit 239b886
Showing
1 changed file
with
16 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,23 @@ | ||
import os.path | ||
import nixops.plugins | ||
from nixops.plugins import Plugin | ||
|
||
|
||
@nixops.plugins.hookimpl | ||
def nixexprs(): | ||
return [os.path.dirname(os.path.abspath(__file__)) + "/nix"] | ||
class NixopsAWSPlugin(Plugin): | ||
|
||
@staticmethod | ||
def nixexprs(): | ||
return [os.path.dirname(os.path.abspath(__file__)) + "/nix"] | ||
|
||
@staticmethod | ||
def load(): | ||
return [ | ||
"nixops_aws.resources", | ||
"nixops_aws.backends.ec2", | ||
"nixops_aws.resources.ec2_keypair", | ||
] | ||
|
||
|
||
@nixops.plugins.hookimpl | ||
def load(): | ||
return [ | ||
"nixops_aws.resources", | ||
"nixops_aws.backends.ec2", | ||
"nixops_aws.resources.ec2_keypair", | ||
] | ||
def plugin(): | ||
return NixopsAWSPlugin() |