debian 简单配置备份
debian 设置
换源
Types: deb
URIs: https://mirrors.tuna.tsinghua.edu.cn/debian
Suites: trixie trixie-updates trixie-backports
Components: main contrib non-free non-free-firmware
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
# Types: deb-src
# URIs: https://mirrors.tuna.tsinghua.edu.cn/debian
# Suites: trixie trixie-updates trixie-backports
# Components: main contrib non-free non-free-firmware
# Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
# 以下安全更新软件源包含了官方源与镜像站配置,如有需要可自行修改注释切换
Types: deb
URIs: https://mirrors.tuna.tsinghua.edu.cn/debian-security
Suites: trixie-security
Components: main contrib non-free non-free-firmware
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
# Types: deb-src
# URIs: https://mirrors.tuna.tsinghua.edu.cn/debian-security
# Suites: trixie-security
# Components: main contrib non-free non-free-firmware
# Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
zsh
oh-my-zsh
在 github 上直接下载 .zip 文件,然后解压为 ~/.oh-my-zsh 文件夹,然后配置 .zshrc
zsh 插件
- zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
- zsh-syntax-higlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
然后修改 .zshrc 文件
flatpak 和 flathub
sudo apt install flatpak
flatpak的ustc源
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
软件商店的 Software Flatpak 插件
- gnome software
sudo apt install gnome-software-plugin-flatpak
- kde discover
sudo apt install plasma-discover-backend-flatpak
Alacritty
配置文件在 ~/.config/alacritty/alacritty.toml
# 窗口
[window]
dimensions = { columns = 110, lines = 30 } # 启动时大小
padding = { x = 4, y = 2 } # 内边距
decorations = "full" # 保留系统标题栏
opacity = 0.98 # 轻微透明
title = "Alacritty" # 窗口名字
# 字体(Debian 自带)
[font]
size = 14.0
normal = { family = "Maple Mono NF CN", style = "Regular" }
# 滚动缓冲区
[scrolling]
history = 10000
multiplier = 3
# 可选:启动即进入 tmux(不需要可整段删除)
# [shell]
# program = "/usr/bin/tmux"
# args = ["new-session", "-A", "-s", "main"]
[colors.bright]
black = "#444b6a"
blue = "#7da6ff"
cyan = "#0db9d7"
green = "#b9f27c"
magenta = "#bb9af7"
red = "#ff7a93"
white = "#acb0d0"
yellow = "#ff9e64"
[colors.normal]
black = "#32344a"
blue = "#7aa2f7"
cyan = "#449dab"
green = "#9ece6a"
magenta = "#ad8ee6"
red = "#f7768e"
white = "#9699a8"
yellow = "#e0af68"
[colors.primary]
background = "#24283b"
foreground = "#a9b1d6"
[selection]
save_to_clipboard = true
[cursor]
style = { shape = "Block", blinking = "Always" }
ollama
下载
curl -fsSL https://ollama.com/install.sh | sh
curl -fsSL https://ollama.com/download/ollama-linux-amd64.tgz | sudo tar zx -C /usr
使用推荐命令下载太慢了,直接去github下载然后解压就行了。
ollama serve # 启动,然后就可以进行其他操作了
ollama pull deepseek-r1:7b
ollama run deepseek-r1:7b
ibus-rime
ibus是gnome默认的输入法,我觉得不错,因为可以在vscode上直接输入汉字,不用像fcitx5那样进行额外的配置。
但本身自带的云拼音功能只能说是堪用,这里安装配置ibus-rime,配合雾凇拼音和万象模型。
配置了一头包,勉强可用了。
Emacs
我决定用一个init.el文件,掌控一切,不使用结构化的目录配置,剔除一切私人信息。
;;; init-el ---emacs config -*- coding: utf-8; lexical-binding: t; -*-
;;; Commentary:
;;; Code:
;;
;; elpa
;;
(require 'package)
(setq package-archives '(("gnu" . "https://mirrors.tuna.tsinghua.edu.cn/elpa/gnu/")
("nongnu" . "https://mirrors.tuna.tsinghua.edu.cn/elpa/nongnu/")
("melpa" . "https://mirrors.tuna.tsinghua.edu.cn/elpa/melpa/")))
(package-initialize)
(require 'use-package)
(setq package-check-signature nil) ;; 忽略gpg check
(setq package-install-upgrade-built-in t)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; basic
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(setq visible-bell 1)
(setq ring-bell-function 'ignore)
(electric-pair-mode 1) ;; 自动补全括号
(column-number-mode 1)
(save-place-mode 1)
(savehist-mode 1)
(setq make-backup-files nil)
(setq auto-save-default nil)
(setq create-lockfiles nil)
(scroll-bar-mode -1)
;; (menu-bar-mode -1)
;; (tooltip-mode -1)
(tool-bar-mode -1)
(global-visual-line-mode 1)
(global-hl-line-mode 1)
(global-display-line-numbers-mode 1)
(global-auto-revert-mode 1)
;; recentf-mode
(recentf-mode 1)
(global-set-key (kbd "C-c f") 'recentf-open)
;; fido-mode
(fido-vertical-mode 1)
(setq completion-styles '(flex basic))
;; hippie-expand
(global-set-key (kbd "M-/") 'hippie-expand)
(setq hippie-expand-verbose t)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; packages
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; exec-path-from-shell
;;
(use-package exec-path-from-shell
:ensure t
:config
(exec-path-from-shell-initialize))
;;
;; diminish
;;
(use-package diminish
:ensure t)
;;
;; evil
;;
(use-package evil
:ensure t
:config
(evil-mode))
;;
;; company
;;
(use-package company
:ensure t
:init
(global-company-mode t)
:custom
(company-minimum-prefix-length 3)
(company-idle-delay 0.5))
;;
;; colorful-mode
;;
(use-package colorful-mode
:ensure t
:config (global-colorful-mode))
;;
;; avy
;;
(use-package avy
:ensure t
:bind
("C-;" . avy-goto-char-timer)
("C-:" . avy-goto-line))
;;
;; magit
;;
(use-package magit
:ensure t
:bind ("C-x g" . magit-status))
;;
;; gptel
;;
(use-package gptel
:ensure t
:config
;; 设置Ollama后端
(setq gptel-mode "deepseek-r1:7b")
(setq gptel-default-mode 'org-mode)
(setq gptel-backend
(gptel-make-ollama "Ollama"
:host "127.0.0.1:11434"
:stream t
:models '("deepseek-r1:7b"))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; org
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; org
;;
(use-package org
:ensure t
:config
(setq org-startup-folded 'content) ;; 只显示标题
(setq org-cycle-include-plain-lists 'integrate) ;; 将列表视为heading
(setq org-use-fast-todo-selection t) ;; C-c C-t 关键字快捷选项
(setq org-todo-keywords
'((sequence "TODO(t)" "DOING(i)" "|" "DONE(d)")
(sequence "REPORT(r)" "BUG(b)" "KNOWNCAUSE(k)" "|" "FIXED(f)")
(sequence "|" "CANCELED(c)"))) ;; 添加关键字
(setq org-todo-keyword-faces
'(("REPORT" . "crimson")
("BUG" . "red")
("TODO" . "MediumPurple")
("DONE" . "blue")
("KNOWNCAUSE" . "yellow")
("FIXED" . "green")
("DOING" . "greenyellow")
("CANCELED" . "hotpink"))))
;;
;; markdown-mode
;;
(use-package markdown-mode
:ensure t
:mode (("\\.md\\'" . gfm-mode)
("\\.markdown\\'" . gfm-mode)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; code
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; eglot
;;
(use-package eglot
:ensure t)
;;
;; yasnippet
;;
(use-package yasnippet
:ensure t
:diminish yas-minor-mode
:init (yas-global-mode)
:bind ("C-/" . yas-expand)
:config
(yas-reload-all))
(use-package yasnippet-snippets
:ensure t
:after yasnippet)
;;
;; web
;;
(use-package web-mode
:ensure t)
(use-package emmet-mode ;; C-j 快捷键
:ensure t
:hook ((sgml-mode . emmet-mode)
(css-mode . emmet-mode)
(web-mode . emmet-mode)))
(use-package vue-mode
:ensure t)
(use-package typescript-mode
:ensure t
:mode ("\\.tsx?\\'" . typescript-mode))
(use-package js2-mode
:ensure t
:mode ("\\.jsx?\\'"))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; ui
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; font
;; (set-face-attribute 'default nil :font "Noto Sans Mono-14")
;;
;; (dolist (charset '(kana han symbol cjk-misc bopomofo))
;; (set-fontset-font (frame-parameter nil 'font)
;; charset
;; (font-spec :family "Noto Sans CJK" :weight 'regular)))
(set-face-attribute 'default nil :font "Maple Mono NF CN-14")
(dolist (charset '(kana han symbol cjk-misc bopomofo))
(set-fontset-font (frame-parameter nil 'font)
charset
(font-spec :family "Maple Mono NF CN" :weight 'regular)))
;; theme
;; (load-theme 'modus-vivendi t)
(load-theme 'modus-vivendi-tinted t)
(provide 'init)
;;; init.el ends here

浙公网安备 33010602011771号