This repository has been archived on 2024-04-07. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/root/fstab

40 lines
1.1 KiB
Plaintext

{{@@ non_templated(_dotfile_abs_dst) @@}}
##### Dotdrop-start #####
# <filesystem> <dir> <type> <options> <dump> <pass>
{%@@ set btrfs_opt_t = "rw,noatime,compress=zstd:3,subvol={}" @@%}
{%@@ set entry_t = "UUID={uuid} {path} {fs} {opts} {dump} {pass}" @@%}
{%@@ for partition in filesystem.partition @@%}
{{@@ entry_t.format(
uuid= partition.uuid ,
path= partition.path ,
fs= partition.type,
opts= partition.options,
dump= "0",
pass= "0",
) @@}}
{%@@ endfor @@%}
{%@@ set new_partitions = filesystem.btrfs_subvolumes.update({root_subvol: '/'}) @@%}
{%@@ for name, path in filesystem.btrfs_subvolumes.items() @@%}
{{@@ entry_t.format(
uuid= root_uuid ,
path= path ,
fs= "btrfs",
opts= btrfs_opt_t.format(name),
dump= "0",
pass= ("root" in name) | int,
) @@}}
{%@@ endfor @@%}
/swap/swapfile none swap defaults 0 0
tmpfs /tmp tmpfs rw,nodev,nosuid,size=2G 0 0
{%@@ if zram @@%}
/dev/zram0 none swap defaults,pri=100 0 0
{%@@ endif @@%}
# vim: ft=etc-fstab