feat: NixOS 声明式配置(从 Arch + decman 迁移)

- flake.nix: NixOS + home-manager + nixos-wsl 三输入
- hosts/wsl + hosts/bare: WSL 与裸机共享模块,分主机配置
- modules/: base(CLI 工具) + dev(工具链+LSP) + docker + locale + shell
- home/: zsh(oh-my-zsh+插件+别名) + git(delta) + starship + 工具集成
- scripts/install.sh: 一键安装脚本(WSL/裸机通用)
- 原 bun/go 全局包 hack 改为 nixpkgs 声明式管理
This commit is contained in:
2026-04-03 19:05:06 +08:00
parent 5c851ea250
commit d58c650d59
33 changed files with 574 additions and 1058 deletions
+2 -216
View File
@@ -1,216 +1,2 @@
# Byte-compiled / optimized / DLL files result
__pycache__/ .direnv
*.py[codz]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py.cover
.hypothesis/
.pytest_cache/
cover/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
.pybuilder/
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
# Pipfile.lock
# UV
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# uv.lock
# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
# poetry.lock
# poetry.toml
# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
# pdm.lock
# pdm.toml
.pdm-python
.pdm-build/
# pixi
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
# pixi.lock
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
# in the .venv directory. It is recommended not to include this directory in version control.
.pixi
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# Redis
*.rdb
*.aof
*.pid
# RabbitMQ
mnesia/
rabbitmq/
rabbitmq-data/
# ActiveMQ
activemq-data/
# SageMath parsed files
*.sage.py
# Environments
.env
.envrc
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# pytype static type analyzer
.pytype/
# Cython debug symbols
cython_debug/
# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
# .idea/
# Abstra
# Abstra is an AI-powered process automation framework.
# Ignore directories containing user credentials, local state, and settings.
# Learn more at https://abstra.io/docs
.abstra/
# Visual Studio Code
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
# and can be added to the global gitignore or merged into this file. However, if you prefer,
# you could uncomment the following to ignore the entire vscode folder
# .vscode/
# Ruff stuff:
.ruff_cache/
# PyPI configuration file
.pypirc
# Marimo
marimo/_static/
marimo/_lsp/
__marimo__/
# Streamlit
.streamlit/secrets.toml
-155
View File
@@ -1,155 +0,0 @@
# AGENTS.md — Arch Linux 声明式配置仓库
## 概要
使用 [decman](https://github.com/kiviktnm/decman) 声明式管理 Arch Linux 系统配置。Python 源文件声明包、系统文件、dotfiles 和 systemd 服务。
- **运行环境**Arch Linux(主要面向 WSL,兼容裸机)
- **语言**Python(配置)、Bash(引导脚本)
- **包管理器**:uv(开发依赖)、pacman(系统包)、decman AUR 插件(AUR 包)
## 仓库结构
```
.
├── source.py # decman 主配置入口
├── modules/
│ ├── base.py # 基础模块(系统包 + 现代 CLI 工具 + 配置文件)
│ ├── dev.py # 开发模块(语言运行时 + 编辑器 + 工具链)
│ ├── docker.py # Docker 模块(packages + systemd units
│ ├── locale.py # locale 模块(files + on_change hook
│ └── zsh.py # Zsh 模块(shell + oh-my-zsh + 插件)
├── system/etc/ # 系统配置文件源 → 部署到 /etc/
├── home/ # 用户配置文件源 → 部署到 ~/
├── scripts/
│ ├── install.sh # 引导脚本(git → decman → 首次 sync
│ └── wsl-init.sh # WSL 首次初始化(创建用户)
└── pyproject.toml # 开发依赖(decman + 插件,仅用于类型检查)
```
## 命令
```bash
# 应用配置(安装/更新包、同步文件、启用服务)
sudo decman
# 首次运行(需指定 source 路径)
sudo decman --source ~/.config/archlinux-config/source.py
# 跳过特定插件
sudo decman --skip aur
sudo decman --skip systemd
# 仅同步文件
sudo decman --no-hooks --only files
# 调试模式
sudo decman --debug
```
### 验证
```bash
# Python 语法检查(所有模块)
python -c "import py_compile; py_compile.compile('source.py', doraise=True)"
for f in modules/*.py; do python -c "import py_compile; py_compile.compile('$f', doraise=True)"; done
# Shell 语法检查
bash -n scripts/install.sh
bash -n scripts/wsl-init.sh
# 同步开发依赖
uv sync
```
## decman 执行顺序
声明顺序必须匹配执行顺序,从上到下阅读即从上到下执行:
```
files → pacman → aur → systemd
```
`source.py` 中的声明分区按此排列:系统文件 → 用户配置 → modules → pacman 包 → AUR 包。
## 代码风格
### Pythonsource.py 及模块)
**source.py 结构**
- 纯模块注册,不直接声明文件或包
- 校验 `SUDO_USER` 和必要插件存在性
- 通过 `decman.modules += [...]` 注册所有模块
**模块模式**(适用于需要 hook 或跨步骤声明的场景):
```python
from decman import Module
from decman.plugins.pacman import packages as pacman_packages
from decman.plugins.systemd import units
class DockerModule(Module):
def __init__(self, user: str):
super().__init__("docker")
self.user = user
@pacman_packages
def pacman_packages(self) -> set[str]:
return {"docker", "docker-compose"}
@units
def units(self) -> set[str]:
return {"docker.socket"}
```
**何时用模块 vs 直接声明**
- 需要 `on_change` hook(如 `locale-gen`)→ Module
- 需要绑定 packages + systemd units → Module`@packages` + `@units` 装饰器)
- 纯静态文件、无副作用 → 直接在 `source.py``File()`
### Shell 脚本
- Shebang`#!/bin/bash`
- 安全选项:`set -euo pipefail`
- 变量引用:始终加双引号 `"$VAR"`
- 条件测试:优先 `[[ ]]`
- 命令检测:`if command -v cmd &> /dev/null; then`
- 用户消息:中文,用语义 emoji 前缀标记步骤(`🔄` 更新、`📦` 安装、`🔑` 验证、`📥` 克隆、`⚙️` 配置、`👤` 用户、`🔐` 安全),`🎉` 表示完成,`⏩` 表示跳过
- 错误消息:`echo "❌ 描述"` + `exit 1`
### Git
- 提交消息:中文,conventional commits 格式
- 格式:`<type>(<scope>): <中文描述>`
- 类型:`feat` / `fix` / `docs` / `refactor` / `chore`
- 示例:`feat(docker): 添加 Docker 支持并重排声明顺序`
- 分支:直接在 `main` 上工作
## Agent 须知
1. **decman 是唯一真相**:不要手动装包,加到 `source.py` 或模块里,跑 `sudo decman`
2. **Pacman vs AUR**:用 `pacman -Ss` 确认包在官方仓库还是 AUR,分别加到 `decman.pacman.packages``decman.aur.packages`
3. **系统文件**:源文件放 `system/`,目录结构对应目标路径(`system/etc/foo.conf``/etc/foo.conf`)。decman 复制(非 symlink)到目标位置。
4. **用户配置**:源文件放 `home/`,必须指定 `owner=USERNAME`
5. **Runs as root**`sudo decman` 以 root 执行 `source.py``SUDO_USER` 是调用 sudo 的原始用户名,不要 fallback。
6. **开发环境**`pyproject.toml` + `uv sync` 管理开发依赖(decman、decman-pacman、decman-systemd),仅用于 IDE 类型检查,不影响运行时。
7. **幂等性**:所有脚本和配置必须可安全重复执行。
8. **语言**:用户消息、文档、提交消息使用中文。
## 常见任务
**添加包**:确认 pacman/AUR → 加到 `source.py` 对应集合 → `sudo decman`
**添加系统文件**:放 `system/` → 在 `source.py``File(source_file=...)``sudo decman`
**添加 dotfile**:放 `home/` → 在 `source.py``File(source_file=..., owner=USERNAME)``sudo decman`
**添加需要 systemd 服务的软件**:创建 Module 文件,用 `@packages` + `@units` 装饰器 → 在 `source.py` 注册 → `sudo decman`
**添加开发依赖(decman 插件)**:加到 `pyproject.toml``[dependency-groups] dev``[tool.uv.sources]``uv sync`
-1
View File
@@ -1 +0,0 @@
AGENTS.md
+99 -21
View File
@@ -1,37 +1,115 @@
# Arch Linux 配置仓库 # NixOS 声明式系统配置
使用 [decman](https://github.com/kiviktnm/decman) 声明式管理 Arch Linux 系统配置。 使用 [NixOS](https://nixos.org/) + [Home Manager](https://github.com/nix-community/home-manager) + [Flakes](https://nix.dev/concepts/flakes) 声明式管理系统配置。
默认面向 WSL 环境;裸机使用请按需修改 `source.py`
## 使用 支持 **WSL** 和**裸机**两种部署方式,共享同一套模块。
### WSL 首次启动(默认 root 登录) ## 快速开始
1. 初始化普通用户: ### WSL
```bash 1. 安装 [NixOS-WSL](https://github.com/nix-community/NixOS-WSL/releases)
curl -fsSL https://git.furtherverse.com/imbytecat/archlinux-config/raw/branch/main/scripts/wsl-init.sh | bash -s -- <用户名>
```
2. 在 PowerShell 中设置默认用户并重启:
```powershell ```powershell
wsl --manage archlinux --set-default-user <用户名> wsl --import NixOS C:\wsl\nixos nixos-wsl.tar.gz
wsl --terminate archlinux wsl -d NixOS
``` ```
3. 重新进入 WSL,以普通用户执行 2. 运行安装脚本
```bash ```bash
curl -fsSL https://git.furtherverse.com/imbytecat/archlinux-config/raw/branch/main/scripts/install.sh | bash bash <(curl -fsSL https://git.furtherverse.com/imbytecat/archlinux-config/raw/branch/nixos/scripts/install.sh)
``` ```
### 非 WSL 环境 3. 重新登录,配置 Git 身份:
直接执行第 3 步。
## 更新配置
```bash ```bash
cd ~/.config/archlinux-config && git pull && sudo decman git config --global user.name "你的名字"
git config --global user.email "你的邮箱"
``` ```
### 裸机
1. 安装 NixOS 基础系统
2. 运行安装脚本(传入 `bare` 参数):
```bash
bash <(curl -fsSL https://git.furtherverse.com/imbytecat/archlinux-config/raw/branch/nixos/scripts/install.sh) bare
```
3. 生成硬件配置并重新应用:
```bash
cd ~/.config/nixos-config
sudo nixos-generate-config --show-hardware-config > hosts/bare/hardware-configuration.nix
# 取消 hosts/bare/default.nix 中 imports 的注释
sudo nixos-rebuild switch --flake .#bare
```
## 仓库结构
```
├── flake.nix # 入口:输入源 + 输出配置
├── hosts/
│ ├── wsl/default.nix # WSL:用户、WSL 设置
│ └── bare/default.nix # 裸机:引导、网络、硬件
├── modules/
│ ├── base.nix # 基础包(现代 CLI 工具)
│ ├── dev.nix # 开发工具链 + LSP
│ ├── docker.nix # Docker
│ ├── locale.nix # 区域 / 语言
│ └── shell.nix # Zsh 系统级启用
├── home/
│ ├── default.nix # Home Manager 入口
│ ├── shell.nix # Zsh + 终端增强工具
│ └── git.nix # Git + Delta
└── scripts/
└── install.sh # 一键安装脚本
```
**配置层级**`hosts/*`(主机特定) → `modules/*`(共享系统) → `home/*`(用户级)
## 日常使用
```bash
cd ~/.config/nixos-config
# 更新配置
git pull && sudo nixos-rebuild switch --flake .#wsl
# 更新所有包版本
nix flake update && sudo nixos-rebuild switch --flake .#wsl
# 回滚到上一版本
sudo nixos-rebuild switch --rollback
# 清理旧 generation(释放磁盘)
sudo nix-collect-garbage -d
```
## 自定义
### 修改用户名
编辑 `hosts/wsl/default.nix`(或 `hosts/bare/default.nix`)顶部:
```nix
let
username = "";
```
### 添加包
编辑 `modules/base.nix``modules/dev.nix`,在 `environment.systemPackages` 中添加:
```nix
environment.systemPackages = with pkgs; [
your-package # ← 添加
];
```
> 查包名:`nix search nixpkgs <关键词>`
### 添加 Shell 别名
编辑 `home/shell.nix` 中的 `shellAliases`
+59
View File
@@ -0,0 +1,59 @@
{
description = "NixOS ";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixos-wsl = {
url = "github:nix-community/NixOS-WSL";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{
self,
nixpkgs,
nixos-wsl,
home-manager,
...
}:
let
system = "x86_64-linux";
# 所有主机共享的模块
commonModules = [
./modules/base.nix
./modules/dev.nix
./modules/docker.nix
./modules/locale.nix
./modules/shell.nix
home-manager.nixosModules.home-manager
];
in
{
nixosConfigurations = {
# WSL 配置
wsl = nixpkgs.lib.nixosSystem {
inherit system;
modules = commonModules ++ [
nixos-wsl.nixosModules.default
./hosts/wsl/default.nix
];
};
# 裸机配置
bare = nixpkgs.lib.nixosSystem {
inherit system;
modules = commonModules ++ [
./hosts/bare/default.nix
];
};
};
};
}
-22
View File
@@ -1,22 +0,0 @@
[http "https://202.127.0.42:32443"]
sslVerify = false
[core]
pager = delta
[interactive]
diffFilter = delta --color-only
[delta]
navigate = true
side-by-side = true
line-numbers = true
[credential]
helper = store
[merge]
conflictstyle = zdiff3
[pull]
rebase = true
[push]
autoSetupRemote = true
[init]
defaultBranch = main
[rerere]
enabled = true
-2
View File
@@ -1,2 +0,0 @@
[settings]
trusted_config_paths = ["/"]
-41
View File
@@ -1,41 +0,0 @@
format = """
$username\
$hostname\
$directory\
$git_branch\
$git_status\
$nodejs\
$python\
$go\
$rust\
$cmd_duration\
$line_break\
$character"""
[character]
success_symbol = "[](bold green)"
error_symbol = "[](bold red)"
[directory]
truncation_length = 3
truncation_symbol = "…/"
[git_branch]
symbol = " "
[git_status]
format = '([\[$all_status$ahead_behind\]]($style) )'
[cmd_duration]
min_time = 2000
format = "[$duration]($style) "
[nodejs]
format = "[$symbol($version)]($style) "
detect_extensions = []
[python]
format = "[$symbol($version)]($style) "
[go]
format = "[$symbol($version)]($style) "
-63
View File
@@ -1,63 +0,0 @@
# ── PATH ──
export PATH="$HOME/go/bin:$HOME/.bun/bin:$PATH"
# ── Shell 选项 ──
setopt AUTO_CD # 输目录名直接 cd
setopt INTERACTIVE_COMMENTS # 允许交互式 # 注释
setopt NO_BEEP # 关蜂鸣
# ── Oh My Zsh ──
ZSH=/usr/share/oh-my-zsh/
ZSH_THEME="" # Starship 接管提示符
plugins=(
git # git 别名(gst, gco, gp...
sudo # 双击 ESC 自动加 sudo
extract # x file.tar.gz 一键解压任何格式
direnv # direnv hook
)
ZSH_CACHE_DIR=$HOME/.cache/oh-my-zsh
[[ ! -d $ZSH_CACHE_DIR ]] && mkdir -p $ZSH_CACHE_DIR
source $ZSH/oh-my-zsh.sh
# ── 外部插件 ──
source /usr/share/zsh/plugins/fzf-tab-git/fzf-tab.plugin.zsh
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh # 必须最后
# ── 工具初始化(顺序重要)──
eval "$(starship init zsh)"
eval "$(zoxide init zsh)"
eval "$(mise activate zsh)"
eval "$(fzf --zsh)" # Ctrl+T 搜文件, Alt+C 搜目录
eval "$(atuin init zsh)" # 必须在 fzf 之后,接管 Ctrl+R
# ── 别名 ──
# 导航
alias cd="z"
alias cdi="zi"
alias ..="cd .."
alias ...="cd ../.."
# 文件列表
alias ls="eza --icons --group-directories-first"
alias ll="eza -la --icons --git --group-directories-first"
alias la="eza -a --icons --group-directories-first"
alias lt="eza --tree --level=2 --icons"
# 工具
alias cat="bat --paging=never"
alias rm="trash-put"
alias lg="lazygit"
alias vi="nvim"
# 网络
alias http="xh"
# ── WSL 剪贴板 ──
if [[ -n "$WSL_DISTRO_NAME" ]]; then
alias pbcopy="clip.exe"
alias pbpaste="powershell.exe -noprofile -c Get-Clipboard"
fi
# ── Local ──
[[ -f ~/.zshrc.local ]] && source ~/.zshrc.local
+16
View File
@@ -0,0 +1,16 @@
{ config, pkgs, ... }:
{
imports = [
./shell.nix
./git.nix
];
home.stateVersion = "24.11";
# ── mise 配置 ──
xdg.configFile."mise/config.toml".text = ''
[settings]
trusted_config_paths = ["/"]
'';
}
+36
View File
@@ -0,0 +1,36 @@
{ config, ... }:
{
programs.git = {
enable = true;
# user.name 和 user.email 需要每人自行设置:
# git config --global user.name "你的名字"
# git config --global user.email "你的邮箱"
delta = {
enable = true;
options = {
navigate = true;
side-by-side = true;
line-numbers = true;
};
};
extraConfig = {
# 内部 Git 服务器(跳过 SSL 验证)
http = {
"https://202.127.0.42:32443" = {
sslVerify = false;
};
};
credential.helper = "store";
merge.conflictstyle = "zdiff3";
pull.rebase = true;
push.autoSetupRemote = true;
init.defaultBranch = "main";
rerere.enabled = true;
};
};
}
+137
View File
@@ -0,0 +1,137 @@
{ config, pkgs, ... }:
{
# ── Zsh ──────────────────────────────────────────────
programs.zsh = {
enable = true;
autocd = true; # setopt AUTO_CD
oh-my-zsh = {
enable = true;
plugins = [
"git" # git 别名 (gst, gco, gp...)
"sudo" # 双击 ESC 自动加 sudo
"extract" # x file.tar.gz 一键解压
"direnv" # direnv hook
];
};
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
shellAliases = {
# 导航
cd = "z";
cdi = "zi";
".." = "cd ..";
"..." = "cd ../..";
# 文件列表
ls = "eza --icons --group-directories-first";
ll = "eza -la --icons --git --group-directories-first";
la = "eza -a --icons --group-directories-first";
lt = "eza --tree --level=2 --icons";
# 工具
cat = "bat --paging=never";
rm = "trash-put";
lg = "lazygit";
vi = "nvim";
# 网络
http = "xh";
};
initExtra = ''
# Shell
setopt INTERACTIVE_COMMENTS
setopt NO_BEEP
# PATH go/bun
export PATH="$HOME/go/bin:$HOME/.bun/bin:$PATH"
# fzf-tab
# : ls $(nix eval --raw nixpkgs#zsh-fzf-tab)/share/
source ${pkgs.zsh-fzf-tab}/share/fzf-tab/fzf-tab.plugin.zsh
# mise
eval "$(mise activate zsh)"
# WSL
if [[ -n "$WSL_DISTRO_NAME" ]]; then
alias pbcopy="clip.exe"
alias pbpaste="powershell.exe -noprofile -c Get-Clipboard"
fi
#
[[ -f ~/.zshrc.local ]] && source ~/.zshrc.local
'';
};
# ── Starship 提示符 ──────────────────────────────────
programs.starship = {
enable = true;
enableZshIntegration = true;
settings = {
format = "$username$hostname$directory$git_branch$git_status$nodejs$python$go$rust$cmd_duration$line_break$character";
character = {
success_symbol = "[](bold green)";
error_symbol = "[](bold red)";
};
directory = {
truncation_length = 3;
truncation_symbol = "/";
};
git_branch.symbol = " ";
git_status.format = "([\\[$all_status$ahead_behind\\]]($style) )";
cmd_duration = {
min_time = 2000;
format = "[$duration]($style) ";
};
nodejs = {
format = "[$symbol($version)]($style) ";
detect_extensions = [ ];
};
python.format = "[$symbol($version)]($style) ";
go.format = "[$symbol($version)]($style) ";
};
};
# ── FZF ──────────────────────────────────────────────
programs.fzf = {
enable = true;
enableZshIntegration = true;
};
# ── Atuin(历史搜索,接管 Ctrl+R)──────────────────
programs.atuin = {
enable = true;
enableZshIntegration = true;
};
# ── Zoxide(智能 cd)─────────────────────────────────
programs.zoxide = {
enable = true;
enableZshIntegration = true;
};
# ── Direnv ───────────────────────────────────────────
programs.direnv = {
enable = true;
enableZshIntegration = true;
nix-direnv.enable = true; # 更好的 Nix devShell 集成
};
# ── Bat ──────────────────────────────────────────────
programs.bat.enable = true;
# ── Yazi ─────────────────────────────────────────────
programs.yazi.enable = true;
}
+42
View File
@@ -0,0 +1,42 @@
{ config, pkgs, ... }:
let
username = "dev"; # ← 修改此处设置用户名
in
{
# ── 引导 ─────────────────────────────────────────────
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# ── 网络 ─────────────────────────────────────────────
networking.hostName = "nixos";
networking.networkmanager.enable = true;
# ── 用户 ─────────────────────────────────────────────
users.users.${username} = {
isNormalUser = true;
extraGroups = [
"wheel"
"docker"
"networkmanager"
];
shell = pkgs.zsh;
};
# ── Home Manager ─────────────────────────────────────
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.${username} = import ../../home;
};
# ── sudo ─────────────────────────────────────────────
security.sudo.wheelNeedsPassword = false;
# ── 硬件 ─────────────────────────────────────────────
# 首次安装后生成硬件配置并取消注释:
# sudo nixos-generate-config --show-hardware-config > hosts/bare/hardware-configuration.nix
# imports = [ ./hardware-configuration.nix ];
system.stateVersion = "24.11";
}
+36
View File
@@ -0,0 +1,36 @@
{ config, pkgs, ... }:
let
username = "dev"; # ← 修改此处设置用户名
in
{
# ── WSL ──────────────────────────────────────────────
wsl = {
enable = true;
defaultUser = username;
};
networking.hostName = "nixos-wsl";
# ── 用户 ─────────────────────────────────────────────
users.users.${username} = {
isNormalUser = true;
extraGroups = [
"wheel"
"docker"
];
shell = pkgs.zsh;
};
# ── Home Manager ─────────────────────────────────────
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.${username} = import ../../home;
};
# ── sudo ─────────────────────────────────────────────
security.sudo.wheelNeedsPassword = false;
system.stateVersion = "24.11";
}
View File
+49
View File
@@ -0,0 +1,49 @@
{ config, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
# ── 核心工具 ──
curl
git
micro
vim
wget
# ── 现代 CLI 替代 ──
bat # cat
btop # top
duf # df
dust # du
eza # ls
fd # find
jq # JSON
procs # ps
ripgrep # grep
sd # sed
xh # curl/httpie
yq # YAML
# ── 文件管理 ──
trash-cli
yazi
# ── 系统信息 ──
fastfetch
tealdeer # tldr
];
# ── Nix 设置 ──
nix.settings = {
experimental-features = [
"nix-command"
"flakes"
];
# 国内镜像(按需取消注释)
# substituters = [
# "https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store"
# "https://cache.nixos.org"
# ];
};
nixpkgs.config.allowUnfree = true;
}
-71
View File
@@ -1,71 +0,0 @@
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 {
"atuin",
"base-devel",
"base",
"bat",
"btop",
"curl",
"direnv",
"duf",
"dust",
"eza",
"fastfetch",
"fd",
"git-delta",
"git",
"jq",
"micro",
"procs",
"ripgrep",
"sd",
"starship",
"sudo",
"tealdeer",
"trash-cli",
"vim",
"wget",
"xh",
"yazi",
"yq",
"zoxide",
}
@aur_packages
def aur_packages(self) -> set[str]:
return {
"decman",
}
+54
View File
@@ -0,0 +1,54 @@
{ config, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
# ── 语言运行时 ──
bun
go
nodejs
# ── 包管理 / 版本管理 ──
mise
uv
# ── 编辑器 ──
neovim
# ── 终端复用 ──
tmux
zellij
# ── Git 增强 ──
delta # Arch 包名: git-delta
gh # Arch 包名: github-cli
lazygit
# ── Linter / Formatter ──
biome
ruff
shellcheck
shfmt
# ── LSP 服务器 ──
ast-grep
bash-language-server
gopls
typescript-language-server # 若报错尝试 nodePackages.typescript-language-server
yaml-language-server # 若报错尝试 nodePackages.yaml-language-server
vue-language-server # 替代原 bun -g @vue/language-server
dockerfile-language-server-nodejs # 替代原 bun -g dockerfile-language-server
# ── 原 bun/go 全局安装的工具 ──
# 以下工具如果在 nixpkgs 中不存在,需要自定义打包:
#
# opencode-ai:
# buildNpmPackage { pname = "opencode-ai"; ... }
#
# go-claude-code-comment-checker:
# buildGoModule {
# pname = "comment-checker";
# src = fetchFromGitHub { owner = "code-yeongyu"; repo = "..."; ... };
# vendorHash = "sha256-...";
# }
];
}
-69
View File
@@ -1,69 +0,0 @@
import decman
from decman import File, Module
from decman.plugins.pacman import packages as pacman_packages
BUN_GLOBAL_PACKAGES = [
"@vue/language-server",
"dockerfile-language-server", # TODO: 等 extra-testing -> extra 后改用 pacman
"opencode-ai",
]
GO_INSTALL_PACKAGES = [
"github.com/code-yeongyu/go-claude-code-comment-checker/cmd/comment-checker@latest",
]
class DevModule(Module):
def __init__(self, user: str):
super().__init__("dev")
self.user = user
def files(self):
return {
f"/home/{self.user}/.config/mise/config.toml": File(
source_file="./home/.config/mise/config.toml",
owner=self.user,
),
}
@pacman_packages
def pacman_packages(self) -> set[str]:
return {
"ast-grep",
"bash-language-server",
"biome",
"bun",
"github-cli",
"go",
"gopls",
"lazygit",
"mise",
"neovim",
"nodejs",
"ruff",
"shellcheck",
"shfmt",
"tmux",
"typescript-language-server",
"uv",
"yaml-language-server",
"zellij",
}
def after_update(self, store):
failures: list[str] = []
for pkg in BUN_GLOBAL_PACKAGES:
try:
decman.prg(["bun", "add", "-g", pkg], user=self.user, mimic_login=True)
except Exception as e:
failures.append(f"bun: {pkg} ({e})")
for pkg in GO_INSTALL_PACKAGES:
try:
decman.prg(["go", "install", pkg], user=self.user, mimic_login=True)
except Exception as e:
failures.append(f"go: {pkg} ({e})")
if failures:
print(f"\n{len(failures)} 个全局包安装失败:")
for f in failures:
print(f" - {f}")
print()
+17
View File
@@ -0,0 +1,17 @@
{ config, pkgs, ... }:
{
virtualisation.docker = {
enable = true;
};
environment.systemPackages = with pkgs; [
docker-compose
];
# 注:用户 docker 组权限在 hosts/*/default.nix 中配置
#
# WSL 环境下如使用 Docker Desktop,可改为:
# wsl.docker-desktop.enable = true;
# 并将上面的 virtualisation.docker.enable 设为 false
}
-29
View File
@@ -1,29 +0,0 @@
import subprocess
import decman
from decman import Module
from decman.plugins.pacman import packages as pacman_packages
from decman.plugins.systemd import units
class DockerModule(Module):
def __init__(self, user: str):
super().__init__("docker")
self.user = user
@pacman_packages
def pacman_packages(self) -> set[str]:
return {"docker", "docker-compose"}
@units
def units(self) -> set[str]:
return {"docker.socket"}
def after_update(self, store):
result = subprocess.run(
["id", "-nG", self.user], capture_output=True, text=True
)
if result.returncode != 0:
return
if "docker" not in result.stdout.split():
decman.prg(["gpasswd", "-a", self.user, "docker"])
+8
View File
@@ -0,0 +1,8 @@
{ config, ... }:
{
i18n = {
defaultLocale = "en_US.UTF-8";
supportedLocales = [ "en_US.UTF-8/UTF-8" ];
};
}
-16
View File
@@ -1,16 +0,0 @@
import decman
from decman import File, Module
class LocaleModule(Module):
def __init__(self):
super().__init__("locale")
def files(self):
return {
"/etc/locale.conf": File(content="LANG=en_US.UTF-8\n"),
"/etc/locale.gen": File(content="en_US.UTF-8 UTF-8\n"),
}
def on_change(self, store):
decman.prg(["locale-gen"])
+6
View File
@@ -0,0 +1,6 @@
{ config, pkgs, ... }:
{
# 系统级启用 Zsh(用户级配置在 home/shell.nix
programs.zsh.enable = true;
}
-48
View File
@@ -1,48 +0,0 @@
import subprocess
import decman
from decman import File, Module
from decman.plugins.aur import packages as aur_packages
from decman.plugins.pacman import packages as pacman_packages
class ZshModule(Module):
def __init__(self, user: str):
super().__init__("zsh")
self.user = user
def files(self):
return {
f"/home/{self.user}/.zshrc": File(
source_file="./home/.zshrc",
owner=self.user,
),
}
@pacman_packages
def pacman_packages(self) -> set[str]:
return {
"fzf",
"zsh",
"zsh-autosuggestions",
"zsh-completions",
"zsh-syntax-highlighting",
}
@aur_packages
def aur_packages(self) -> set[str]:
return {
"fzf-tab-git",
"oh-my-zsh-git",
}
def after_update(self, store):
result = subprocess.run(
["getent", "passwd", self.user], capture_output=True, text=True
)
if result.returncode != 0:
return
# passwd 格式: name:x:uid:gid:gecos:home:shell
shell = result.stdout.strip().split(":")[-1]
if shell != "/usr/bin/zsh":
decman.prg(["chsh", "-s", "/usr/bin/zsh", self.user])
-15
View File
@@ -1,15 +0,0 @@
[project]
name = "archlinux-config"
version = "0.0.0"
requires-python = ">=3.13"
[dependency-groups]
dev = ["decman", "decman-pacman", "decman-systemd"]
[tool.uv.sources]
decman = { git = "https://github.com/kiviktnm/decman.git" }
decman-pacman = { git = "https://github.com/kiviktnm/decman.git", subdirectory = "plugins/decman-pacman" }
decman-systemd = { git = "https://github.com/kiviktnm/decman.git", subdirectory = "plugins/decman-systemd" }
[tool.ty.environment]
python = ".venv"
+13 -30
View File
@@ -1,42 +1,25 @@
#!/bin/bash #!/bin/bash
# NixOS 配置安装脚本
# 在 NixOS-WSL 或裸机 NixOS 中运行
set -euo pipefail set -euo pipefail
REPO_URL="https://git.furtherverse.com/imbytecat/archlinux-config.git" REPO_URL="https://git.furtherverse.com/imbytecat/archlinux-config.git"
CONFIG_DIR="$HOME/.config/archlinux-config" CONFIG_DIR="$HOME/.config/nixos-config"
FLAKE_TARGET="${1:-wsl}" # 默认 wsl,裸机传入 bare
echo "🔑 验证 sudo 权限..." echo "📥 获取配置仓库..."
sudo -v < /dev/tty || { echo "❌ 需要 sudo 权限,请确认当前用户已配置 sudo"; exit 1; }
echo "🔄 更新系统..."
sudo pacman -Syu --noconfirm
echo "📦 安装基础依赖..."
sudo pacman -S --needed --noconfirm git base-devel
echo "📥 克隆配置仓库..."
mkdir -p "$(dirname "$CONFIG_DIR")"
if [[ -d "$CONFIG_DIR/.git" ]]; then if [[ -d "$CONFIG_DIR/.git" ]]; then
echo "⏩ 配置仓库已存在,跳过克隆" echo "⏩ 仓库已存在,拉取最新..."
elif [[ -e "$CONFIG_DIR" ]]; then git -C "$CONFIG_DIR" pull
echo "❌ 目标路径已存在且不是 git 仓库:$CONFIG_DIR"
exit 1
else else
git clone "$REPO_URL" "$CONFIG_DIR" git clone -b nixos "$REPO_URL" "$CONFIG_DIR"
fi fi
echo "📦 安装 decman..." echo "⚙️ 应用系统配置(目标: $FLAKE_TARGET..."
if ! command -v decman &> /dev/null; then sudo nixos-rebuild switch --flake "$CONFIG_DIR#$FLAKE_TARGET"
_tmpdir=$(mktemp -d)
trap 'rm -rf "$_tmpdir"' EXIT
git clone https://aur.archlinux.org/decman.git "$_tmpdir"
(cd "$_tmpdir" && makepkg -si --noconfirm)
fi
echo "⚙️ 应用系统配置..."
sudo decman --source "$CONFIG_DIR/source.py" < /dev/tty
echo "" echo ""
echo "🎉 安装完成!重新登录以使用 zsh。" echo "🎉 安装完成!重新登录以使用 zsh。"
echo "" echo ""
echo "后续更新配置" echo "后续更新:"
echo " cd $CONFIG_DIR && git pull && sudo decman" echo " cd $CONFIG_DIR && git pull && sudo nixos-rebuild switch --flake .#$FLAKE_TARGET"
-54
View File
@@ -1,54 +0,0 @@
#!/bin/bash
set -euo pipefail
if [ "$(id -u)" -ne 0 ]; then
echo "❌ 请以 root 身份运行此脚本"
exit 1
fi
if [[ ! -f /proc/sys/fs/binfmt_misc/WSLInterop ]]; then
echo "❌ 此脚本仅用于 Arch Linux on WSL 的首次初始化"
exit 1
fi
USERNAME="${1:-}"
if [ -z "$USERNAME" ]; then
echo "用法: wsl-init.sh <用户名>"
echo "示例: wsl-init.sh imbytecat"
exit 1
fi
echo "🔄 更新系统..."
pacman -Syu --noconfirm
if ! command -v sudo &> /dev/null; then
echo "📦 安装 sudo..."
pacman -S --needed --noconfirm sudo
fi
echo "🔐 配置 sudo 权限..."
cat > /etc/sudoers.d/10-wheel << 'EOF'
%wheel ALL=(ALL) NOPASSWD: ALL
EOF
chmod 440 /etc/sudoers.d/10-wheel
echo "👤 创建用户 $USERNAME..."
if id "$USERNAME" &> /dev/null; then
echo "⏩ 用户 $USERNAME 已存在,确保 wheel 组成员"
usermod -aG wheel "$USERNAME"
else
useradd -m -G wheel -s /bin/bash "$USERNAME"
echo "请设置 $USERNAME 的密码:"
passwd "$USERNAME" < /dev/tty
fi
echo ""
echo "🎉 WSL 初始化完成!"
echo ""
echo "下一步:"
echo " 1. 在 PowerShell 中设置默认用户:"
echo " wsl --manage archlinux --set-default-user $USERNAME"
echo " 2. 重启 WSL"
echo " wsl --terminate archlinux"
echo " 3. 重新打开 Arch WSL 后运行:"
echo " curl -fsSL https://git.furtherverse.com/imbytecat/archlinux-config/raw/branch/main/scripts/install.sh | bash"
-24
View File
@@ -1,24 +0,0 @@
import os
import decman
import modules.base
import modules.dev
import modules.docker
import modules.locale
import modules.zsh
if decman.pacman is None or decman.aur is None or decman.systemd is None:
raise decman.SourceError("缺少必要插件,请检查 decman 安装")
USERNAME = os.environ.get("SUDO_USER")
if not USERNAME:
raise decman.SourceError("请使用 sudo 运行")
decman.modules += [
modules.base.BaseModule(USERNAME),
modules.dev.DevModule(USERNAME),
modules.docker.DockerModule(USERNAME),
modules.locale.LocaleModule(),
modules.zsh.ZshModule(USERNAME),
]
-26
View File
@@ -1,26 +0,0 @@
#
# /etc/pacman.conf
#
[options]
HoldPkg = pacman glibc
Architecture = auto
Color
ILoveCandy
VerbosePkgLists
ParallelDownloads = 5
CheckSpace
SigLevel = Required DatabaseOptional
LocalFileSigLevel = Optional
[core]
Include = /etc/pacman.d/mirrorlist
[extra]
Include = /etc/pacman.d/mirrorlist
# [multilib]
# Include = /etc/pacman.d/mirrorlist
-2
View File
@@ -1,2 +0,0 @@
Server = https://mirrors.tuna.tsinghua.edu.cn/archlinux/$repo/os/$arch
Server = https://mirrors.ustc.edu.cn/archlinux/$repo/os/$arch
-1
View File
@@ -1 +0,0 @@
%wheel ALL=(ALL) NOPASSWD: ALL
Generated
-152
View File
@@ -1,152 +0,0 @@
version = 1
revision = 3
requires-python = ">=3.13"
[[package]]
name = "archlinux-config"
version = "0.0.0"
source = { virtual = "." }
[package.dev-dependencies]
dev = [
{ name = "decman" },
{ name = "decman-pacman" },
{ name = "decman-systemd" },
]
[package.metadata]
[package.metadata.requires-dev]
dev = [
{ name = "decman", git = "https://github.com/kiviktnm/decman.git" },
{ name = "decman-pacman", git = "https://github.com/kiviktnm/decman.git?subdirectory=plugins%2Fdecman-pacman" },
{ name = "decman-systemd", git = "https://github.com/kiviktnm/decman.git?subdirectory=plugins%2Fdecman-systemd" },
]
[[package]]
name = "certifi"
version = "2026.2.25"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/af/2d/7bf41579a8986e348fa033a31cdd0e4121114f6bce2457e8876010b092dd/certifi-2026.2.25.tar.gz", hash = "sha256:e887ab5cee78ea814d3472169153c2d12cd43b14bd03329a39a9c6e2e80bfba7", size = 155029, upload-time = "2026-02-25T02:54:17.342Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/9a/3c/c17fb3ca2d9c3acff52e30b309f538586f9f5b9c9cf454f3845fc9af4881/certifi-2026.2.25-py3-none-any.whl", hash = "sha256:027692e4402ad994f1c42e52a4997a9763c646b73e4096e4d5d6db8af1d6f0fa", size = 153684, upload-time = "2026-02-25T02:54:15.766Z" },
]
[[package]]
name = "charset-normalizer"
version = "3.4.6"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/7b/60/e3bec1881450851b087e301bedc3daa9377a4d45f1c26aa90b0b235e38aa/charset_normalizer-3.4.6.tar.gz", hash = "sha256:1ae6b62897110aa7c79ea2f5dd38d1abca6db663687c0b1ad9aed6f6bae3d9d6", size = 143363, upload-time = "2026-03-15T18:53:25.478Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/1e/1d/4fdabeef4e231153b6ed7567602f3b68265ec4e5b76d6024cf647d43d981/charset_normalizer-3.4.6-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:11afb56037cbc4b1555a34dd69151e8e069bee82e613a73bef6e714ce733585f", size = 294823, upload-time = "2026-03-15T18:51:15.755Z" },
{ url = "https://files.pythonhosted.org/packages/47/7b/20e809b89c69d37be748d98e84dce6820bf663cf19cf6b942c951a3e8f41/charset_normalizer-3.4.6-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:423fb7e748a08f854a08a222b983f4df1912b1daedce51a72bd24fe8f26a1843", size = 198527, upload-time = "2026-03-15T18:51:17.177Z" },
{ url = "https://files.pythonhosted.org/packages/37/a6/4f8d27527d59c039dce6f7622593cdcd3d70a8504d87d09eb11e9fdc6062/charset_normalizer-3.4.6-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:d73beaac5e90173ac3deb9928a74763a6d230f494e4bfb422c217a0ad8e629bf", size = 218388, upload-time = "2026-03-15T18:51:18.934Z" },
{ url = "https://files.pythonhosted.org/packages/f6/9b/4770ccb3e491a9bacf1c46cc8b812214fe367c86a96353ccc6daf87b01ec/charset_normalizer-3.4.6-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d60377dce4511655582e300dc1e5a5f24ba0cb229005a1d5c8d0cb72bb758ab8", size = 214563, upload-time = "2026-03-15T18:51:20.374Z" },
{ url = "https://files.pythonhosted.org/packages/2b/58/a199d245894b12db0b957d627516c78e055adc3a0d978bc7f65ddaf7c399/charset_normalizer-3.4.6-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:530e8cebeea0d76bdcf93357aa5e41336f48c3dc709ac52da2bb167c5b8271d9", size = 206587, upload-time = "2026-03-15T18:51:21.807Z" },
{ url = "https://files.pythonhosted.org/packages/7e/70/3def227f1ec56f5c69dfc8392b8bd63b11a18ca8178d9211d7cc5e5e4f27/charset_normalizer-3.4.6-cp313-cp313-manylinux_2_31_armv7l.whl", hash = "sha256:a26611d9987b230566f24a0a125f17fe0de6a6aff9f25c9f564aaa2721a5fb88", size = 194724, upload-time = "2026-03-15T18:51:23.508Z" },
{ url = "https://files.pythonhosted.org/packages/58/ab/9318352e220c05efd31c2779a23b50969dc94b985a2efa643ed9077bfca5/charset_normalizer-3.4.6-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:34315ff4fc374b285ad7f4a0bf7dcbfe769e1b104230d40f49f700d4ab6bbd84", size = 202956, upload-time = "2026-03-15T18:51:25.239Z" },
{ url = "https://files.pythonhosted.org/packages/75/13/f3550a3ac25b70f87ac98c40d3199a8503676c2f1620efbf8d42095cfc40/charset_normalizer-3.4.6-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:5f8ddd609f9e1af8c7bd6e2aca279c931aefecd148a14402d4e368f3171769fd", size = 201923, upload-time = "2026-03-15T18:51:26.682Z" },
{ url = "https://files.pythonhosted.org/packages/1b/db/c5c643b912740b45e8eec21de1bbab8e7fc085944d37e1e709d3dcd9d72f/charset_normalizer-3.4.6-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:80d0a5615143c0b3225e5e3ef22c8d5d51f3f72ce0ea6fb84c943546c7b25b6c", size = 195366, upload-time = "2026-03-15T18:51:28.129Z" },
{ url = "https://files.pythonhosted.org/packages/5a/67/3b1c62744f9b2448443e0eb160d8b001c849ec3fef591e012eda6484787c/charset_normalizer-3.4.6-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:92734d4d8d187a354a556626c221cd1a892a4e0802ccb2af432a1d85ec012194", size = 219752, upload-time = "2026-03-15T18:51:29.556Z" },
{ url = "https://files.pythonhosted.org/packages/f6/98/32ffbaf7f0366ffb0445930b87d103f6b406bc2c271563644bde8a2b1093/charset_normalizer-3.4.6-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:613f19aa6e082cf96e17e3ffd89383343d0d589abda756b7764cf78361fd41dc", size = 203296, upload-time = "2026-03-15T18:51:30.921Z" },
{ url = "https://files.pythonhosted.org/packages/41/12/5d308c1bbe60cabb0c5ef511574a647067e2a1f631bc8634fcafaccd8293/charset_normalizer-3.4.6-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:2b1a63e8224e401cafe7739f77efd3f9e7f5f2026bda4aead8e59afab537784f", size = 215956, upload-time = "2026-03-15T18:51:32.399Z" },
{ url = "https://files.pythonhosted.org/packages/53/e9/5f85f6c5e20669dbe56b165c67b0260547dea97dba7e187938833d791687/charset_normalizer-3.4.6-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:6cceb5473417d28edd20c6c984ab6fee6c6267d38d906823ebfe20b03d607dc2", size = 208652, upload-time = "2026-03-15T18:51:34.214Z" },
{ url = "https://files.pythonhosted.org/packages/f1/11/897052ea6af56df3eef3ca94edafee410ca699ca0c7b87960ad19932c55e/charset_normalizer-3.4.6-cp313-cp313-win32.whl", hash = "sha256:d7de2637729c67d67cf87614b566626057e95c303bc0a55ffe391f5205e7003d", size = 143940, upload-time = "2026-03-15T18:51:36.15Z" },
{ url = "https://files.pythonhosted.org/packages/a1/5c/724b6b363603e419829f561c854b87ed7c7e31231a7908708ac086cdf3e2/charset_normalizer-3.4.6-cp313-cp313-win_amd64.whl", hash = "sha256:572d7c822caf521f0525ba1bce1a622a0b85cf47ffbdae6c9c19e3b5ac3c4389", size = 154101, upload-time = "2026-03-15T18:51:37.876Z" },
{ url = "https://files.pythonhosted.org/packages/01/a5/7abf15b4c0968e47020f9ca0935fb3274deb87cb288cd187cad92e8cdffd/charset_normalizer-3.4.6-cp313-cp313-win_arm64.whl", hash = "sha256:a4474d924a47185a06411e0064b803c68be044be2d60e50e8bddcc2649957c1f", size = 143109, upload-time = "2026-03-15T18:51:39.565Z" },
{ url = "https://files.pythonhosted.org/packages/25/6f/ffe1e1259f384594063ea1869bfb6be5cdb8bc81020fc36c3636bc8302a1/charset_normalizer-3.4.6-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:9cc6e6d9e571d2f863fa77700701dae73ed5f78881efc8b3f9a4398772ff53e8", size = 294458, upload-time = "2026-03-15T18:51:41.134Z" },
{ url = "https://files.pythonhosted.org/packages/56/60/09bb6c13a8c1016c2ed5c6a6488e4ffef506461aa5161662bd7636936fb1/charset_normalizer-3.4.6-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ef5960d965e67165d75b7c7ffc60a83ec5abfc5c11b764ec13ea54fbef8b4421", size = 199277, upload-time = "2026-03-15T18:51:42.953Z" },
{ url = "https://files.pythonhosted.org/packages/00/50/dcfbb72a5138bbefdc3332e8d81a23494bf67998b4b100703fd15fa52d81/charset_normalizer-3.4.6-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:b3694e3f87f8ac7ce279d4355645b3c878d24d1424581b46282f24b92f5a4ae2", size = 218758, upload-time = "2026-03-15T18:51:44.339Z" },
{ url = "https://files.pythonhosted.org/packages/03/b3/d79a9a191bb75f5aa81f3aaaa387ef29ce7cb7a9e5074ba8ea095cc073c2/charset_normalizer-3.4.6-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5d11595abf8dd942a77883a39d81433739b287b6aa71620f15164f8096221b30", size = 215299, upload-time = "2026-03-15T18:51:45.871Z" },
{ url = "https://files.pythonhosted.org/packages/76/7e/bc8911719f7084f72fd545f647601ea3532363927f807d296a8c88a62c0d/charset_normalizer-3.4.6-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7bda6eebafd42133efdca535b04ccb338ab29467b3f7bf79569883676fc628db", size = 206811, upload-time = "2026-03-15T18:51:47.308Z" },
{ url = "https://files.pythonhosted.org/packages/e2/40/c430b969d41dda0c465aa36cc7c2c068afb67177bef50905ac371b28ccc7/charset_normalizer-3.4.6-cp314-cp314-manylinux_2_31_armv7l.whl", hash = "sha256:bbc8c8650c6e51041ad1be191742b8b421d05bbd3410f43fa2a00c8db87678e8", size = 193706, upload-time = "2026-03-15T18:51:48.849Z" },
{ url = "https://files.pythonhosted.org/packages/48/15/e35e0590af254f7df984de1323640ef375df5761f615b6225ba8deb9799a/charset_normalizer-3.4.6-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:22c6f0c2fbc31e76c3b8a86fba1a56eda6166e238c29cdd3d14befdb4a4e4815", size = 202706, upload-time = "2026-03-15T18:51:50.257Z" },
{ url = "https://files.pythonhosted.org/packages/5e/bd/f736f7b9cc5e93a18b794a50346bb16fbfd6b37f99e8f306f7951d27c17c/charset_normalizer-3.4.6-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:7edbed096e4a4798710ed6bc75dcaa2a21b68b6c356553ac4823c3658d53743a", size = 202497, upload-time = "2026-03-15T18:51:52.012Z" },
{ url = "https://files.pythonhosted.org/packages/9d/ba/2cc9e3e7dfdf7760a6ed8da7446d22536f3d0ce114ac63dee2a5a3599e62/charset_normalizer-3.4.6-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:7f9019c9cb613f084481bd6a100b12e1547cf2efe362d873c2e31e4035a6fa43", size = 193511, upload-time = "2026-03-15T18:51:53.723Z" },
{ url = "https://files.pythonhosted.org/packages/9e/cb/5be49b5f776e5613be07298c80e1b02a2d900f7a7de807230595c85a8b2e/charset_normalizer-3.4.6-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:58c948d0d086229efc484fe2f30c2d382c86720f55cd9bc33591774348ad44e0", size = 220133, upload-time = "2026-03-15T18:51:55.333Z" },
{ url = "https://files.pythonhosted.org/packages/83/43/99f1b5dad345accb322c80c7821071554f791a95ee50c1c90041c157ae99/charset_normalizer-3.4.6-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:419a9d91bd238052642a51938af8ac05da5b3343becde08d5cdeab9046df9ee1", size = 203035, upload-time = "2026-03-15T18:51:56.736Z" },
{ url = "https://files.pythonhosted.org/packages/87/9a/62c2cb6a531483b55dddff1a68b3d891a8b498f3ca555fbcf2978e804d9d/charset_normalizer-3.4.6-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:5273b9f0b5835ff0350c0828faea623c68bfa65b792720c453e22b25cc72930f", size = 216321, upload-time = "2026-03-15T18:51:58.17Z" },
{ url = "https://files.pythonhosted.org/packages/6e/79/94a010ff81e3aec7c293eb82c28f930918e517bc144c9906a060844462eb/charset_normalizer-3.4.6-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:0e901eb1049fdb80f5bd11ed5ea1e498ec423102f7a9b9e4645d5b8204ff2815", size = 208973, upload-time = "2026-03-15T18:51:59.998Z" },
{ url = "https://files.pythonhosted.org/packages/2a/57/4ecff6d4ec8585342f0c71bc03efaa99cb7468f7c91a57b105bcd561cea8/charset_normalizer-3.4.6-cp314-cp314-win32.whl", hash = "sha256:b4ff1d35e8c5bd078be89349b6f3a845128e685e751b6ea1169cf2160b344c4d", size = 144610, upload-time = "2026-03-15T18:52:02.213Z" },
{ url = "https://files.pythonhosted.org/packages/80/94/8434a02d9d7f168c25767c64671fead8d599744a05d6a6c877144c754246/charset_normalizer-3.4.6-cp314-cp314-win_amd64.whl", hash = "sha256:74119174722c4349af9708993118581686f343adc1c8c9c007d59be90d077f3f", size = 154962, upload-time = "2026-03-15T18:52:03.658Z" },
{ url = "https://files.pythonhosted.org/packages/46/4c/48f2cdbfd923026503dfd67ccea45c94fd8fe988d9056b468579c66ed62b/charset_normalizer-3.4.6-cp314-cp314-win_arm64.whl", hash = "sha256:e5bcc1a1ae744e0bb59641171ae53743760130600da8db48cbb6e4918e186e4e", size = 143595, upload-time = "2026-03-15T18:52:05.123Z" },
{ url = "https://files.pythonhosted.org/packages/31/93/8878be7569f87b14f1d52032946131bcb6ebbd8af3e20446bc04053dc3f1/charset_normalizer-3.4.6-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:ad8faf8df23f0378c6d527d8b0b15ea4a2e23c89376877c598c4870d1b2c7866", size = 314828, upload-time = "2026-03-15T18:52:06.831Z" },
{ url = "https://files.pythonhosted.org/packages/06/b6/fae511ca98aac69ecc35cde828b0a3d146325dd03d99655ad38fc2cc3293/charset_normalizer-3.4.6-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f5ea69428fa1b49573eef0cc44a1d43bebd45ad0c611eb7d7eac760c7ae771bc", size = 208138, upload-time = "2026-03-15T18:52:08.239Z" },
{ url = "https://files.pythonhosted.org/packages/54/57/64caf6e1bf07274a1e0b7c160a55ee9e8c9ec32c46846ce59b9c333f7008/charset_normalizer-3.4.6-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:06a7e86163334edfc5d20fe104db92fcd666e5a5df0977cb5680a506fe26cc8e", size = 224679, upload-time = "2026-03-15T18:52:10.043Z" },
{ url = "https://files.pythonhosted.org/packages/aa/cb/9ff5a25b9273ef160861b41f6937f86fae18b0792fe0a8e75e06acb08f1d/charset_normalizer-3.4.6-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:e1f6e2f00a6b8edb562826e4632e26d063ac10307e80f7461f7de3ad8ef3f077", size = 223475, upload-time = "2026-03-15T18:52:11.854Z" },
{ url = "https://files.pythonhosted.org/packages/fc/97/440635fc093b8d7347502a377031f9605a1039c958f3cd18dcacffb37743/charset_normalizer-3.4.6-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:95b52c68d64c1878818687a473a10547b3292e82b6f6fe483808fb1468e2f52f", size = 215230, upload-time = "2026-03-15T18:52:13.325Z" },
{ url = "https://files.pythonhosted.org/packages/cd/24/afff630feb571a13f07c8539fbb502d2ab494019492aaffc78ef41f1d1d0/charset_normalizer-3.4.6-cp314-cp314t-manylinux_2_31_armv7l.whl", hash = "sha256:7504e9b7dc05f99a9bbb4525c67a2c155073b44d720470a148b34166a69c054e", size = 199045, upload-time = "2026-03-15T18:52:14.752Z" },
{ url = "https://files.pythonhosted.org/packages/e5/17/d1399ecdaf7e0498c327433e7eefdd862b41236a7e484355b8e0e5ebd64b/charset_normalizer-3.4.6-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:172985e4ff804a7ad08eebec0a1640ece87ba5041d565fff23c8f99c1f389484", size = 211658, upload-time = "2026-03-15T18:52:16.278Z" },
{ url = "https://files.pythonhosted.org/packages/b5/38/16baa0affb957b3d880e5ac2144caf3f9d7de7bc4a91842e447fbb5e8b67/charset_normalizer-3.4.6-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:4be9f4830ba8741527693848403e2c457c16e499100963ec711b1c6f2049b7c7", size = 210769, upload-time = "2026-03-15T18:52:17.782Z" },
{ url = "https://files.pythonhosted.org/packages/05/34/c531bc6ac4c21da9ddfddb3107be2287188b3ea4b53b70fc58f2a77ac8d8/charset_normalizer-3.4.6-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:79090741d842f564b1b2827c0b82d846405b744d31e84f18d7a7b41c20e473ff", size = 201328, upload-time = "2026-03-15T18:52:19.553Z" },
{ url = "https://files.pythonhosted.org/packages/fa/73/a5a1e9ca5f234519c1953608a03fe109c306b97fdfb25f09182babad51a7/charset_normalizer-3.4.6-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:87725cfb1a4f1f8c2fc9890ae2f42094120f4b44db9360be5d99a4c6b0e03a9e", size = 225302, upload-time = "2026-03-15T18:52:21.043Z" },
{ url = "https://files.pythonhosted.org/packages/ba/f6/cd782923d112d296294dea4bcc7af5a7ae0f86ab79f8fefbda5526b6cfc0/charset_normalizer-3.4.6-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:fcce033e4021347d80ed9c66dcf1e7b1546319834b74445f561d2e2221de5659", size = 211127, upload-time = "2026-03-15T18:52:22.491Z" },
{ url = "https://files.pythonhosted.org/packages/0e/c5/0b6898950627af7d6103a449b22320372c24c6feda91aa24e201a478d161/charset_normalizer-3.4.6-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:ca0276464d148c72defa8bb4390cce01b4a0e425f3b50d1435aa6d7a18107602", size = 222840, upload-time = "2026-03-15T18:52:24.113Z" },
{ url = "https://files.pythonhosted.org/packages/7d/25/c4bba773bef442cbdc06111d40daa3de5050a676fa26e85090fc54dd12f0/charset_normalizer-3.4.6-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:197c1a244a274bb016dd8b79204850144ef77fe81c5b797dc389327adb552407", size = 216890, upload-time = "2026-03-15T18:52:25.541Z" },
{ url = "https://files.pythonhosted.org/packages/35/1a/05dacadb0978da72ee287b0143097db12f2e7e8d3ffc4647da07a383b0b7/charset_normalizer-3.4.6-cp314-cp314t-win32.whl", hash = "sha256:2a24157fa36980478dd1770b585c0f30d19e18f4fb0c47c13aa568f871718579", size = 155379, upload-time = "2026-03-15T18:52:27.05Z" },
{ url = "https://files.pythonhosted.org/packages/5d/7a/d269d834cb3a76291651256f3b9a5945e81d0a49ab9f4a498964e83c0416/charset_normalizer-3.4.6-cp314-cp314t-win_amd64.whl", hash = "sha256:cd5e2801c89992ed8c0a3f0293ae83c159a60d9a5d685005383ef4caca77f2c4", size = 169043, upload-time = "2026-03-15T18:52:28.502Z" },
{ url = "https://files.pythonhosted.org/packages/23/06/28b29fba521a37a8932c6a84192175c34d49f84a6d4773fa63d05f9aff22/charset_normalizer-3.4.6-cp314-cp314t-win_arm64.whl", hash = "sha256:47955475ac79cc504ef2704b192364e51d0d473ad452caedd0002605f780101c", size = 148523, upload-time = "2026-03-15T18:52:29.956Z" },
{ url = "https://files.pythonhosted.org/packages/2a/68/687187c7e26cb24ccbd88e5069f5ef00eba804d36dde11d99aad0838ab45/charset_normalizer-3.4.6-py3-none-any.whl", hash = "sha256:947cf925bc916d90adba35a64c82aace04fa39b46b52d4630ece166655905a69", size = 61455, upload-time = "2026-03-15T18:53:23.833Z" },
]
[[package]]
name = "decman"
version = "1.2.1"
source = { git = "https://github.com/kiviktnm/decman.git#8c54220dbcb793836e99c567c43718aaed08acd2" }
[[package]]
name = "decman-pacman"
version = "1.1.0"
source = { git = "https://github.com/kiviktnm/decman.git?subdirectory=plugins%2Fdecman-pacman#8c54220dbcb793836e99c567c43718aaed08acd2" }
dependencies = [
{ name = "decman" },
{ name = "pyalpm" },
{ name = "requests" },
]
[[package]]
name = "decman-systemd"
version = "1.1.0"
source = { git = "https://github.com/kiviktnm/decman.git?subdirectory=plugins%2Fdecman-systemd#8c54220dbcb793836e99c567c43718aaed08acd2" }
dependencies = [
{ name = "decman" },
]
[[package]]
name = "idna"
version = "3.11"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz", hash = "sha256:795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902", size = 194582, upload-time = "2025-10-12T14:55:20.501Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/0e/61/66938bbb5fc52dbdf84594873d5b51fb1f7c7794e9c0f5bd885f30bc507b/idna-3.11-py3-none-any.whl", hash = "sha256:771a87f49d9defaf64091e6e6fe9c18d4833f140bd19464795bc32d966ca37ea", size = 71008, upload-time = "2025-10-12T14:55:18.883Z" },
]
[[package]]
name = "pyalpm"
version = "0.10.12"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/fa/33/fb965c94a703b2f62741a52911446fe85e7effc677d54d1a8cd0033f4848/pyalpm-0.10.12.tar.gz", hash = "sha256:8c6cb4bbba819f99fe6c2547f25a861f68905d96729caf1ea15ba6c43d4f1127", size = 52295, upload-time = "2025-05-27T10:33:58.208Z" }
[[package]]
name = "requests"
version = "2.33.0"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "certifi" },
{ name = "charset-normalizer" },
{ name = "idna" },
{ name = "urllib3" },
]
sdist = { url = "https://files.pythonhosted.org/packages/34/64/8860370b167a9721e8956ae116825caff829224fbca0ca6e7bf8ddef8430/requests-2.33.0.tar.gz", hash = "sha256:c7ebc5e8b0f21837386ad0e1c8fe8b829fa5f544d8df3b2253bff14ef29d7652", size = 134232, upload-time = "2026-03-25T15:10:41.586Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/56/5d/c814546c2333ceea4ba42262d8c4d55763003e767fa169adc693bd524478/requests-2.33.0-py3-none-any.whl", hash = "sha256:3324635456fa185245e24865e810cecec7b4caf933d7eb133dcde67d48cee69b", size = 65017, upload-time = "2026-03-25T15:10:40.382Z" },
]
[[package]]
name = "urllib3"
version = "2.6.3"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/c7/24/5f1b3bdffd70275f6661c76461e25f024d5a38a46f04aaca912426a2b1d3/urllib3-2.6.3.tar.gz", hash = "sha256:1b62b6884944a57dbe321509ab94fd4d3b307075e0c2eae991ac71ee15ad38ed", size = 435556, upload-time = "2026-01-07T16:24:43.925Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/39/08/aaaad47bc4e9dc8c725e68f9d04865dbcb2052843ff09c97b08904852d84/urllib3-2.6.3-py3-none-any.whl", hash = "sha256:bf272323e553dfb2e87d9bfd225ca7b0f467b919d7bbd355436d3fd37cb0acd4", size = 131584, upload-time = "2026-01-07T16:24:42.685Z" },
]