Skip to content

Commit

Permalink
readme: subjectively improve examples
Browse files Browse the repository at this point in the history
  • Loading branch information
trueNAHO committed Dec 12, 2024
1 parent 70bb3b2 commit 4b18f07
Showing 1 changed file with 43 additions and 40 deletions.
83 changes: 43 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,28 +32,29 @@ Include the nixos module in your configuration:
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable-small";
nix-index-database.url = "github:nix-community/nix-index-database";
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
nix-index-database = {
inputs.nixpkgs.follows = "nixpkgs";
url = "github:nix-community/nix-index-database";
};
};
outputs = { self, nixpkgs, nix-index-database, ... }: {
nixosConfigurations = {
my-nixos = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./configuration.nix
nix-index-database.nixosModules.nix-index
nixosConfigurations.my-nixos = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
{
programs = {
# Optionally wrap and install pkgs.comma.
nix-index-database.comma.enable = true;
modules = [
./configuration.nix
nix-index-database.nixosModules.nix-index
nix-index.enable = true;
};
}
];
};
{
programs = {
# Optionally wrap and install pkgs.comma.
nix-index-database.comma.enable = true;
nix-index.enable = true;
};
}
];
};
};
}
Expand All @@ -68,28 +69,28 @@ You can then call `nix-locate` as usual, it will automatically use the database
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable-small";
nix-index-database.url = "github:nix-community/nix-index-database";
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
nix-index-database = {
inputs.nixpkgs.follows = "nixpkgs";
url = "github:nix-community/nix-index-database";
};
};
outputs = { self, nixpkgs, nix-index-database, ... }: {
darwinConfigurations = {
my-machine = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./configuration.nix
nix-index-database.darwinModules.nix-index
{
programs = {
# Optionally wrap and install pkgs.comma.
nix-index-database.comma.enable = true;
nix-index.enable = true;
};
}
];
};
darwinConfigurations.my-machine = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./configuration.nix
nix-index-database.darwinModules.nix-index
{
programs = {
# Optionally wrap and install pkgs.comma.
nix-index-database.comma.enable = true;
nix-index.enable = true;
};
}
];
};
};
}
Expand All @@ -107,16 +108,19 @@ You can then call `nix-locate` as usual, it will automatically use the database
```nix
{
inputs = {
# Specify the source of Home Manager and Nixpkgs.
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-index-database.url = "github:nix-community/nix-index-database";
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
nix-index-database = {
inputs.nixpkgs.follows = "nixpkgs";
url = "github:nix-community/nix-index-database";
};
};
outputs = { nixpkgs, home-manager, nix-index-database, ... }:
let
system = "x86_64-linux";
Expand All @@ -139,7 +143,6 @@ You can then call `nix-locate` as usual, it will automatically use the database
];
};
};
}
```

Expand Down

0 comments on commit 4b18f07

Please sign in to comment.