mirror of
https://github.com/ublue-os/bazzite.git
synced 2025-01-30 21:32:48 +00:00
18 lines
551 B
Desktop File
18 lines
551 B
Desktop File
[Unit]
|
|
Description=Traditional swap file for Steam Deck
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
Environment="SWAP_PATH=/var/vm" "SWAP_FILE=swapfile1"
|
|
EnvironmentFile=-/etc/default/%p
|
|
ExecStartPre=-/usr/bin/rm -rf ${SWAP_PATH}
|
|
ExecStartPre=/usr/bin/mkdir -p ${SWAP_PATH}
|
|
ExecStartPre=/usr/sbin/btrfs filesystem mkswapfile ${SWAP_PATH}/${SWAP_FILE} --size ${SWAP_SIZE}
|
|
ExecStart=/sbin/swapon ${SWAP_PATH}/${SWAP_FILE}
|
|
ExecStop=/sbin/swapoff ${SWAP_PATH}/${SWAP_FILE}
|
|
ExecStopPost=-/usr/bin/rm -rf ${SWAP_PATH}
|
|
RemainAfterExit=true
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|