config/users/all.nix

10 lines
301 B
Nix
Raw Normal View History

2023-02-25 01:29:13 +01:00
{ config, pkgs, lib, ... }:
let
to-import = name: value: ./. + ("/" + name);
filter-users = key: val: val == "directory" && lib.pathExists "${./.}${key}/default.nix";
imports = lib.mapAttrsToList to-import (lib.filterAttrs filter-users (builtins.readDir ./.));
in
{
inherit imports;
}