Config...ystemd(3pm)
π Config::Model::Systemd π
okay bestie, welcome to the manual page for Config::Model::Systemd β she's an editor and a validator for your systemd configuration files, and yeah, she's part of the User Contributed Perl Documentation. pull up a chair, this is lowkey a lot and also kind of iconic π«Ά
β¨ NAME β¨
Config::Model::Systemd β Editor and validator for systemd configuration files
πΈ VERSION πΈ
version 0.260.1 β yes, that's the one, no cap π
π¦ SYNOPSIS π¦
# run on one service:
$ sudo cme <cmd> systemd-service <name> # run command on name.service
$ sudo cme <cmd> systemd-socket <name> # run command on name.socket
$ sudo cme <cmd> systemd-timer <name> # run command on name.timer
# run on several user units:
# Run on several units:
$ sudo cme <cmd> systemd * # run command on all units
$ sudo cme <cmd> systemd <pattern> # run command on all units matching pattern
$ sudo cme <cmd> systemd <pattern> # run command on all units matching pattern
$ cme <cmd> systemd-user <pattern> # run command on all user units matching pattern
# run on one service file (for unit development):
$ sudo cme <cmd> systemd-service-file <file-name>
$ sudo cme <cmd> systemd-socket-file <file-name>
$ sudo cme <cmd> systemd-timer-file <file-name>
π DESCRIPTION π
So. This module hands cme a whole configuration editor for systemd's config files β like, all the files living in ~/.config/systemd/user/ or all the files in /etc/systemd/system/. she's thorough, she's organized, she ate π
okay yes I simplified, you caught me π in more detail: this module provides the configuration models of Systemd configuration file that cme, Config::Model and Config::Model::TkUI use to bring you a configuration editor (cme edit) and a checker (cme check). iconic behavior honestly π
π invoke editor π
The following command loads user systemd files (from ~/.config/systemd/user/ and launches a graphical editor:
cme edit systemd-user foo
Likewise, the following command loads system systemd configuration files and launches a graphical editor to update an override file (like the systemctl edit command):
sudo cme edit systemd foo
A developer can also edit a systemd file shipped with a software:
cme edit systemd-service-file software-thing.service
π Just check systemd configuration π
You can also use cme to run sanity checks on systemd configuration files, which honestly, do it, your future self will thank you:
cme check systemd-user '*'
cme check systemd '*' # may take time
cme check systemd-service foo
cme check systemd-service-file software-thing.service
π Use in Perl program (experimental) π
As of Config::Model 2.086, a cme(...) in cme function is exported to modify configuration in a Perl program. For instance:
use Config::Model qw/cme/; # also import cme function
# call cme for systemd-user, modify ans save my-imap-tunnel.socket file.
cme(
application => 'systemd-user',
backend_arg => 'my-imap-tunnel'
)->modify('socket:my-imap-tunnel Socket Accept=yes') ;
Similarly, system Systemd files can be modified using systemd application:
use Config::Model qw/cme/;
cme(
application => 'systemd',
backend_arg => 'foo'
)->modify(...) ;
For more details and parameters, please see cme, modify, load and save documentation. go read them bestie, they're right there π
β¨ Command line example β¨
The examples below require App::Cme. it's giving prerequisites, we love that for us π
Dump override content of a specific service:
$ cme dump systemd-service transmission-daemon
Reading unit 'service' 'transmission-daemon' from '/lib/systemd/system/transmission-daemon.service'.
---
Unit:
After:
- network-online.target
- remote-fs.target
Before:
- umount.target
Conflicts:
- umount.target
Dump the whole service (like systemctl cat):
$ cme dump systemd-service transmission-daemon --dumptype full
Reading unit 'service' 'transmission-daemon' from '/lib/systemd/system/transmission-daemon.service'.
---
Install:
WantedBy:
- multi-user.target
Service:
CPUShares: 1024
CPUWeight: 100
ExecReload:
- /bin/kill -s HUP $MAINPID
ExecStart:
- /usr/bin/transmission-daemon -f --log-error
[etc...]
Edit the service override with a GUI:
$ cme edit systemd-service transmission-daemon.service
Edit the service override with a Shell UI:
$ cme shell systemd-service transmission-daemon.service
>:$ ls
Service Unit Install
>:$ cd Unit
>: Unit $ ll -nz
name β type β value
βββββββββββΌβββββββΌβββββββββββββββββββββββββββββββββββββββ
Conflicts β list β umount.target
Before β list β umount.target
After β list β network-online.target,remote-fs.target
>: Unit $ set After:.push(foo.target)
>: Unit $ ll -nz
name β type β value
βββββββββββΌβββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββ
Conflicts β list β umount.target
Before β list β umount.target
After β list β network-online.target,remote-fs.target,foo.target
Run command all user units:
$ cme edit systemd-user '*'
$ cme check systemd-user '*'
Run command all user units that match 'foo':
$ cme edit systemd-user foo
$ cme check systemd-user foo
Check all root units (can be quite long on small systems) π:
# cme check systemd '*'
Check all root units that match 'foo':
# cme check systemd foo
Edit override file of foo.service:
# cme edit systemd foo.service
Run command on a service file:
$ cme check systemd-service path/to/file.service
$ cme edit systemd-service path/to/file.service
Timer and socket units are also supported:
$ cme check systemd-socket path/to/file.socket
$ cme check systemd-timer path/to/file.timer
π Perl program (experimental) π
use Config::Model qw/cme/;
cme(application => 'systemd-user' backend_arg => 'free-imap-tunnel')
->modify('socket:free-imap-tunnel Socket Accept=yes') ;
cme(application => 'systemd-service', config_file => 'foo.service')
->modify('Unit Description="a service that does foo things"')
π BUGS π
okay so listen, the list of supported parameters is extracted from the xml documentation provided by systemd project. this list is expected to be rather complete. good news, right? π
but β the properties of these parameters are inferred from the description of the parameters and are probably less accurate. so yeah, that part is a little unhinged, not gonna lie π¬ In case of errors, please log a bug <https://github.com/dod38fr/config-model-systemd/issues>.
π§ TODO π§
For now, only unit, socket and service files are supported. Please log a wishlist bug if you need other unit types to be supported. manifesting more unit types for you π―οΈβ¨
π«Ά SUPPORT π«Ά
In case of issue, please log a bug on <https://github.com/dod38fr/config-model-systemd/issues>.
πΈ Contributors πΈ
Mohammad S Anwar
Thanks for your contributions π
π SEE ALSO π
cmeConfig::Model- <http://github.com/dod38fr/config-model/wiki/Using-config-model>
β¨ AUTHOR β¨
Dominique Dumont
π COPYRIGHT AND LICENSE π
This software is Copyright (c) 2008-2025 by Dominique Dumont.
This is free software, licensed under:
The GNU Lesser General Public License, Version 2.1, February 1999
π SUPPORT π
π Websites π
The following websites have more information about this module, and may be of help to you. As always, in addition to those websites please use your favorite search engine to discover more resources.
- CPANTS
The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution.
<http://cpants.cpanauthors.org/dist/Config-Model-Systemd>
- CPAN Testers
The CPAN Testers is a network of smoke testers who run automated tests on uploaded CPAN distributions.
<http://www.cpantesters.org/distro/C/Config-Model-Systemd>
- CPAN Testers Matrix
The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms.
<http://matrix.cpantesters.org/?dist=Config-Model-Systemd>
- CPAN Testers Dependencies
The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution.
<http://deps.cpantesters.org/?module=Config::Model::Systemd>
π Bugs / Feature Requests π
Please report any bugs or feature requests by email to "ddumont at cpan.org", or through the web interface at <https://github.com/dod38fr/config-model-systemd/issues>. You will be automatically notified of any progress on the request by the system. no ghosting, they'll ping you back π
π Source Code π
The code is open to the world, and available for you to hack on. Please feel free to browse it and play with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull from your repository :)
<http://github.com/dod38fr/config-model-systemd>
git clone git://github.com/dod38fr/config-model-systemd.git
okay that's the whole page bestie, you made it to the end, slay π
β¨ this was Config::Model::Systemd under perl v5.40.1, dated 2026-03-22 β go forth and cme check responsibly, mwah ππ¦π
π¦ where this page comes from
- ubuntu stonking: libconfig-model-systemd-perl 0.260.1-1 Β· LGPL-2.1-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms