mirror of
https://github.com/BigfootACA/arch-image-builder.git
synced 2024-09-21 14:40:54 +08:00
Compare commits
6 Commits
37aed6dfee
...
7e19eeddc5
Author | SHA1 | Date | |
---|---|---|---|
7e19eeddc5 | |||
bc370a4b9d | |||
e8449b3ce5 | |||
86b7cc6943 | |||
a847cbe03d | |||
1e9877ff7e |
@ -75,8 +75,9 @@ def check_allowed(path: str, action: str):
|
||||
Why these folder is writable
|
||||
1. /etc/ is used for administrator configs
|
||||
2. /boot/ is used for system boot up, you can put bootloaders configs into this folder
|
||||
3. /var/ is used for daemons runtime states
|
||||
"""
|
||||
if not path.startswith(("/etc/", "/boot/")):
|
||||
if not path.startswith(("/etc/", "/boot/", "/var/")):
|
||||
raise ArchBuilderConfigError(f"{action} {path} is not allowed")
|
||||
|
||||
|
||||
|
@ -73,6 +73,17 @@ def gen_environments(ctx: ArchBuilderContext):
|
||||
val = envs[key]
|
||||
f.write(f"{key}=\"{val}\"\n")
|
||||
log.info(f"generated environment {file}")
|
||||
folder = os.path.join(root, "etc/systemd/system.conf.d")
|
||||
os.makedirs(folder, mode=0o0755, exist_ok=True)
|
||||
file = os.path.join(folder, "environment.conf")
|
||||
with open(file, "w") as f:
|
||||
f.write("# default environments for all processes\n\n")
|
||||
f.write("[Manager]\n")
|
||||
for key in envs:
|
||||
val = envs[key]
|
||||
f.write(f"DefaultEnvironment=\"{key}={val}\"\n")
|
||||
os.chmod(file, mode=0o0644)
|
||||
log.info(f"generated environment {file}")
|
||||
|
||||
|
||||
def proc_names(ctx: ArchBuilderContext):
|
||||
|
17
configs/common/dconf-update.yaml
Normal file
17
configs/common/dconf-update.yaml
Normal file
@ -0,0 +1,17 @@
|
||||
filesystem:
|
||||
files:
|
||||
- path: /etc/systemd/system/dconf-update.service
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Update Configuration database system
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=dconf update
|
||||
[Install]
|
||||
WantedBy=bluetooth.target
|
||||
systemd:
|
||||
enable:
|
||||
- dconf-update.service
|
||||
pacman:
|
||||
install:
|
||||
- dconf
|
16
configs/desktop/phosh.yaml
Normal file
16
configs/desktop/phosh.yaml
Normal file
@ -0,0 +1,16 @@
|
||||
# GNOME desktop
|
||||
pacman:
|
||||
install:
|
||||
- phosh
|
||||
filesystem:
|
||||
files:
|
||||
- path: /var/lib/AccountsService/users/alarm
|
||||
content: |
|
||||
[User]
|
||||
Session=phosh
|
||||
- path: /var/lib/AccountsService/users/arch
|
||||
content: |
|
||||
[User]
|
||||
Session=phosh
|
||||
+also:
|
||||
- desktop/gnome
|
12
configs/desktop/plasma-wayland.yaml
Normal file
12
configs/desktop/plasma-wayland.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
# Wayland supports for Plasma KDE desktop
|
||||
filesystem:
|
||||
files:
|
||||
- path: /etc/sddm.conf.d/wayland.conf
|
||||
content: |
|
||||
[General]
|
||||
DisplayServer=wayland
|
||||
GreeterEnvironment=QT_WAYLAND_SHELL_INTEGRATION=layer-shell
|
||||
[Wayland]
|
||||
CompositorCommand=kwin_wayland --drm --no-lockscreen --no-global-shortcuts --locale1
|
||||
+also:
|
||||
- desktop/plasma
|
19
configs/desktop/plasma.yaml
Normal file
19
configs/desktop/plasma.yaml
Normal file
@ -0,0 +1,19 @@
|
||||
# Plasma KDE desktop
|
||||
pacman:
|
||||
install:
|
||||
- plasma
|
||||
- sddm
|
||||
- packagekit-qt6
|
||||
systemd:
|
||||
default: graphical.target
|
||||
enable:
|
||||
- sddm.service
|
||||
filesystem:
|
||||
files:
|
||||
- path: /etc/sddm.conf.d/breeze.conf
|
||||
content: |
|
||||
[Theme]
|
||||
Current=breeze
|
||||
+also:
|
||||
# Ensure NetworkManager is enabled
|
||||
- packages/network-manager
|
Loading…
Reference in New Issue
Block a user