restructured and optimized content

This commit is contained in:
2025-04-21 14:21:37 +08:00
parent e1d5d900fb
commit 4af72b9d39
28 changed files with 632 additions and 609 deletions

12
modules/home/develop.nix Normal file
View File

@@ -0,0 +1,12 @@
{ pkgs, ... }:
{
home = {
packages = with pkgs; [
dbeaver-bin
go
nodejs
yarn
];
};
}

22
modules/home/fcitx.nix Normal file
View File

@@ -0,0 +1,22 @@
# 输入法配置模块
{ config, lib, pkgs, ... }:
{
home = {
packages = [ pkgs.catppuccin-fcitx5 ];
sessionVariables = {
GTK_IM_MODULE = "fcitx";
QT_IM_MODULE = "fcitx";
XIM = "fcitx";
XIM_PROGRAM = "fcitx";
XMODIFIERS = "@im=fcitx";
};
};
i18n.inputMethod = {
enabled = "fcitx5";
fcitx5.addons = with pkgs; [
fcitx5-chinese-addons
];
};
}

View File

@@ -35,7 +35,6 @@
wayland.windowManager.hyprland = {
enable = true;
systemdIntegration = true;
enableNvidiaPatches = true;
# extraConfig = builtins.readFile ./conf/hyprland.conf;
};
@@ -56,10 +55,10 @@
recursive = true;
};
home.file.".config/swww" = {
source = ./conf/swww;
recursive = true;
};
# home.file.".config/swww" = {
# source = ./conf/swww;
# recursive = true;
# };
home.file.".config/waybar" = {
source = ./conf/waybar;

View File

@@ -1,11 +1,11 @@
{ config, lib, pkgs, ... }:
{
imports = [
];
home.packages = with pkgs; [
v2ray
v2raya
];
{ config, lib, pkgs, ... }:
{
imports = [
];
home.packages = with pkgs; [
v2ray
v2raya
];
}

View File

@@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ pkgs, ... }:
{
imports = [
@@ -7,16 +7,21 @@
vscode = {
enable = true;
extensions = with pkgs.vscode-extensions; [
jnoortheen.nix-ide
bierner.markdown-mermaid
esbenp.prettier-vscode
foxundermoon.shell-format
github.copilot
github.copilot-chat
golang.go
jnoortheen.nix-ide
pkief.material-icon-theme
] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
# {
# name = "aws-toolkit-vscode";
# publisher = "amazonwebservices";
# version = "1.9.0";
# sha256 = "erRg/C0qSrPg0cK2qmnULOnFGj/mVQTyBy5Kyj1ZfVw=";
# }
{
name = "vscode-augment";
publisher = "augment";
version = "0.409.1";
sha256 = "erRg/C0qSrPg0cK2qmnULOnFGj/mVQTyBy5Kyj1ZfVw=";
}
];
userSettings = builtins.fromJSON (builtins.readFile ./settings.json);
};

View File

@@ -40,7 +40,7 @@
"git.enableSmartCommit": true,
"javascript.updateImportsOnFileMove.enabled": "always",
"security.workspace.trust.untrustedFiles": "open",
"terminal.integrated.fontFamily": "\"Source Code Pro\"",
"terminal.integrated.fontFamily": "'Source Code Pro'",
"terminal.integrated.tabs.location": "left",
"typescript.updateImportsOnFileMove.enabled": "always",
"workbench.iconTheme": "material-icon-theme"

View File

@@ -1,77 +1,77 @@
# XDG stands for "Cross-Desktop Group", with X used to mean "cross".
# It's a bunch of specifications from freedesktop.org intended to standardize desktops and
# other GUI applications on various systems (primarily Unix-like) to be interoperable:
# https://www.freedesktop.org/wiki/Specifications/
{ config, pkgs, ... }: {
home.packages = with pkgs; [
xdg-utils # provides cli tools such as `xdg-mime` `xdg-open`
xdg-user-dirs
];
xdg = {
enable = true;
cacheHome = config.home.homeDirectory + "/.cache";
# manage $XDG_CONFIG_HOME/mimeapps.list
# xdg search all desktop entries from $XDG_DATA_DIRS, check it by command:
# echo $XDG_DATA_DIRS
# the system-level desktop entries can be list by command:
# ls -l /run/current-system/sw/share/applications/
# the user-level desktop entries can be list by command(user ryan):
# ls /etc/profiles/per-user/ryan/share/applications/
mimeApps = {
enable = true;
# defaultApplications =
# let
# browser = [ "microsoft-edge.desktop" ];
# in
# {
# "application/json" = browser;
# "application/pdf" = browser; # TODO: pdf viewer
# "text/html" = browser;
# "text/xml" = browser;
# "application/xml" = browser;
# "application/xhtml+xml" = browser;
# "application/xhtml_xml" = browser;
# "application/rdf+xml" = browser;
# "application/rss+xml" = browser;
# "application/x-extension-htm" = browser;
# "application/x-extension-html" = browser;
# "application/x-extension-shtml" = browser;
# "application/x-extension-xht" = browser;
# "application/x-extension-xhtml" = browser;
# "x-scheme-handler/about" = browser;
# "x-scheme-handler/ftp" = browser;
# "x-scheme-handler/http" = browser;
# "x-scheme-handler/https" = browser;
# "x-scheme-handler/unknown" = browser;
# "x-scheme-handler/discord" = [ "discord.desktop" ];
# "x-scheme-handler/tg" = [ "telegramdesktop.desktop" ];
# "audio/*" = [ "vlc.desktop" ];
# "video/*" = [ "vlc.dekstop" ];
# "image/*" = [ "imv.desktop" ];
# "image/gif" = [ "imv.desktop" ];
# "image/jpeg" = [ "imv.desktop" ];
# "image/png" = [ "imv.desktop" ];
# "image/webp" = [ "imv.desktop" ];
# };
associations.removed =
{
# ......
};
};
userDirs = {
enable = false;
createDirectories = false;
extraConfig = {
XDG_SCREENSHOTS_DIR = "${config.xdg.userDirs.pictures}/Screenshots";
};
};
};
}
# XDG stands for "Cross-Desktop Group", with X used to mean "cross".
# It's a bunch of specifications from freedesktop.org intended to standardize desktops and
# other GUI applications on various systems (primarily Unix-like) to be interoperable:
# https://www.freedesktop.org/wiki/Specifications/
{ config, pkgs, ... }: {
home.packages = with pkgs; [
xdg-utils # provides cli tools such as `xdg-mime` `xdg-open`
xdg-user-dirs
];
xdg = {
enable = true;
cacheHome = config.home.homeDirectory + "/.cache";
# manage $XDG_CONFIG_HOME/mimeapps.list
# xdg search all desktop entries from $XDG_DATA_DIRS, check it by command:
# echo $XDG_DATA_DIRS
# the system-level desktop entries can be list by command:
# ls -l /run/current-system/sw/share/applications/
# the user-level desktop entries can be list by command(user ryan):
# ls /etc/profiles/per-user/ryan/share/applications/
mimeApps = {
enable = true;
# defaultApplications =
# let
# browser = [ "microsoft-edge.desktop" ];
# in
# {
# "application/json" = browser;
# "application/pdf" = browser; # TODO: pdf viewer
# "text/html" = browser;
# "text/xml" = browser;
# "application/xml" = browser;
# "application/xhtml+xml" = browser;
# "application/xhtml_xml" = browser;
# "application/rdf+xml" = browser;
# "application/rss+xml" = browser;
# "application/x-extension-htm" = browser;
# "application/x-extension-html" = browser;
# "application/x-extension-shtml" = browser;
# "application/x-extension-xht" = browser;
# "application/x-extension-xhtml" = browser;
# "x-scheme-handler/about" = browser;
# "x-scheme-handler/ftp" = browser;
# "x-scheme-handler/http" = browser;
# "x-scheme-handler/https" = browser;
# "x-scheme-handler/unknown" = browser;
# "x-scheme-handler/discord" = [ "discord.desktop" ];
# "x-scheme-handler/tg" = [ "telegramdesktop.desktop" ];
# "audio/*" = [ "vlc.desktop" ];
# "video/*" = [ "vlc.dekstop" ];
# "image/*" = [ "imv.desktop" ];
# "image/gif" = [ "imv.desktop" ];
# "image/jpeg" = [ "imv.desktop" ];
# "image/png" = [ "imv.desktop" ];
# "image/webp" = [ "imv.desktop" ];
# };
associations.removed =
{
# ......
};
};
userDirs = {
enable = false;
createDirectories = false;
extraConfig = {
XDG_SCREENSHOTS_DIR = "${config.xdg.userDirs.pictures}/Screenshots";
};
};
};
}