Skip to content

systemd: allow setting timezone via timedatectl#26608

Merged
joachifm merged 1 commit intoNixOS:masterfrom
lheckemann:timezone-pr
Jul 31, 2017
Merged

systemd: allow setting timezone via timedatectl#26608
joachifm merged 1 commit intoNixOS:masterfrom
lheckemann:timezone-pr

Conversation

@lheckemann
Copy link
Member

Motivation for this change

#26469

I'm not sure about the exact process of getting this into nixpkgs proper. There's the matter of getting lheckemann/systemd@5352df7 into nixos's systemd (thankfully github allows referring to commits from forks in the source repo so this works even though it hasn't been merged anywhere) in addition to this. I've PRed this to staging because of the mass rebuild it causes.

Any feedback on the material contents of the PR in addition to process information is of course also very welcome!

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@bjornfor
Copy link
Contributor

It's not clear to me what the timezone is if you leave time.timeZone at its new default (as in this PR) and don't set the timezone with timedatectl. It'd be nice to have that answer in the option description.

+1.

@lheckemann
Copy link
Member Author

https://github.com/NixOS/nixpkgs/pull/26608/files#diff-de67a90fdc8239d085560b0393b3daf4R31 defaults to UTC, so this would not change behaviour from existing installations besides allowing imperative changes to the timezone. I'll add it to the option description.

@joachifm joachifm added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 1.severity: mass-rebuild labels Jun 26, 2017
@joachifm
Copy link
Contributor

Was the systemd change proposed on the nixos systemd repo?

@lheckemann
Copy link
Member Author

No, I should probably do that :)

@lheckemann
Copy link
Member Author

NixOS/systemd#13

@lheckemann
Copy link
Member Author

systemd change has been merged and I've rebased against staging, so this should be good to merge now.

Copy link
Member

@Mic92 Mic92 Jul 17, 2017

Choose a reason for hiding this comment

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

this line has to be removed.

Copy link
Member Author

Choose a reason for hiding this comment

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

Whoopsies! Good catch, thanks.

Copy link
Member

Choose a reason for hiding this comment

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

this line has to be removed.

Copy link
Member

Choose a reason for hiding this comment

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

Should this not be the default anyway?

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed!

Copy link
Member

Choose a reason for hiding this comment

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

same here?

Copy link
Member

Choose a reason for hiding this comment

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

It would be slightly simpler to use optionalAttrs here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Indeed, thanks for the feedback. I feel silly because I'm even using it just a few lines above…

Copy link
Member

@basvandijk basvandijk Jul 26, 2017

Choose a reason for hiding this comment

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

Maybe some day we have a linter for Nix that can spot patterns like this. A man can wish...

@joachifm
Copy link
Contributor

Looks to me like this PR by itself no longer is a mass rebuild, as it just contains changes to the nixos module.

@lheckemann
Copy link
Member Author

Also correct! I'll change its target to master.

@lheckemann lheckemann changed the base branch from staging to master July 26, 2017 18:58
@lheckemann
Copy link
Member Author

Any further obstacles to merging, once ae26f29 has made it from staging into master?

@joachifm joachifm merged commit a0d4640 into NixOS:master Jul 31, 2017
@joachifm
Copy link
Contributor

Thank you. If you care to, consider adding a changelog entry for 17.09.

@fpletz fpletz added this to the 17.09 milestone Jul 31, 2017
@fpletz fpletz added the 9.needs: changelog This PR needs a changelog entry label Jul 31, 2017
@lheckemann lheckemann deleted the timezone-pr branch August 4, 2017 19:35
@lheckemann lheckemann mentioned this pull request Nov 28, 2019
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 9.needs: changelog This PR needs a changelog entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants