{ inputs, lib, # VARIABLES hostName ? "sus", userName ? "amogus", flakeDir ? null, # SYSINFO plfrm, ver, dev, ... }: { flake = let # OTHER inherit (inputs.nixpkgs.lib) nixosSystem; inherit (inputs.home-manager.lib) homeManagerConfiguration; pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux; # NEEDS sec = import ./secrets.nix; x = import ./options.nix { inherit lib; } // { inherit hostName userName flakeDir plfrm ver dev sec ; }; # ARGS args = { inherit x inputs; }; in { # CONFIGURATION nixosConfigurations.${hostName} = nixosSystem { modules = [ ../${hostName}/host ]; specialArgs = args; }; homeConfigurations.${userName} = homeManagerConfiguration { modules = [ ../${hostName}/home ]; extraSpecialArgs = args; inherit pkgs; }; }; }