diff options
| author | tv <tv@krebsco.de> | 2026-11-10 04:59:18 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-10 04:59:18 +0100 |
| commit | ebe50220920e360bc30b245050b94f80c0aed063 (patch) | |
| tree | 00fadce4201f71b31e78e9224e79c99c8a07a1d4 | |
| parent | 4c1df8b9f51846e2d246b4db0953f1cc7ee3c5ed (diff) | |
| -rw-r--r-- | legacy.nix | 66 |
1 files changed, 30 insertions, 36 deletions
@@ -16,6 +16,33 @@ (name: name != "default.nix" && !lib.hasPrefix "." name) (lib.attrNames (builtins.readDir <stockholm/krebs/3modules>)))); } +, mylib ? (import ./. { inherit (inputs.nixpkgs) lib; }).mylib +, overlays ? [ + (import (inputs.stockholm.inputs.nix-writers + "/pkgs")) + (self: super: { + stockholm.lib.types = self.lib.types // { + inherit (self.mylib.types) + hostname + secret-file + ; + }; + inherit (inputs.stockholm.overlays.default self super) + brain + cgit-clear-cache + git-hooks + htgen + htgen-imgur + htgen-paste + irc-announce + painload + repo-sync + ; + }) + (self: super: { + inherit mylib; + }) + (import ./pkgs) + ] , extraModules ? [] }: { nixosConfigurations = @@ -28,7 +55,7 @@ in inputs.nixpkgs.lib.nixosSystem { inherit system; - specialArgs = rec { + specialArgs = { inherit inputs; lib = inputs.nixpkgs.lib // { @@ -38,7 +65,7 @@ slib = mylib; }; - mylib = (import ./. { inherit lib; }).mylib // { + mylib = mylib // { importSecret = p: _: {}; }; @@ -85,44 +112,11 @@ inputs.stockholm.nixosModules.users inputs.stockholm.nixosModules.zones ]; - nixpkgs.overlays = [ - (import (inputs.stockholm.inputs.nix-writers + "/pkgs")) - (self: super: { - stockholm.lib.types = lib.types // { - inherit (mylib.types) - hostname - secret-file - ; - }; - inherit (inputs.stockholm.overlays.default self super) - brain - cgit-clear-cache - git-hooks - htgen - htgen-imgur - htgen-paste - irc-announce - painload - repo-sync - ; - }) - ]; + nixpkgs.overlays = overlays; } ./configs ./modules { imports = extraModules; } - # This must come before <stockholm/krebs>. And before means after, `imports`-wise. - ({ inputs, mylib, ... }: { - nixpkgs.overlays = [ - (self: super: { - inherit mylib; - }) - - (import (inputs.stockholm.inputs.nix-writers + "/pkgs")) - - (import ./pkgs) - ]; - }) ]; }) ]; |
