dotfiles/nixos/overlay.nix

23 lines
781 B
Nix
Raw Normal View History

2022-04-11 12:37:54 +02:00
let names = [ "pennyworth" "jarvis" "blackadder" "frumar" "zazu" "smithers" ];
2021-05-29 18:05:31 +02:00
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;
modules =
2022-03-16 17:12:11 +01:00
[ ({ lib, ... }: {
config.nixpkgs.pkgs = lib.mkDefault pkgs;
config._module.args = extraArgs;
}) ]
2021-05-29 18:05:31 +02:00
++ (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
};
}