better visual seperation between flake/non-flake version
This commit is contained in:
@@ -37,39 +37,44 @@ Still in its early stages, [NixOS Facter] is intended to do what I've described
|
|||||||
|
|
||||||
A user can generate a JSON-based hardware report using a (eventually static) Go program: `nixos-facter -o facter.json`. From there, they can include this report in their NixOS config and make use of our [NixOS modules](https://github.com/numtide/nixos-facter-modules) as follows:
|
A user can generate a JSON-based hardware report using a (eventually static) Go program: `nixos-facter -o facter.json`. From there, they can include this report in their NixOS config and make use of our [NixOS modules](https://github.com/numtide/nixos-facter-modules) as follows:
|
||||||
|
|
||||||
```nix
|
=== "**flake.nix**"
|
||||||
# flake.nix
|
|
||||||
{
|
|
||||||
inputs = {
|
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
||||||
nixos-facter-modules.url = "github:numtide/nixos-facter-modules";
|
|
||||||
};
|
|
||||||
|
|
||||||
outputs = inputs @ {
|
```nix
|
||||||
nixpkgs,
|
{
|
||||||
...
|
inputs = {
|
||||||
}: {
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
nixosConfigurations.basic = nixpkgs.lib.nixosSystem {
|
nixos-facter-modules.url = "github:numtide/nixos-facter-modules";
|
||||||
modules = [
|
|
||||||
inputs.nixos-facter-modules.nixosModules.facter
|
|
||||||
{ config.facter.reportPath = ./facter.json; }
|
|
||||||
# ...
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
# configuration.nix
|
outputs = inputs @ {
|
||||||
{
|
nixpkgs,
|
||||||
imports = [
|
...
|
||||||
"${(builtins.fetchTarball {
|
}: {
|
||||||
url = "https://github.com/numtide/nixos-facter-modules/";
|
nixosConfigurations.basic = nixpkgs.lib.nixosSystem {
|
||||||
})}/modules/nixos/facter.nix"
|
modules = [
|
||||||
];
|
inputs.nixos-facter-modules.nixosModules.facter
|
||||||
|
{ config.facter.reportPath = ./facter.json; }
|
||||||
|
# ...
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
config.facter.reportPath = ./facter.json;
|
=== "**without flakes**"
|
||||||
}
|
|
||||||
```
|
```nix
|
||||||
|
# configuration.nix
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
"${(builtins.fetchTarball {
|
||||||
|
url = "https://github.com/numtide/nixos-facter-modules/";
|
||||||
|
})}/modules/nixos/facter.nix"
|
||||||
|
];
|
||||||
|
|
||||||
|
config.facter.reportPath = ./facter.json;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
That's it.
|
That's it.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user