-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrootfs.yaml
93 lines (78 loc) · 2.36 KB
/
rootfs.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
{{- $architecture := or .architecture "arm64" -}}
{{- $username := or .username "mobian" -}}
{{- $password := or .password "1234" -}}
{{- $hostname := or .hostname "mobian" -}}
{{- $environment := or .environment "phosh" -}}
{{- $contrib := or .contrib "false" -}}
{{- $nonfree := or .nonfree "false" -}}
{{- $ssh := or .ssh "" -}}
{{- $zram:= or .zram "false" -}}
{{- $debian_suite := or .debian_suite "trixie" -}}
{{- $suite := or .suite $debian_suite -}}
{{- $rootfs := or .rootfs "rootfs.tar.gz" }}
architecture: {{ $architecture }}
actions:
- action: debootstrap
suite: {{ $debian_suite }}
components:
- main
{{ if eq $contrib "true" }}
- contrib
{{ end }}
{{ if eq $nonfree "true" }}
- non-free-firmware
{{ end }}
mirror: http://deb.debian.org/debian
variant: minbase
- action: run
description: Fix build on usr-merged systems
chroot: true
command: apt-get -y -f install
- action: overlay
description: Enable Mobian repository
source: overlays/apt/
destination: /etc/apt/
- action: overlay
description: Enable resize of root partition
source: overlays/repart.d/
destination: /etc/repart.d/
- action: run
description: Setup Mobian repository
chroot: true
script: scripts/setup-apt.sh {{ $debian_suite }} {{ $suite }} {{ $contrib }} {{ $nonfree }}
- action: recipe
recipe: include/packages-base.yaml
variables:
ssh: {{ $ssh }}
- action: recipe
recipe: include/packages-{{ $environment }}.yaml
- action: run
description: Set up default user
chroot: true
script: scripts/setup-user.sh {{ $username }} {{ $password }}
{{ if $ssh }}
- action: overlay
description: Set up sshd configuration
source: overlays/sshd_config.d/
destination: /etc/ssh/sshd_config.d/
- action: overlay
description: Set up user's ssh configuration
source: overlays/ssh/
destination: /home/{{ $username }}/.ssh/
- action: run
description: Set owner of .ssh
chroot: true
command: chown -R {{ $username }}:{{ $username }} /home/{{ $username }}/.ssh/
{{ end }}
{{ if eq $zram "true" }}
- action: overlay
description: setup zram devices
source: overlays/zram/
destination: /etc/
{{ end }}
- action: run
description: Set up system
chroot: true
script: scripts/setup-system.sh {{ $hostname }}
- action: pack
file: {{ $rootfs }}