Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add .timer & various other systemd extensions (fixes #7161) #7163

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions lib/linguist/languages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8468,10 +8468,25 @@ crontab:
language_id: 705203557
desktop:
type: data
filenames:
- "systemd-system.conf"
- "systemd-user.conf"
- "logind.conf"
- "journald.conf"
- "journal-remote.conf"
- "journal-upload.conf"
- "systemd-sleep.conf"
- "timesyncd.conf"
extensions:
- ".desktop"
- ".desktop.in"
- ".automount"
- ".mount"
- ".netdev"
- ".nspawn"
- ".service"
- ".socket"
- ".timer"
tm_scope: source.desktop
ace_mode: text
language_id: 412
Expand Down
7 changes: 7 additions & 0 deletions samples/desktop/btrfs-trim.timer
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[Unit]
Description=Discard unused blocks on a mounted filesystem
Documentation=man:fstrim

[Timer]
OnCalendar=monthly
AccuracySec=1h
9 changes: 9 additions & 0 deletions samples/desktop/nyancat.socket
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[Unit]
Description=Nyan.cat socket

[Socket]
ListenStream=23
Accept=true

[Install]
WantedBy=sockets.target
8 changes: 8 additions & 0 deletions samples/desktop/run-dwarffs.automount
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[Unit]
Description=Debug Symbols File System
Documentation=https://github.com/edolstra/dwarffs
Before=sysinit.target

[Automount]
Where=/run/dwarffs
TimeoutIdleSec=30
7 changes: 7 additions & 0 deletions samples/desktop/signal-cli-socket.socket
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[Unit]
Description=Send secure messages to Signal clients

[Socket]
ListenStream=%t/signal-cli/socket
SocketUser=root
# Add yourself to the signal-cli group to talk with the service
29 changes: 29 additions & 0 deletions samples/desktop/tmp.mount
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# /etc/systemd/system/tmp.mount
# SPDX-License-Identifier: LGPL-2.1+
#
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.

[Unit]
Description=Temporary Directory (/tmp)
Documentation=https://systemd.io/TEMPORARY_DIRECTORIES
Documentation=man:file-hierarchy(7)
Documentation=https://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
ConditionPathIsSymbolicLink=!/tmp
DefaultDependencies=no
Conflicts=umount.target
Before=local-fs.target umount.target middlewared.service
After=swap.target

[Mount]
What=tmpfs
Where=/tmp
Type=tmpfs
Options=mode=1777,strictatime,nosuid,noexec,nodev

[Install]
WantedBy=local-fs.target
7 changes: 7 additions & 0 deletions samples/desktop/tor-browser.nspawn
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[Exec]
DropCapability=all
Environment=DISPLAY=:0
Hostname=kilgore-trout
NoNewPrivileges=true
Parameters=./start-tor-browser --log /dev/stdout
PrivateUsers=true
7 changes: 7 additions & 0 deletions samples/desktop/wireguard.netdev
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[NetDev]
Name=wg0
Kind=wireguard
Description=WireGuard tunnel

[WireGuard]
ListenPort=51820
Loading