diff --git a/flake.lock b/flake.lock index 7f2f37d..85e397e 100644 --- a/flake.lock +++ b/flake.lock @@ -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": { diff --git a/flake.nix b/flake.nix index 5b0be36..8791c88 100644 --- a/flake.nix +++ b/flake.nix @@ -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; diff --git a/initialize.nix b/initialize.nix index bda8311..90e3f87 100644 --- a/initialize.nix +++ b/initialize.nix @@ -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 diff --git a/lib/default.nix b/lib/default.nix index 6ff3a06..7550fd5 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -6,7 +6,7 @@ with lib; { ./instance.nix - ./fudo-lib.nix + # ./fudo-lib.nix ./fudo/acme-for-hostname.nix ./fudo/authentication.nix diff --git a/lib/fudo-lib.nix b/lib/fudo-lib.nix index a1b4492..040b10a 100644 --- a/lib/fudo-lib.nix +++ b/lib/fudo-lib.nix @@ -6,10 +6,11 @@ let in { lib.overlays = [ - (final: prev: { - final.fudo = { - inherit ip dns; - }; - }) + (final: prev: + prev.lib // { + fudo = { + inherit ip dns; + }; + }) ]; } diff --git a/lib/overlay.nix b/lib/overlay.nix new file mode 100644 index 0000000..4f3cf47 --- /dev/null +++ b/lib/overlay.nix @@ -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; + }; + }; +}) diff --git a/nix-home b/nix-home index 711576e..e47f7bf 160000 --- a/nix-home +++ b/nix-home @@ -1 +1 @@ -Subproject commit 711576e6e4cede979b15cf9d1c8c3d42fb565a99 +Subproject commit e47f7bf571ffb300427c3d6855a57b2feb913b4f