-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Speedup workstation boot by turning swap service to simple
- Loading branch information
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
system/modules/home-pc-linux/swap/root/etc/systemd/system/systemd-swap.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
[Unit] | ||
Description=Manage swap spaces on zram, files and partitions. | ||
|
||
[Service] | ||
Type=simple | ||
NotifyAccess=main | ||
ExecStart=/usr/bin/systemd-swap start | ||
ExecStop=/usr/bin/systemd-swap stop | ||
RemainAfterExit=true | ||
TimeoutStopSec=600 | ||
OOMScoreAdjust=-1000 | ||
CPUSchedulingPolicy=fifo | ||
CPUSchedulingPriority=20 | ||
CapabilityBoundingSet=CAP_SYS_ADMIN CAP_SYS_MODULE | ||
DeviceAllow=block-blkext r | ||
DeviceAllow=block-device-mapper r | ||
DeviceAllow=block-loop rw | ||
DeviceAllow=block-sd r | ||
DeviceAllow=block-virtblk rw | ||
DeviceAllow=block-zram rw | ||
NoNewPrivileges=true | ||
PrivateNetwork=true | ||
ProtectClock=true | ||
ProtectControlGroups=true | ||
ProtectHome=read-only | ||
ProtectHostname=true | ||
ProtectKernelLogs=true | ||
ProtectSystem=full | ||
RestrictNamespaces=true | ||
RestrictSUIDSGID=true | ||
SystemCallArchitectures=native | ||
SystemCallErrorNumber=EPERM | ||
SystemCallFilter=@system-service @swap @module | ||
|
||
[Install] | ||
WantedBy=multi-user.target |