systemd: allow setting timezone via timedatectl#26608
Conversation
|
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. |
|
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. |
|
Was the systemd change proposed on the nixos systemd repo? |
|
No, I should probably do that :) |
|
systemd change has been merged and I've rebased against staging, so this should be good to merge now. |
nixos/tests/timezone.nix
Outdated
There was a problem hiding this comment.
Whoopsies! Good catch, thanks.
nixos/tests/timezone.nix
Outdated
nixos/tests/timezone.nix
Outdated
There was a problem hiding this comment.
Should this not be the default anyway?
nixos/tests/timezone.nix
Outdated
nixos/modules/config/timezone.nix
Outdated
There was a problem hiding this comment.
It would be slightly simpler to use optionalAttrs here.
There was a problem hiding this comment.
Indeed, thanks for the feedback. I feel silly because I'm even using it just a few lines above…
There was a problem hiding this comment.
Maybe some day we have a linter for Nix that can spot patterns like this. A man can wish...
|
Looks to me like this PR by itself no longer is a mass rebuild, as it just contains changes to the nixos module. |
|
Also correct! I'll change its target to master. |
|
Any further obstacles to merging, once ae26f29 has made it from staging into master? |
|
Thank you. If you care to, consider adding a changelog entry for 17.09. |
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
(nix.useSandbox on NixOS,
or option
build-use-sandboxinnix.confon non-NixOS)
nix-shell -p nox --run "nox-review wip"./result/bin/)