{ config, lib, pkgs, ... }: with lib; let cfg = config.machine; fn = import (toString ../fn.nix) { inherit lib; }; pkgsets = map (v: (toString ../.) + "/pkgsets/${v}") (fn.lsf (toString ../pkgsets)); in { imports = pkgsets; environment.systemPackages = flatten (lists.forEach (attrVals (filter (v: !(strings.hasInfix "::" v)) cfg.pkgs) cfg.pkgsets) (v: v.pkgwrap)); services.emacs = mkIf (elem "emacs" cfg.pkgs) { defaultEditor = true; enable = true; install = true; package = cfg.pkgsets.emacs.pkgwrap; }; }