Flakes without boilerplate.
{
outputs = n: n {};
inputs.__functor.url = "github:eepyfdn/nn";
inputs.nixpkgs.url = "nixpkgs/nixos-unstable";
}
A folder structure like
oxymoron/
package.nix
nixos-module.nix
mollerbot@x86_64-linux/
configuration.nix
flake.nix
gets turned into a flake output like
{ nixpkgs, ... }@inputs: let
forAllSystems = function:
nixpkgs.lib.genAttrs [
"aarch64-darwin"
"aarch64-linux"
"x86_64-darwin"
"x86_64-linux"
] (system: function nixpkgs.legacyPackages.${system});
in forAllSystems
(pkgs: {
packages.oxymoron = pkgs.callPackage ./oxymoron/package.nix;
}) // {
nixosModules.oxymoron = import ./oxymoron/nixos-module.nix;
nixosConfigurations.mollerbot = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [ "./mollerbot@x86_64-linux/configuration.nix" ];
};
}