This repository has been archived on 2026-08-30. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
dotfiles/flake/default.nix

62 lines
1.1 KiB
Nix

{
lib,
inputs,
self,
}:
let
# TODO: refactor the registry code
registryAssembly = import ./registry.nix { inherit lib self; };
# TODO: remove this after the refactor of this file is done and clean
util = import ../lib { inherit lib; };
mkModules = import ./modules.nix { inherit util; };
modules = mkModules {
root = self + "/modules";
};
repositoryModules = modules;
guestFiles = util.collectNixFiles (self + "/guests");
collectedRegistry = registryAssembly.collect { hosts = self.nixosConfigurations; };
specialArgs = {
inherit
flake
inputs
self
;
registry = collectedRegistry;
};
flake = {
inherit (hosts) mkHosts;
inherit (guests) mkGuest;
inherit util;
};
guests = import ./guests.nix {
inherit
inputs
lib
self
specialArgs
repositoryModules
registryAssembly
util
;
};
hosts = import ./hosts.nix {
inherit
inputs
lib
self
specialArgs
repositoryModules
guestFiles
registryAssembly
;
};
in
flake