How to enable and start Systemd Services on FIRST boot after image build
I've noticed that after an arkdep build/deploy/reboot that there are some Systemd Services that are not enabled and thus not started. For example cronie and sshd However NetworkManager and sddm (I'm using KDE) are enabled and started.
Does your build process mark NetworkManager and sddm as enabled in some way? As I'm not an Arch guru, is there an Arch or Systemd configuration for this [for initial boot]?
I'm not asking about systemctl enable cronie I'm saying that executing the this and others manually after every image build and reboot seems ridiculous
If there's no available solution for this, then I guess I'm asking for a rc.local type of solution!!!
Perhaps you could add examples for cronie and sshd to your documentation , together with /arkdep/config, migrate_files=('/etc/ssh') to avoid new keys being generated on each new image reboot.
(Also, annoyingly sudo always issues the first time warning)
Do you get this? I've done the arkdep build/deploy/reboot cycle many many times now and notice that are download and unpacking errors now and again.
Thanks John
To enable Systemd services in a custom build you can add symlinks to the overlay directory in arkdep-build/variant/overlay/.
For example: https://github.com/arkanelinux/arkdep/tree/main/arkdep-build.d/arkanelinux/overlay/post_bootstrap/etc/systemd/system
You can create these symlinks like so;
ln -s /usr/lib/systemd/system/sshd.service arkdep-build.d/arkanelinux/etc/systemd/system/multi-user.target.wants/sshd.service
etc/ssh is a good suggestion, I added it in https://github.com/arkanelinux/arkdep/commit/59a7dd580d0d9270027663142ccc455edfd33733
The sudo backup I added a few days ago in https://github.com/arkanelinux/arkdep/commit/90c6f59d96da2c33bb3552cbc3a57601a65759bb, when this dir is backed up it will not give the sudo warning after each update. But you would have to manually update your local config to reflect this change, I am not going to tamper with your config.
Maybe another section in config file to just enable systemd services would be a nice addition
Maybe another section in config file to just enable systemd services would be a nice addition
I was thinking about implementing an arkdep-manager script or similar which can abstract this.