From 33b07da6390deb0541066c2c7847f07f9394f4c1 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 20 Nov 2018 01:16:22 +0100 Subject: l krops: add populate --- lass/krops.nix | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lass/krops.nix') diff --git a/lass/krops.nix b/lass/krops.nix index a898164c3..758c2a7d4 100644 --- a/lass/krops.nix +++ b/lass/krops.nix @@ -21,12 +21,20 @@ ]; in { + # usage: $(nix-build --no-out-link --argstr name HOSTNAME -A deploy) deploy = { target ? "root@${name}/var/src" }: pkgs.krops.writeDeploy "${name}-deploy" { source = source { test = false; }; inherit target; }; + # usage: $(nix-build --no-out-link --argstr name HOSTNAME --argstr target PATH -A populate) + populate = { target, force ? false }: pkgs.populate { + inherit force; + source = source { test = false; }; + target = lib.mkTarget target; + }; + # usage: $(nix-build --no-out-link --argstr name HOSTNAME --argstr target PATH -A test) test = { target }: pkgs.krops.writeTest "${name}-test" { force = true; -- cgit v1.2.3 From 5491f83171e5fb1c5cb62d8a763d19e584e23a20 Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 21 Nov 2018 04:58:55 +0100 Subject: l krops: add support for per host source.nix --- lass/krops.nix | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lass/krops.nix') diff --git a/lass/krops.nix b/lass/krops.nix index 758c2a7d4..c2669c8f2 100644 --- a/lass/krops.nix +++ b/lass/krops.nix @@ -5,6 +5,12 @@ pkgs ; + host-source = if lib.pathExists (./. + "/1systems/${name}/source.nix") then + import (./. + "/1systems/${name}/source.nix") { inherit lib pkgs; } + else + {} + ; + source = { test }: lib.evalSource [ krebs-source { @@ -18,6 +24,7 @@ }; }; } + host-source ]; in { -- cgit v1.2.3 From 61f1aba8bc69dc522710d5871545cf4b4ec8645b Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 27 Nov 2018 21:06:20 +0100 Subject: * krops: get nixpkgs from store for ci --- lass/krops.nix | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lass/krops.nix') diff --git a/lass/krops.nix b/lass/krops.nix index c2669c8f2..26668de65 100644 --- a/lass/krops.nix +++ b/lass/krops.nix @@ -1,5 +1,6 @@ { name }: let inherit (import ../krebs/krops.nix { inherit name; }) + krebs-nixpkgs krebs-source lib pkgs @@ -12,6 +13,7 @@ ; source = { test }: lib.evalSource [ + (krebs-nixpkgs { test = test; }) krebs-source { nixos-config.symlink = "stockholm/lass/1systems/${name}/physical.nix"; -- cgit v1.2.3 From 95f6255f586e93e096d56de75add76d7560b9df1 Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 28 Nov 2018 21:30:46 +0100 Subject: * krops: merge krebs-nixpkgs into krebs-source --- lass/krops.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lass/krops.nix') diff --git a/lass/krops.nix b/lass/krops.nix index 26668de65..d64454ea5 100644 --- a/lass/krops.nix +++ b/lass/krops.nix @@ -1,6 +1,5 @@ { name }: let inherit (import ../krebs/krops.nix { inherit name; }) - krebs-nixpkgs krebs-source lib pkgs @@ -13,8 +12,7 @@ ; source = { test }: lib.evalSource [ - (krebs-nixpkgs { test = test; }) - krebs-source + (krebs-source { test = test; }) { nixos-config.symlink = "stockholm/lass/1systems/${name}/physical.nix"; secrets = if test then { -- cgit v1.2.3