l: kops -> krops

This commit is contained in:
lassulus 2018-06-07 08:24:56 +02:00
parent 16d306c784
commit 2e7f0ada01
3 changed files with 20 additions and 13 deletions

View File

@ -12,6 +12,14 @@ with import <stockholm/lib>;
krebs.build.host = config.krebs.hosts.blue; krebs.build.host = config.krebs.hosts.blue;
environment.shellAliases = {
deploy = pkgs.writeDash "deploy" ''
set -eu
export SYSTEM="$1"
$(nix-build $HOME/stockholm/lass/krops.nix --no-out-link --argstr name "$SYSTEM" -A deploy)
'';
};
networking.nameservers = [ "1.1.1.1" ]; networking.nameservers = [ "1.1.1.1" ];
lass.restic = genAttrs [ lass.restic = genAttrs [

View File

@ -140,14 +140,6 @@ with import <stockholm/lib>;
OnCalendar = "00:37"; OnCalendar = "00:37";
}; };
environment.shellAliases = {
deploy = pkgs.writeDash "deploy" ''
set -eu
export SYSTEM="$1"
$(nix-build $HOME/stockholm/lass/kops.nix --no-out-link --argstr name "$SYSTEM" -A deploy)
'';
};
nix.package = pkgs.nixUnstable; nix.package = pkgs.nixUnstable;
programs.adb.enable = true; programs.adb.enable = true;
users.users.mainUser.extraGroups = [ "adbusers" "docker" ]; users.users.mainUser.extraGroups = [ "adbusers" "docker" ];

View File

@ -1,5 +1,5 @@
{ name }: let { config ? config, name }: let
inherit (import ../krebs/kops.nix { inherit name; }) inherit (import ../krebs/krops.nix { inherit name; })
krebs-source krebs-source
lib lib
pkgs pkgs
@ -22,14 +22,21 @@
in { in {
# usage: $(nix-build --no-out-link --argstr name HOSTNAME -A deploy) # usage: $(nix-build --no-out-link --argstr name HOSTNAME -A deploy)
deploy = pkgs.kops.writeDeploy "${name}-deploy" { deploy = pkgs.krops.writeDeploy "${name}-deploy" {
source = source { test = false; }; source = source { test = false; };
target = "root@${name}/var/src"; target = "root@${name}/var/src";
}; };
# usage: $(nix-build --no-out-link --argstr name HOSTNAME -A test) # usage: $(nix-build --no-out-link --argstr name HOSTNAME -A test)
test = pkgs.kops.writeTest "${name}-test" { test = pkgs.krops.writeTest "${name}-test" {
source = source { test = true; }; source = source { test = true; };
target = "${lib.getEnv "HOME"}/tmp/${name}-kops-test-src"; target = "${lib.getEnv "HOME"}/tmp/${name}-krops-test-src";
}; };
ci = map (host:
pkgs.krops.writeTest "${host.name}-test" {
source = source { test = true; };
target = "${lib.getEnv "TMPDIR"}/lass/${host.name}";
}
) (lib.filter (host: lib.getAttr "ci" host && host.owner == "lass") (lib.attrValues config.krebs.hosts));
} }