Define core files via debconf
User story: I am an everyday user. I want LDH-aware applications to use my LDH defaults, so that I don't have to remember anything more than my address and passphrase.
User story: I am a user comfortable with the command line. I want to reset my LDH defaults, so that I can switch operator or tweak my settings.
User story: I am a developer. I want to reference the user's preferred LDH configuration, so that I don't need to download them.
Suggested solution: Define core values and templates. These are used to create /etc/liberty/services.conf
and other core files. These files store the default values used by LDH-aware applications. These can be redefined (and recreated) via debconf. See discussion in https://source.puri.sm/liberty/social/gui/issues/4 for details/ideas.
Use cases:
- FLAGSHIP DEFAULT
The default values are for the LDH flagship, Librem One.
- LIBERTY TEMPLATE
The user can invoke debconf and provide a single input, the domain. All other values derive from that, and are used to generate files from templates.
- INDIVIDUAL OVERRIDE
The user can invoke debconf to override each individual particular value. (Low priority.)
- MANUAL OVERRIDE
The user can edit /etc/liberty/services.conf
manually and invoke update-liberty-services
. These values will be used to generate files from templates.
Proposed generic template:
HUB_TITLE: Liberty Hub
HUB_URL: https://LIBERTY.HOST/accounts/profile/
HUB_ICON: liberty-hub
SOCIAL_ICON: liberty-social
SOCIAL_URL: https://social.LIBERTY.HOST/web/getting-started
SOCIAL_KEYWORDS: Liberty Social
SOCIAL_DESCRIPTION: An opt-in social network
CHAT_DOMAIN: chat.LIBERTY.HOST
CHAT_ID_DOMAIN: vector.im
Proposed default values/overrides:
LIBERTY.HOST: librem.one
HUB_TITLE: Librem One
SOCIAL_KEYWORDS: Librem Social, Liberty Social
Example template:
This would be used to generate, for example, the Social .desktop
file:
[Desktop Entry]
Version=1.0
Type=Application
Exec=epiphany --application-mode=ldhsocial.desktop %%SOCIAL_URL%%
Icon=%%SOCIAL_ICON%%
StartupNotify=true
StartupWMClass=ldhsocial
Terminal=false
Name=Social
Comment=%%SOCIAL_DESCRIPTION%%
Keywords=%%SOCIAL_KEYWORDS%%