mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 14:01:34 +01:00
Implement global custom libs as a flake output
This commit is contained in:
parent
f276848b18
commit
671a13239a
10 changed files with 40 additions and 31 deletions
|
|
@ -1,11 +1,16 @@
|
|||
{ inputs, self, ... }:
|
||||
{
|
||||
inputs,
|
||||
self,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
lib = inputs.nixpkgs.lib.extend (_: _: { custom = import "${self}/lib" inputs.nixpkgs.lib; });
|
||||
inherit (self) lib';
|
||||
|
||||
mkHost =
|
||||
hostName:
|
||||
inputs.nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit inputs self lib; };
|
||||
specialArgs = { inherit inputs self lib'; };
|
||||
modules = [
|
||||
{ networking = { inherit hostName; }; }
|
||||
"${self}/hosts/common.nix"
|
||||
|
|
@ -25,9 +30,9 @@ let
|
|||
in
|
||||
{
|
||||
flake = {
|
||||
nixosConfigurations = "${self}/hosts" |> lib.custom.listDirectories |> lib.custom.genAttrs mkHost;
|
||||
nixosConfigurations = "${self}/hosts" |> lib'.listDirectories |> lib'.genAttrs mkHost;
|
||||
|
||||
deploy.nodes = "${self}/hosts" |> lib.custom.listDirectories |> lib.custom.genAttrs mkDeployNode;
|
||||
deploy.nodes = "${self}/hosts" |> lib'.listDirectories |> lib'.genAttrs mkDeployNode;
|
||||
|
||||
checks = inputs.deploy-rs.lib |> lib.mapAttrs (_: deployLib: deployLib.deployChecks self.deploy);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue