Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

default: add example for flake module options. #1

Merged
merged 1 commit into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,17 @@ Using flake, installing `nix-flatpak` as a NixOs module would looks something li

```


### Remotes

By default `nix-flatpak` will add the flathub remote. Remotes can be manually
configured via the `services.flatpak.remotes` option:

```nix
[{ name = "flathub-beta"; location = "https://flathub.org/beta-repo/flathub-beta.flatpakrepo"; }]
```

### Packages
Declare packages to install with:
```nix
services.flatpak.packages = [
Expand Down
15 changes: 15 additions & 0 deletions modules/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ let
args = mkOption {
type = types.nullOr types.str;
description = "Extra arguments to pass to flatpak remote-add";
example = [ "--verbose" ];
default = null;
};
};
Expand Down Expand Up @@ -53,13 +54,27 @@ in
description = mkDoc ''
Declares a list of applications to install.
'';
example = literalExpression ''
[
# declare applications to install using its fqdn
"com.obsproject.Studio"
# specify a remote.
{ appId = "com.brave.Browser"; origin = "flathub"; }
# Pin the application to a specific commit.
{ appId = "im.riot.Riot"; commit = "bdcc7fff8359d927f25226eae8389210dba3789ca5d06042d6c9c133e6b1ceb1" }
];
'';
};
remotes = mkOption {
type = with types; listOf (coercedTo str (name: { inherit name location; }) (submodule remoteOptions));
default = [{ name = "flathub"; location = "https://dl.flathub.org/repo/flathub.flatpakrepo"; }];
description = mkDoc ''
Declare a list of flatpak repositories.
'';
example = literalExpression ''
# Flathub is the default initialized by this flake.
[{ name = "flathub"; location = "https://dl.flathub.org/repo/flathub.flatpakrepo"; }]
'';
};

}
Loading