summaryrefslogtreecommitdiffstats
path: root/jeschli
diff options
context:
space:
mode:
Diffstat (limited to 'jeschli')
-rw-r--r--jeschli/2configs/git.nix8
-rw-r--r--jeschli/krops.nix40
2 files changed, 45 insertions, 3 deletions
diff --git a/jeschli/2configs/git.nix b/jeschli/2configs/git.nix
index e07af1bc0..a26022789 100644
--- a/jeschli/2configs/git.nix
+++ b/jeschli/2configs/git.nix
@@ -45,11 +45,13 @@ let
public = true;
hooks = {
post-receive = pkgs.git-hooks.irc-announce {
- nick = config.krebs.build.host.name;
channel = "#xxx";
+ nick = config.krebs.build.host.name;
+ refs = [
+ "refs/heads/master"
+ ];
server = "irc.r";
- verbose = true;
- branches = [ "master" ];
+ verbose = true;
};
};
};
diff --git a/jeschli/krops.nix b/jeschli/krops.nix
new file mode 100644
index 000000000..e55f207d3
--- /dev/null
+++ b/jeschli/krops.nix
@@ -0,0 +1,40 @@
+{ name }: let
+ inherit (import ../krebs/krops.nix { inherit name; })
+ krebs-source
+ lib
+ pkgs
+ ;
+
+ source = { test }: lib.evalSource [
+ krebs-source
+ {
+ nixos-config.symlink = "stockholm/jeschli/1systems/${name}/config.nix";
+ secrets = if test then {
+ file = toString ./2configs/tests/dummy-secrets;
+ } else {
+ pass = {
+ dir = "${lib.getEnv "HOME"}/.password-store";
+ name = "hosts/${name}";
+ };
+ };
+ }
+ ];
+
+in {
+ # usage: $(nix-build --no-out-link --argstr name HOSTNAME -A deploy)
+ deploy = pkgs.krops.writeDeploy "${name}-deploy" {
+ source = source { test = false; };
+ target = "root@${name}/var/src";
+ };
+
+ # usage: $(nix-build --no-out-link --argstr name HOSTNAME -A test)
+ test = pkgs.krops.writeTest "${name}-test" {
+ source = source { test = true; };
+ target = "${lib.getEnv "HOME"}/tmp/${name}-stockholm-test";
+ };
+
+ ci = pkgs.krops.writeTest "${name}-test" {
+ source = source { test = true; };
+ target = "${lib.getEnv "HOME"}/stockholm-build";
+ };
+}