26 lines
583 B
Nix
26 lines
583 B
Nix
{ 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;
|
|
};
|
|
}
|