fix remote build
This commit is contained in:
Submodule machines/android updated: f7f727a361...a642257fb3
Submodule machines/homebox updated: 07b9b65382...b9d78079d2
Submodule machines/laptop updated: 2c71c6b3b8...daa1c40a98
@@ -1,4 +1,4 @@
|
|||||||
{ config, lib, nixpkgs, ... }: {
|
{ config, lib, pkgs, nixpkgs, ... }: {
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
./services
|
./services
|
||||||
@@ -65,13 +65,25 @@
|
|||||||
createHome = false;
|
createHome = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
sops.secrets = let
|
||||||
|
machines = builtins.readDir ../machines;
|
||||||
|
in lib.mkIf config.sops.remoteBuildHost (builtins.listToAttrs
|
||||||
|
(builtins.map
|
||||||
|
(x: { name = "remoteBuildClientKeys/${x}"; value = { sopsFile = ./secrets.yaml; }; })
|
||||||
|
(builtins.filter
|
||||||
|
(x: machines.${x} == "directory" && (import ../machines/${x} { config = {}; inputs = {}; inherit lib pkgs; }).config.sysconfig.remoteBuildClient)
|
||||||
|
machines
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
sops.templates."remote-builder" = lib.mkIf config.sysconfig.remoteBuildHost {
|
sops.templates."remote-builder" = lib.mkIf config.sysconfig.remoteBuildHost {
|
||||||
content = builtins.concatStringsSep ''''\n'' (builtins.map
|
content = builtins.concatStringsSep ''''\n'' (builtins.map
|
||||||
(y: config.sops.placeholder.${y})
|
(y: config.sops.placeholder.${y})
|
||||||
(builtins.partition
|
(builtins.filter
|
||||||
(x: (builtins.match "^remoteBuildClientKeys/.+" x) != null)
|
(x: (builtins.match "^remoteBuildClientKeys/.+" x) != null)
|
||||||
(builtins.attrNames config.sops.secrets)
|
(builtins.attrNames config.sops.secrets)
|
||||||
).right
|
)
|
||||||
);
|
);
|
||||||
path = "/etc/ssh/authorized_keys.d/remote-builder";
|
path = "/etc/ssh/authorized_keys.d/remote-builder";
|
||||||
owner = "remote-builder";
|
owner = "remote-builder";
|
||||||
|
|||||||
Reference in New Issue
Block a user