-
Notifications
You must be signed in to change notification settings - Fork 1
/
cloud-cfg.yaml
82 lines (80 loc) · 2.35 KB
/
cloud-cfg.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
---
config:
user.user-data: |
#cloud-config
system_info:
default_user:
name: "ptorre"
package_update: true
package_upgrade: true
packages:
- openssh-sftp-server
- bash-completion
- apt-utils
- apt-file
- rsync
- wget
- curl
- less
- zip
- unzip
- file
- tmux
- git
- gcc
- binutils
- python3-dev
- python3.11-venv
- python-is-python3
- tinyscheme
- yamllint
- man-db
write_files:
- path: /etc/environment
content: |
EDITOR=/usr/bin/vi
VISUAL=/usr/bin/vi
append: true
- path: /etc/skel/.bashrc
content: |
stty stop undef
set +H
set -o vi
alias pt='pstree -aslpt '
HISTTIMEFORMAT='%A %D %T '
append: true
- path: /usr/lib/systemd/user/cros-garcon.service
content: |
[Unit]
Description=Chromium OS Garcon Bridge
[Service]
Type=simple
ExecStart=/opt/google/cros-containers/bin/garcon --server
ExecStopPost=/opt/google/cros-containers/bin/guest_service_failure_notifier cros-garcon
Restart=always
Environment="BROWSER=/usr/bin/garcon-url-handler"
Environment="NCURSES_NO_UTF8_ACS=1"
[Install]
WantedBy=default.target
- path: "/etc/skel/.config/cros-garcon.conf"
permissions: "0644"
content: |
# Prevent garcon from installing unwanted services or updating
# the package repositories.
# Excecutables provided in lxc mounts and will update with system
# ChromeOS updates.
DisableAutomaticCrosPackageUpdates=true
DisableAutomaticSecurityUpdates=true
- path: /var/lib/cloud/scripts/per-boot/clean-apt-cros.sh
permissions: "0755"
content: |
#!/bin/bash
# Remove the cros.list package source that periodically respawns
rm -f /etc/apt/sources.list.d/cros.list
runcmd:
- apt-get autopurge --yes openssh-server
- mkdir -p /usr/lib/systemd/user/default.target.wants/
- ln -s /usr/lib/systemd/user/cros-garcon.service /usr/lib/systemd/user/default.target.wants/
- systemctl --global enable cros-garcon.service
- loginctl enable-linger ptorre
...