@@ -4,22 +4,22 @@
|
||||
pkgs,
|
||||
inputs,
|
||||
myUtils,
|
||||
paths,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.deploy;
|
||||
|
||||
hostDir = ../../../hosts;
|
||||
hostNames = myUtils.dirNames hostDir;
|
||||
hostNames = myUtils.dirNames paths.hosts;
|
||||
hostsWithKeys = lib.filter (
|
||||
hostname: builtins.pathExists (hostDir + "/${hostname}/ssh_host.pub")
|
||||
hostname: builtins.pathExists (paths.hosts + "/${hostname}/ssh_host.pub")
|
||||
) hostNames;
|
||||
|
||||
colmena = inputs.colmena.packages.${pkgs.stdenv.hostPlatform.system}.colmena;
|
||||
deployRs = inputs.deploy-rs.packages.${pkgs.stdenv.hostPlatform.system}.default;
|
||||
|
||||
hostTags = hostname: (myUtils.hostMeta (hostDir + "/${hostname}")).tags;
|
||||
hostTags = hostname: (myUtils.hostMeta (paths.hosts + "/${hostname}")).tags;
|
||||
nodeTagsDecl = ''
|
||||
declare -A _colmena_node_tags=(
|
||||
${lib.concatMapStringsSep "\n" (
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
dotsPath,
|
||||
paths,
|
||||
...
|
||||
}:
|
||||
|
||||
@@ -66,6 +66,6 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
home.sessionPath = lib.optional cfg.addBinToPath "${dotsPath}/.bin";
|
||||
home.sessionPath = lib.optional cfg.addBinToPath "${paths.dots}/.bin";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
lib,
|
||||
pkgs,
|
||||
myUtils,
|
||||
paths,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.ssh;
|
||||
|
||||
hostDir = ../../../hosts;
|
||||
hostsWithKeys = lib.filter (hostname: builtins.pathExists (hostDir + "/${hostname}/ssh_host.pub")) (
|
||||
myUtils.dirNames hostDir
|
||||
);
|
||||
hostNames = myUtils.dirNames paths.hosts;
|
||||
hostsWithKeys = lib.filter (
|
||||
hostname: builtins.pathExists (paths.hosts + "/${hostname}/ssh_host.pub")
|
||||
) hostNames;
|
||||
in
|
||||
{
|
||||
options.ssh.enable = lib.mkEnableOption "ssh";
|
||||
@@ -37,7 +37,7 @@ in
|
||||
lib.genAttrs hostsWithKeys (
|
||||
hostname:
|
||||
let
|
||||
meta = myUtils.hostMeta (hostDir + "/${hostname}");
|
||||
meta = myUtils.hostMeta (paths.hosts + "/${hostname}");
|
||||
in
|
||||
{
|
||||
User = meta.host.username;
|
||||
|
||||
Reference in New Issue
Block a user