Skip to content

Commit

Permalink
add example flakeadd example flake to README
Browse files Browse the repository at this point in the history
  • Loading branch information
justDeeevin committed Nov 21, 2024
1 parent 2297730 commit c58aab9
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,52 @@ Note that Python 3.13 is not currently supported.

This repository contains a Nix flake that can be used to install Posting on NixOS. The package is exposed as `outputs.packages.${system}.default`. The flake also provides an overlay at `outputs.overlays.default`. Lastly, if you'd like to configure Posting with Nix, the flake exposes a Home Manager module that allows for this to be done. Adding `outputs.modules.homeManager.default` to your Home Manager imports will add the `programs.posting` option. You can find documentation for this option [here](https://posting.sh/guide/home_manager).

Example flake using Posting:

```nix
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
posting = {
url = "github:darrenburns/posting";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {nixpkgs, posting, home-manager, ...}: let
system = "x86_64-linux";
in {
nixosConfigurations.example = nixpkgs.lib.nixosSystem {
modules = [
home-manager.nixosModules.default
({pkgs, ...}: {
# Use the overlay:
nixpkgs.overlays = [posting.overlays.default];
environment.systemPackages = [pkgs.posting];
# Or, use the package directly:
environment.systemPackages = [posting.packages.${system}.default];
# Or, use the Home Manager options:
home-manager.users.example = {
programs.posting = {
enable = true;
# settings...
# See Home Manager in the guide for more information
};
};
})];
};
};
}
```

## Learn More

Learn more about Posting at [https://posting.sh](https://posting.sh).
Expand Down

0 comments on commit c58aab9

Please sign in to comment.