2019-10-11 20:51:46 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.machine;
|
2019-10-23 03:44:17 +02:00
|
|
|
pkgsets = (lists.forEach
|
|
|
|
(attrNames (filterAttrs (n: v: v == "regular") (builtins.readDir ./pkgsets)))
|
|
|
|
(v: (./. + "/pkgsets/${v}")));
|
2019-10-11 20:51:46 +02:00
|
|
|
in {
|
2019-10-23 03:44:17 +02:00
|
|
|
imports = pkgsets;
|
|
|
|
|
|
|
|
environment.systemPackages = flatten (lists.forEach
|
|
|
|
(attrVals cfg.pkgs cfg.pkgsets)
|
|
|
|
(v: v.pkgwrap));
|
2019-10-11 20:51:46 +02:00
|
|
|
|
|
|
|
services.emacs = mkIf (elem "emacs" cfg.pkgs) {
|
|
|
|
defaultEditor = true;
|
|
|
|
enable = true;
|
|
|
|
install = true;
|
2019-10-23 03:44:17 +02:00
|
|
|
package = (elemAt cfg.pkgsets.emacs.pkgwrap 0);
|
2019-10-11 20:51:46 +02:00
|
|
|
};
|
|
|
|
}
|