From f86a769126b2971b0cb1f5588bf71913623c9255 Mon Sep 17 00:00:00 2001 From: Dustin Frisch Date: Sat, 23 Nov 2024 20:12:24 +0100 Subject: [PATCH] nfs: add client host entries to nfs --- TODO.md | 1 - machines/nfs/default.nix | 2 +- machines/nfs/jumphost.nix | 14 ++++++++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 machines/nfs/jumphost.nix diff --git a/TODO.md b/TODO.md index b0ac621..4669716 100644 --- a/TODO.md +++ b/TODO.md @@ -7,7 +7,6 @@ - Quota per user on homedir -- Configure user env on client (using envfs?) - Move ldap to subdomain - Remove x-tools like xterm - A fancy background image? diff --git a/machines/nfs/default.nix b/machines/nfs/default.nix index 3752f35..13f1aad 100644 --- a/machines/nfs/default.nix +++ b/machines/nfs/default.nix @@ -6,7 +6,7 @@ ./cache.nix ./netinstaller.nix ./wol.nix - ../../client/users.nix + ./jumphost.nix ]; deployment = { diff --git a/machines/nfs/jumphost.nix b/machines/nfs/jumphost.nix new file mode 100644 index 0000000..423c2ca --- /dev/null +++ b/machines/nfs/jumphost.nix @@ -0,0 +1,14 @@ +{ lib, config, ... }: + +with lib; + +{ + imports = [ + ../../client/users.nix + ]; + + networking.extraHosts = concatMapStringsSep "\n" + ({ name, value }: "${value.ip} pc${name} pc${name}.${config.networking.domain}") + (attrsToList (import ../../clients.nix)); +} +