help
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{ config, lib, pkgs, inputs, modulesPath, ... }: {
|
||||
{ config, lib, nixpkgs, ... }: {
|
||||
|
||||
imports = [
|
||||
./services
|
||||
@@ -28,41 +28,10 @@
|
||||
|
||||
config = {
|
||||
|
||||
sops.secrets = (if config.sysconfig.remoteBuildHost then (
|
||||
builtins.listToAttrs
|
||||
(builtins.map
|
||||
(y: {
|
||||
name = "remoteBuildClientKeys/${y}";
|
||||
value = {
|
||||
format = "yaml";
|
||||
sopsFile = ./secrets.yaml;
|
||||
};
|
||||
})
|
||||
(builtins.partition
|
||||
(z: let
|
||||
cfg = if
|
||||
((builtins.readDir ./configuration).${z} == "directory")
|
||||
then (import ./configuration/${z} {
|
||||
config = {};
|
||||
inherit lib pkgs inputs modulesPath;
|
||||
}).config
|
||||
else null;
|
||||
test = if cfg == null then false
|
||||
else if !(cfg ? sysconfig) then false
|
||||
else if !(cfg.sysconfig ? remoteBuildClient) then false
|
||||
else cfg.sysconfig.remoteBuildClient;
|
||||
in test)
|
||||
(builtins.attrNames (builtins.readDir ./configuration))
|
||||
).right
|
||||
)
|
||||
) else {}) // {
|
||||
"remoteBuildKey" = lib.mkIf config.sysconfig.remoteBuildClient {};
|
||||
};
|
||||
|
||||
networking.hostName = lib.mkDefault config.sysconfig.host;
|
||||
|
||||
nix = {
|
||||
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
||||
nixPath = [ "nixpkgs=${nixpkgs}" ];
|
||||
channel.enable = false;
|
||||
settings = {
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
@@ -73,7 +42,7 @@
|
||||
distributedBuilds = config.sysconfig.remoteBuildClient;
|
||||
buildMachines = lib.mkIf config.sysconfig.remoteBuildClient [
|
||||
{
|
||||
hostName = "blunkall.us";
|
||||
hostName = "esotericbytes.com";
|
||||
sshUser = "remote-builder";
|
||||
sshKey = config.sops.secrets."remoteBuildKey".path;
|
||||
supportedFeatures = [
|
||||
|
||||
Reference in New Issue
Block a user