Compare commits

..

6 Commits

Author SHA1 Message Date
7e19eeddc5 configs: common: add dconf-update for update configuration database system
Signed-off-by: BigfootACA <bigfoot@classfun.cn>
2024-05-31 17:03:25 +08:00
bc370a4b9d configs: desktop: initial supports for plasma-wayland
Signed-off-by: BigfootACA <bigfoot@classfun.cn>
2024-05-31 17:03:23 +08:00
e8449b3ce5 configs: desktop: initial supports for plasma
Signed-off-by: BigfootACA <bigfoot@classfun.cn>
2024-05-31 16:59:43 +08:00
86b7cc6943 configs: desktop: initial supports for phosh
Signed-off-by: BigfootACA <bigfoot@classfun.cn>
2024-05-31 16:59:26 +08:00
a847cbe03d builder: build: names.py: populate environment variables to systemd manager
Signed-off-by: BigfootACA <bigfoot@classfun.cn>
2024-05-31 16:58:43 +08:00
1e9877ff7e builder: build: filesystem.py: allow add or remove files to /var
Signed-off-by: BigfootACA <bigfoot@classfun.cn>
2024-05-31 16:58:09 +08:00
6 changed files with 77 additions and 1 deletions

View File

@ -75,8 +75,9 @@ def check_allowed(path: str, action: str):
Why these folder is writable Why these folder is writable
1. /etc/ is used for administrator configs 1. /etc/ is used for administrator configs
2. /boot/ is used for system boot up, you can put bootloaders configs into this folder 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") raise ArchBuilderConfigError(f"{action} {path} is not allowed")

View File

@ -73,6 +73,17 @@ def gen_environments(ctx: ArchBuilderContext):
val = envs[key] val = envs[key]
f.write(f"{key}=\"{val}\"\n") f.write(f"{key}=\"{val}\"\n")
log.info(f"generated environment {file}") 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): def proc_names(ctx: ArchBuilderContext):

View 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

View 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

View 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

View 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