detached 4d54bdb

feat(config,handler,service): add cli-tools/dms-opt-in to PostBootScripts, strip copyShellConfigs, add TTY+network to service

commit
4d54bdb7b724f086bebb62c03f40cca2903a1aac
author
bnema · · 2026-02-26 21:16 UTC
committer
bnema · · 2026-02-26 21:18 UTC
parent
1553a95
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
3 files · +9 -33
M install/mandatory/post-boot/archup-first-boot.service +5 -2
@@ -1,6 +1,7 @@
11 [Unit]
22 Description=ArchUp First Boot Setup
3-After=local-fs.target systemd-logind.service dbus.service
3+After=local-fs.target systemd-logind.service dbus.service network-online.target
4+Wants=network-online.target
45 ConditionPathExists=!/var/lib/archup-first-boot-complete
56
67 [Service]
@@ -9,7 +10,9 @@ Environment="ARCHUP_EMAIL=__ARCHUP_EMAIL__"
910 Environment="ARCHUP_USERNAME=__ARCHUP_USERNAME__"
1011 ExecStart=/usr/local/share/archup/post-boot/all.sh
1112 ExecStartPost=/usr/bin/touch /var/lib/archup-first-boot-complete
12-StandardOutput=journal+console
13+TTYPath=/dev/tty1
14+StandardInput=tty
15+StandardOutput=tty
1316 StandardError=journal+console
1417
1518 [Install]
@@ -1,6 +1,7 @@
1 [Unit]1 [Unit]
2 Description=ArchUp First Boot Setup2 Description=ArchUp First Boot Setup
3-After=local-fs.target systemd-logind.service dbus.service3+After=local-fs.target systemd-logind.service dbus.service network-online.target
4+Wants=network-online.target
4 ConditionPathExists=!/var/lib/archup-first-boot-complete5 ConditionPathExists=!/var/lib/archup-first-boot-complete
5 6
6 [Service]7 [Service]
@@ -9,7 +10,9 @@ Environment="ARCHUP_EMAIL=__ARCHUP_EMAIL__"
9 Environment="ARCHUP_USERNAME=__ARCHUP_USERNAME__"10 Environment="ARCHUP_USERNAME=__ARCHUP_USERNAME__"
10 ExecStart=/usr/local/share/archup/post-boot/all.sh11 ExecStart=/usr/local/share/archup/post-boot/all.sh
11 ExecStartPost=/usr/bin/touch /var/lib/archup-first-boot-complete12 ExecStartPost=/usr/bin/touch /var/lib/archup-first-boot-complete
12-StandardOutput=journal+console13+TTYPath=/dev/tty1
14+StandardInput=tty
15+StandardOutput=tty
13 StandardError=journal+console16 StandardError=journal+console
14 17
15 [Install]18 [Install]
M internal/application/handlers/post_install_handler.go +2 -31
@@ -120,14 +120,6 @@ func (h *PostInstallHandler) setupPostBoot(ctx context.Context, mountPoint, user
120120 }
121121 }
122122
123- if err := h.copyShellConfigs(mountPoint, username); err != nil {
124- return fmt.Errorf("failed to copy shell configs: %w", err)
125- }
126-
127- if _, err := h.chrExec.ExecuteInChroot(ctx, mountPoint, "chown", "-R", fmt.Sprintf("%s:%s", username, username), filepath.Join("/home", username, ".config")); err != nil {
128- return fmt.Errorf("failed to set shell config ownership: %w", err)
129- }
130-
131123 if err := h.chrExec.ChrootSystemctl(ctx, h.logger.LogPath(), mountPoint, "enable", config.PostBootServiceName); err != nil {
132124 return fmt.Errorf("failed to enable first-boot service: %w", err)
133125 }
@@ -167,30 +159,9 @@ func (h *PostInstallHandler) installLimineLogo(mountPoint string) error {
167159 return nil
168160 }
169161
162+// copyShellConfigs is a no-op: shell configuration is handled by
163+// cli-tools.sh on first boot. No config files are copied at install time.
170164 func (h *PostInstallHandler) copyShellConfigs(mountPoint, username string) error {
171- configDir := filepath.Join(mountPoint, "home", username, ".config")
172- if err := h.fs.MkdirAll(configDir, 0755); err != nil {
173- return fmt.Errorf("failed to create user config dir: %w", err)
174- }
175-
176- files := []string{
177- "install/configs/shell/aliases",
178- "install/configs/shell/envs",
179- "install/configs/shell/init",
180- "install/configs/shell/rc",
181- "install/configs/shell/shell",
182- "install/configs/shell/starship.toml",
183- "install/configs/shell/bashrc",
184- }
185-
186- for _, src := range files {
187- _, name := filepath.Split(src)
188- dst := filepath.Join(configDir, name)
189- if err := h.writeFromTemplate(src, dst); err != nil {
190- return err
191- }
192- }
193-
194165 return nil
195166 }
196167
@@ -120,14 +120,6 @@ func (h *PostInstallHandler) setupPostBoot(ctx context.Context, mountPoint, user
120 }120 }
121 }121 }
122 122
123- if err := h.copyShellConfigs(mountPoint, username); err != nil {
124- return fmt.Errorf("failed to copy shell configs: %w", err)
125- }
126-
127- if _, err := h.chrExec.ExecuteInChroot(ctx, mountPoint, "chown", "-R", fmt.Sprintf("%s:%s", username, username), filepath.Join("/home", username, ".config")); err != nil {
128- return fmt.Errorf("failed to set shell config ownership: %w", err)
129- }
130-
131 if err := h.chrExec.ChrootSystemctl(ctx, h.logger.LogPath(), mountPoint, "enable", config.PostBootServiceName); err != nil {123 if err := h.chrExec.ChrootSystemctl(ctx, h.logger.LogPath(), mountPoint, "enable", config.PostBootServiceName); err != nil {
132 return fmt.Errorf("failed to enable first-boot service: %w", err)124 return fmt.Errorf("failed to enable first-boot service: %w", err)
133 }125 }
@@ -167,30 +159,9 @@ func (h *PostInstallHandler) installLimineLogo(mountPoint string) error {
167 return nil159 return nil
168 }160 }
169 161
162+// copyShellConfigs is a no-op: shell configuration is handled by
163+// cli-tools.sh on first boot. No config files are copied at install time.
170 func (h *PostInstallHandler) copyShellConfigs(mountPoint, username string) error {164 func (h *PostInstallHandler) copyShellConfigs(mountPoint, username string) error {
171- configDir := filepath.Join(mountPoint, "home", username, ".config")
172- if err := h.fs.MkdirAll(configDir, 0755); err != nil {
173- return fmt.Errorf("failed to create user config dir: %w", err)
174- }
175-
176- files := []string{
177- "install/configs/shell/aliases",
178- "install/configs/shell/envs",
179- "install/configs/shell/init",
180- "install/configs/shell/rc",
181- "install/configs/shell/shell",
182- "install/configs/shell/starship.toml",
183- "install/configs/shell/bashrc",
184- }
185-
186- for _, src := range files {
187- _, name := filepath.Split(src)
188- dst := filepath.Join(configDir, name)
189- if err := h.writeFromTemplate(src, dst); err != nil {
190- return err
191- }
192- }
193-
194 return nil165 return nil
195 }166 }
196 167
M internal/config/config.go +2 -0
@@ -192,6 +192,8 @@ var PostBootScripts = []string{
192192 "ssh-keygen.sh",
193193 "archup-cli.sh",
194194 "blesh.sh",
195+ "cli-tools.sh",
196+ "dms-opt-in.sh",
195197 }
196198
197199 // Post-boot service template URL path
@@ -192,6 +192,8 @@ var PostBootScripts = []string{
192 "ssh-keygen.sh",192 "ssh-keygen.sh",
193 "archup-cli.sh",193 "archup-cli.sh",
194 "blesh.sh",194 "blesh.sh",
195+ "cli-tools.sh",
196+ "dms-opt-in.sh",
195 }197 }
196 198
197 // Post-boot service template URL path199 // Post-boot service template URL path

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 0

    ↑↓ moveenter openesc close