nix-community.nixvim/flake.nix
Matt Sturgeon 3212791972
flake: add overridable systems input
Users can specify which systems to use by having our `systems` input
follow a different file or flake:

```nix
{
  inputs = {
    # Here we list systems in a local file
    inputs.systems.url = "path:./systems.nix";
    inputs.systems.flake = false;

    inputs.nixvim.url = "github:nix-community/nixvim";
    # Here we override the list of systems with only our own
    inputs.nixvim.inputs.systems.follows = "systems";

    # ...
  };

  outputs = inputs: {
    # ...
  };
}
```

Alternatively, instead of users listing systems in a local file, they
can use an external flake, e.g.:

- github:nix-systems/default
  - Exposes aarch64 and x86_64 for linux and darwin
- github:nix-systems/default-linux
  - Exposes aarch64 and x86_64 for linux
- github:nix-systems/default-darwin
  - Exposes aarch64 and x86_64 for darwin
- github:nix-systems/aarch64-darwin
- github:nix-systems/aarch64-linux
- github:nix-systems/x86_64-darwin
- github:nix-systems/x86_64-linux

See https://github.com/nix-systems/nix-systems
2025-05-12 03:56:19 +01:00

34 lines
828 B
Nix

{
description = "A neovim configuration system for NixOS";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
systems.url = "github:nix-systems/default";
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
nuschtosSearch = {
url = "github:NuschtOS/search";
inputs.nixpkgs.follows = "nixpkgs";
};
};
nixConfig = {
extra-substituters = [ "https://nix-community.cachix.org" ];
extra-trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
allow-import-from-derivation = false;
};
outputs =
inputs:
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
systems = import inputs.systems;
imports = [ ./flake ];
};
}