Skip to content

nixos/urlwatch: init module #423275

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

flandweber
Copy link
Contributor

Urlwatch is used to monitor websites for changes.
This pr adds a module to create a system service continuously polling changes.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • Nixpkgs 25.11 Release Notes (or backporting 25.05 Nixpkgs Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
  • NixOS 25.11 Release Notes (or backporting 25.05 NixOS Release notes)
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other contributing documentation in corresponding paths.

Add a 👍 reaction to pull requests you find important.

@flandweber flandweber added the backport release-25.05 Backport PR automatically label Jul 7, 2025
@nixpkgs-ci nixpkgs-ci bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: changelog This PR adds or changes release notes 8.has: module (update) This PR changes an existing module in `nixos/` 8.has: documentation This PR adds or changes documentation labels Jul 7, 2025
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. labels Jul 7, 2025
@flandweber flandweber added the 9.needs: reviewer This PR currently has no reviewers requested and needs attention. label Jul 7, 2025
@flandweber flandweber requested review from 4z3 and kmein July 7, 2025 18:17
@nixpkgs-ci nixpkgs-ci bot removed the 9.needs: reviewer This PR currently has no reviewers requested and needs attention. label Jul 7, 2025
Copy link
Contributor

@acid-bong acid-bong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of nitpicks. The rest looks great

@flandweber flandweber force-pushed the urlwatch-module branch 2 times, most recently from 0501848 to 6517cce Compare July 8, 2025 07:33
@flandweber flandweber requested a review from acid-bong July 8, 2025 07:40
@flandweber flandweber force-pushed the urlwatch-module branch 2 times, most recently from 691108e to 8a42680 Compare July 14, 2025 12:24
Added systemd service for urlwatch.
@flandweber flandweber requested a review from awwpotato July 17, 2025 16:30
@flandweber flandweber added 8.has: module (new) This PR adds a module in `nixos/` and removed 8.has: module (update) This PR changes an existing module in `nixos/` labels Jul 21, 2025
Comment on lines +11 to +16
urlsFile = lib.pipe cfg.jobs [
(map (format.generate "jobfile"))
(map builtins.readFile)
(builtins.concatStringsSep "---\n")
(pkgs.writeText "urls.yaml")
];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
urlsFile = lib.pipe cfg.jobs [
(map (format.generate "jobfile"))
(map builtins.readFile)
(builtins.concatStringsSep "---\n")
(pkgs.writeText "urls.yaml")
];
urlsFile = lib.concatMapStringsSep "---\n" (x: ) ....

i think concatMapStringsSep is more what you're looking for ;p

wants = [ "network-online.target" ];
wantedBy = [ "multi-user.target" ];
path = [ cfg.package ];
serviceConfig = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to see some more hardening options, check out systemd-hardening-helper

Co-authored-by: jack rosenberg <56937175+jackrosenberg@users.noreply.github.com>
@nixpkgs-ci nixpkgs-ci bot added 8.has: module (update) This PR changes an existing module in `nixos/` 2.status: merge conflict This PR has merge conflicts with the target branch labels Aug 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: merge conflict This PR has merge conflicts with the target branch 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: changelog This PR adds or changes release notes 8.has: documentation This PR adds or changes documentation 8.has: module (new) This PR adds a module in `nixos/` 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. backport release-25.05 Backport PR automatically
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants