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

nixos/postgresqlBackup: add types #111427

Merged
merged 1 commit into from Feb 1, 2021

Conversation

Scriptkiddi
Copy link
Contributor

Motivation for this change

#76184

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@mweinelt
Copy link
Member

mweinelt commented Feb 3, 2021

How would I go about having no startTime now? I previously had it set to [] and run it by requiring it in my backup job.

@Scriptkiddi
Copy link
Contributor Author

wouldn't an empty string work?

@Scriptkiddi Scriptkiddi deleted the postgresql branch February 4, 2021 09:50
@mweinelt
Copy link
Member

mweinelt commented Feb 7, 2021

It works, but leaves me with this in the kernel ringbuffer.

[2466424.823540] systemd[1]: postgresqlBackup-hass.timer: Timer unit lacks value setting. Refusing.
[root@dione:~]# systemctl cat postgresqlBackup-hass.timer 
# /nix/store/qdk18y8rpq6qwlg6cqw4bspdqnbh2qlz-unit-postgresqlBackup-hass.timer/postgresqlBackup-hass.timer
[Unit]

[Timer]
OnCalendar=

Meanwhile on systems with startTime = []; there will simply be no timer unit. The right solution would probably be along the lines of with types; (either (listOf str) str).

@mweinelt
Copy link
Member

systemd[1]: postgresqlBackup-miniflux.timer: Cannot add dependency job, ignoring: Unit postgresqlBackup-miniflux.timer has a bad unit file setting.

This is just not okay this way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants