feature(timezone/locale): enable runtime adjustment, move to features#1772
feature(timezone/locale): enable runtime adjustment, move to features#1772kajusnau wants to merge 3 commits intotiiuae:mainfrom
Conversation
Signed-off-by: Kajus Naujokaitis <kajus.naujokaitis@unikie.com>
13d21ee to
faa580b
Compare
| ghaf.storagevm.directories = [ | ||
| { | ||
| directory = dirOf globalConfPath; | ||
| mode = "0755"; |
There was a problem hiding this comment.
whats happening here?
There was a problem hiding this comment.
Persistent storage of locale env settings at /var/lib/locale, with read rights for users so both user session and system services can monitor changes.
|
Tested on system76 and Lenovo-X1
Issues identified:
|
| targetVms = [ | ||
| "gui-vm" | ||
| "net-vm" | ||
| "admin-vm" | ||
| "audio-vm" |
There was a problem hiding this comment.
Do we also need to configure the timezone for the app VMs?
There was a problem hiding this comment.
With this patch App VMs will inherit the globalConfig value of time.timeZone via modules/microvm/sysvms/appvm-base.nix #296, which will default to null. This enables runtime management of the timezone.
As for enabling explicitly via targetVms, I'm not sure how we'd go about it with the current implementation.
App VMs are instantiated multiple times, so we'd need to list each VM here, e.g. "chromium-vm", "comms-vm", or have some way to enable it globally for all App VMs with some targetVms = [ ... "app-vm" ... ]
Any ideas about this from @brianmcgillion ?
Maybe this could be tackled in a separate PR if/when needed?
- implemented runtime mgmt of timezone and locale - enablind these modules now enables runtime mgmt of both - simplified tz forwarding to be triggered by systemd - added persistent locale settings storage - added .profile locale inheritance on boot - added system-wide .profile locale inheritance on boot - added explicit systemd services to handle locale mgmt and forwarding - enabled timezone and locale pages in initial setup Signed-off-by: Kajus Naujokaitis <kajus.naujokaitis@unikie.com>
- exposed timezone and locale modules as features in global config - enabled timezone and locale features in sysvms - enabled timezone and locale propagation in gui-vm - enabled system locale override in gui-vm - set default time.timeZone to null in global config Signed-off-by: Kajus Naujokaitis <kajus.naujokaitis@unikie.com>
faa580b to
c60be63
Compare
Thanks for testing! Issues 1 and 3 are valid, but unrelated to this PR: Updated to fix 2 and 4:
Please re-test when possible 🫡 |
Description of Changes
Quick summary:
Timezone and locale settings moved to
featuresTimezone and locale can now be adjusted at runtime via COSMIC tools or any other tools.
Changes take effect immediately (timezone), after session restart (locale session config), or after system reboot (if system locale override is enabled).
Detailed changes:
ghaf.services.timezone):timezone.propagateoption to control propagation via givctimezone.enableto instead control runtime mgmt of timezone on the target systemtimezone.propagatenow setstime.timeZonetonull, which enables runtime mgmtghaf.services.locale):locale.propagateoption to control propagation via givclocale.enableto instead control runtime mgmt of locale on the target systemlocale.overrideSystemLocale(naming suggestions welcome)./var/lib/locale/.locale-env, which will be imported by the global.profileat boot iflocale.overrideSystemLocale == true.featuresumbrella:time.timeZonetonullby defaultghaf-intronot starting automatically:ghaf-open, which will determine the correct desktop entry automaticallyType of Change
Related Issues / Tickets
Closes/fixes:
Checklist
make-checksand it passesTesting Instructions
Applicable Targets
aarch64aarch64x86_64x86_64x86_64Installation Method
nixos-rebuild ... switchTest Steps To Verify:
Note
Fresh install is recommended for testing
Warning
Changing the locale (language) might result in localization occuring in the shell - e.g. some common shell utilities might have their output automatically translated to your selected language.
ghaf-introopens automatically