d4cb2f8acb
atool 上次更新于 2016 年,且依赖外部 unzip/unrar/p7zip 二进制。 ouch 是纯 Rust 实现,所有常见格式(zip/7z/rar/tar/gz/bz2/xz/zst 等) 通过 Rust crates 原生支持,运行时零外部依赖。 - pacman: -atool -unrar -unzip +ouch - 保留 7zip:yazi 用作存档预览/提取的可选依赖 - .zshrc: alias x: aunpack → ouch decompress
74 lines
1.8 KiB
Python
74 lines
1.8 KiB
Python
from decman import File, Module
|
|
from decman.plugins.aur import packages as aur_packages
|
|
from decman.plugins.pacman import packages as pacman_packages
|
|
|
|
|
|
class BaseModule(Module):
|
|
def __init__(self, user: str):
|
|
super().__init__("base")
|
|
self.user = user
|
|
|
|
def files(self):
|
|
return {
|
|
"/etc/pacman.conf": File(
|
|
source_file="./system/etc/pacman.conf",
|
|
),
|
|
"/etc/pacman.d/mirrorlist": File(
|
|
source_file="./system/etc/pacman.d/mirrorlist",
|
|
),
|
|
"/etc/sudoers.d/10-wheel": File(
|
|
source_file="./system/etc/sudoers.d/10-wheel",
|
|
permissions=0o440,
|
|
),
|
|
f"/home/{self.user}/.config/git/config": File(
|
|
source_file="./home/.config/git/config",
|
|
owner=self.user,
|
|
),
|
|
f"/home/{self.user}/.config/starship.toml": File(
|
|
source_file="./home/.config/starship.toml",
|
|
owner=self.user,
|
|
),
|
|
}
|
|
|
|
@pacman_packages
|
|
def pacman_packages(self) -> set[str]:
|
|
return {
|
|
"7zip",
|
|
"atuin",
|
|
"base-devel",
|
|
"base",
|
|
"bat",
|
|
"btop",
|
|
"curl",
|
|
"direnv",
|
|
"duf",
|
|
"dust",
|
|
"eza",
|
|
"fastfetch",
|
|
"fd",
|
|
"git-delta",
|
|
"git",
|
|
"jq",
|
|
"micro",
|
|
"ouch",
|
|
"procs",
|
|
"ripgrep",
|
|
"sd",
|
|
"starship",
|
|
"sudo",
|
|
"tealdeer",
|
|
"trash-cli",
|
|
"vim",
|
|
"wget",
|
|
"xh",
|
|
"yazi",
|
|
"yq",
|
|
"zoxide",
|
|
}
|
|
|
|
@aur_packages
|
|
def aur_packages(self) -> set[str]:
|
|
return {
|
|
"decman",
|
|
}
|