Added lib overlay

This commit is contained in:
niten 2021-10-04 12:23:46 -07:00
parent 3597d82f64
commit 2551908093
7 changed files with 30 additions and 18 deletions

View File

@ -223,7 +223,7 @@
"niten-doom-config": "niten-doom-config"
},
"locked": {
"narHash": "sha256-SU2+Swf6wHfyRGx3tsIh3iX/NWbsBgVCDeGPRgVuXEA=",
"narHash": "sha256-LwOAmTxY+qMr6iLedi+ZOOjDQPoALkYOa6fqt6Oz/ew=",
"path": "./nix-home",
"type": "path"
},
@ -256,11 +256,11 @@
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1631573611,
"narHash": "sha256-u2E/wstadWNcn6vOIoK1xY86QPOzzBZQfT1FbePfdaI=",
"lastModified": 1633291410,
"narHash": "sha256-IxUzCGwj+s2Rn/+u0NtY36ix5I8MopMOO8Ip59PnBlw=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "7d9ba15214004c979d2c8733f8be12ce6502cf8a",
"rev": "382505714d10c6791a96712e0554587c75c5bf8b",
"type": "github"
},
"original": {
@ -332,11 +332,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1633041389,
"narHash": "sha256-1bjTQfnb04OqJeWaUfRejQH7gClG77KvDRC2W/TVszw=",
"lastModified": 1633366555,
"narHash": "sha256-xWgLN0MwTbf+mJgbj313KZOoUFvXxo3FNZgXJtUaXeE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9a23237031b385945132c8dac7d7ad97ece67408",
"rev": "2ba20b2080e9a0f79e1ba55780cfb5dd61c147ce",
"type": "github"
},
"original": {

View File

@ -31,6 +31,7 @@
};
overlays = [
(import ./fudo-pkgs/overlay.nix)
(import ./lib/overlay.nix)
];
};
in lib.nixosSystem {
@ -40,7 +41,7 @@
fudo-home.nixosModule
fudo-secrets.nixosModule
(import ./initialize.nix {
inherit hostname pkgs build-timestamp fudo-secrets;
inherit hostname lib pkgs build-timestamp fudo-secrets;
})
];
}) hosts;

View File

@ -1,10 +1,10 @@
{ hostname, pkgs, build-timestamp, fudo-secrets ? null, ... }:
{ hostname, pkgs, lib, build-timestamp, fudo-secrets ? null, ... }:
let
# Get info on this host so we know what to load
host-config = import (./. + "/config/hosts/${hostname}.nix");
in {
in {
imports = [
./lib
./config

View File

@ -6,7 +6,7 @@ with lib; {
./instance.nix
./fudo-lib.nix
# ./fudo-lib.nix
./fudo/acme-for-hostname.nix
./fudo/authentication.nix

View File

@ -6,10 +6,11 @@ let
in
{
lib.overlays = [
(final: prev: {
final.fudo = {
inherit ip dns;
};
})
(final: prev:
prev.lib // {
fudo = {
inherit ip dns;
};
})
];
}

10
lib/overlay.nix Normal file
View File

@ -0,0 +1,10 @@
(final: prev: let
ip = import ./lib/ip.nix { lib = prev; };
dns = import ./lib/dns.nix { lib = prev; };
in {
lib = prev.lib // {
fudo = {
inherit ip dns;
};
};
})

@ -1 +1 @@
Subproject commit 711576e6e4cede979b15cf9d1c8c3d42fb565a99
Subproject commit e47f7bf571ffb300427c3d6855a57b2feb913b4f