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

Bug | Option Documents Break Nix Build #42

Merged
merged 7 commits into from
Feb 17, 2024
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
5 changes: 5 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,8 @@ A list of folks that helped with this project.
* Improve readme.
* [tmarkov](https://github.com/tmarkov)
* Add compatibility with stand-alone home-manager.
* [ReedClanton](https://github.com/ReedClanton)
* README.md:
* Fixed broken link and typo.
* Fixed Broken Build:
* Fixed build issue related to option descriptions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ services.flatpak.update.auto = {
Auto updates trigger on system activation.

Under the hood, updates are scheduled by realtime systemd timers. `onCalendar` accepts systemd's
`update.auto.OnCalendar` expressions. Timers are persisted across sleep / resume cycles.
`update.auto.onCalendar` expressions. Timers are persisted across sleep / resume cycles.
See https://wiki.archlinux.org/title/systemd/Timers for more information.

### Storage
Expand Down
31 changes: 17 additions & 14 deletions modules/options.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ let
options = {
name = mkOption {
type = types.str;
description = lib.mdDoc "The remote name";
description = lib.mdDoc "The remote name. This name is what will be used when installing flatpak(s) from this repo.";
default = "flathub";
};
location = mkOption {
type = types.str;
description = lib.mdDoc "The remote location";
description = lib.mdDoc "The remote location. Must be a valid URL of a flatpak repo.";
default = "https://dl.flathub.org/repo/flathub.flatpakrepo";
};
args = mkOption {
type = types.nullOr types.str;
description = "Extra arguments to pass to flatpak remote-add";
description = "Extra arguments to pass to flatpak remote-add.";
example = [ "--verbose" ];
default = null;
};
Expand All @@ -31,14 +31,14 @@ let

commit = mkOption {
type = types.nullOr types.str;
description = lib.mdDoc "Hash id of the app commit to install";
description = lib.mdDoc "Hash id of the app commit to install.";
default = null;
};

origin = mkOption {
type = types.str;
default = "flathub";
description = lib.mdDoc "App repository origin (default: flathub)";
description = lib.mdDoc "App repository origin (default: flathub).";
};
};
};
Expand All @@ -52,7 +52,7 @@ let
Whether to enable flatpak to upgrade applications during
{command}`nixos` system activation. The default is `false`
so that repeated invocations of {command}`nixos-rebuild switch` are idempotent.

implementation: appends --or-update to each flatpak install command.
'';
};
Expand All @@ -66,7 +66,7 @@ let
Whether to enable flatpak to upgrade applications during
{command}`nixos` system activation, and scheudle periodic updates
afterwards.

implementation: registers a systemd realtime timer that fires with an OnCalendar policy.
If a timer had expired while a machine was off/asleep, it will fire upon resume.
See https://wiki.archlinux.org/title/systemd/Timers for details.
Expand All @@ -83,6 +83,9 @@ let
};
});
default = { enable = false; };
description = lib.mdDoc ''
Value(s) in this Nix set are used to configure the behavior of the auto updater.
'';
};
};
};
Expand All @@ -93,7 +96,7 @@ in
packages = mkOption {
type = with types; listOf (coercedTo str (appId: { inherit appId; }) (submodule packageOptions));
default = [ ];
description = mkDoc ''
description = lib.mdDoc ''
Declares a list of applications to install.
'';
example = literalExpression ''
Expand All @@ -110,7 +113,7 @@ in
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 ''
description = lib.mdDoc ''
Declare a list of flatpak repositories.
'';
example = literalExpression ''
Expand All @@ -124,7 +127,7 @@ in
default = {};
description = lib.mdDoc ''
Applies the provided attribute set into a Flatpak overrides file with the
same structure, keeping externally applied changes
same structure, keeping externally applied changes.
'';
example = literalExpression ''
{
Expand All @@ -143,12 +146,12 @@ in
Whether to enable flatpak to upgrade applications during
{command}`nixos` system activation. The default is `false`
so that repeated invocations of {command}`nixos-rebuild switch` are idempotent.

Applications pinned to a specific commit hash will not be updated.

If {command}`auto.enable = true` a periodic update will be scheduled with (approximately)
weekly recurrence.

See https://wiki.archlinux.org/title/systemd/Timers for more information on systemd timers.
'';
example = literalExpression ''
Expand All @@ -168,7 +171,7 @@ in
description = lib.mdDoc ''
If enabled, uninstall packages not managed by this module on activation.
I.e. if packages were installed via Flatpak directly instead of this module,
they would get uninstalled on the next activation
they would get uninstalled on the next activation.
'';
};
}
Loading