dotfiles/nixos/overlay.nix

21 lines
738 B
Nix
Raw Normal View History

2021-05-29 18:05:31 +02:00
let names = [ "pennyworth" "jarvis" "blackadder" "woodhouse" "frumar" "zazu" ];
in pkgs: super: {
yorick = (super.yorick or { }) // rec {
nixos = configuration: extraArgs:
2021-05-29 17:22:27 +02:00
let
c = import (pkgs.path + "/nixos/lib/eval-config.nix") {
inherit (pkgs.stdenv.hostPlatform) system;
inherit extraArgs;
modules =
2021-05-29 18:05:31 +02:00
[ ({ lib, ... }: { config.nixpkgs.pkgs = lib.mkDefault pkgs; }) ]
++ (if builtins.isList configuration then
configuration
else
[ configuration ]);
2021-05-29 17:22:27 +02:00
};
2021-05-29 18:05:31 +02:00
in c.config.system.build // c;
machine = pkgs.lib.genAttrs names
(name: nixos [ ./roles (./logical + "/${name}.nix") ] { inherit name; });
2021-05-29 17:22:27 +02:00
};
}