refactor: simplify repo paths
check / lint (push) Successful in 14s

This commit is contained in:
2026-10-11 17:45:55 +02:00
parent 7f5d7914c4
commit 14f8c83cf3
8 changed files with 33 additions and 26 deletions
+3 -2
View File
@@ -1,12 +1,13 @@
{
lib,
config,
paths,
...
}:
let
inherit (config.host) username;
adminHosts = (import ../../utils { inherit lib; }).adminHosts ../../hosts;
adminHosts = (import ../../utils { inherit lib; }).adminHosts paths.hosts;
in
{
options.ssh = {
@@ -22,7 +23,7 @@ in
map (
hostname:
let
keyFile = ../../hosts/${hostname}/ssh_user.pub;
keyFile = paths.hosts + "/${hostname}/ssh_user.pub";
in
lib.optionals (builtins.pathExists keyFile) (lib.splitString "\n" (builtins.readFile keyFile))
) ((builtins.filter (h: h != config.host.name) adminHosts) ++ config.ssh.authorizedHosts)