Update NixOS configuration
This commit is contained in:
+1
-3
@@ -3,7 +3,7 @@
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./programs/clash.nix
|
./modules
|
||||||
];
|
];
|
||||||
|
|
||||||
# ── Nix 自身设置 ────────────────────────────────────────────
|
# ── Nix 自身设置 ────────────────────────────────────────────
|
||||||
@@ -149,8 +149,6 @@
|
|||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
rsync
|
rsync
|
||||||
wget
|
wget
|
||||||
htop
|
|
||||||
btop
|
|
||||||
(python3.withPackages (ps: with ps; [ pip ]))
|
(python3.withPackages (ps: with ps; [ pip ]))
|
||||||
zip
|
zip
|
||||||
unzip
|
unzip
|
||||||
|
|||||||
Generated
+4
-3
@@ -7,15 +7,16 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1780099287,
|
"lastModified": 1779726825,
|
||||||
"narHash": "sha256-efIPwVGtIWIjWcznhaop6XN6HxnOL8800hF6CBNvlqQ=",
|
"narHash": "sha256-RUkMrREjKDQrA+dA9+xZviGAxM5W1aVdyOr/bSYpHrE=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "7d8127d308c3fb9664f7e643eec944be74ebb37d",
|
"rev": "b179bde238977f7d4454fc770b1a727eaf55111c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
|
"ref": "release-26.05",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
# 引入 Home Manager
|
# 引入 Home Manager
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager";
|
url = "github:nix-community/home-manager/release-26.05";
|
||||||
inputs.nixpkgs.follows = "nixpkgs"; # 保证 Home Manager 用的软件版本和系统一致
|
inputs.nixpkgs.follows = "nixpkgs"; # 保证 Home Manager 用的软件版本和系统一致
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -2,11 +2,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./programs/fish.nix
|
./programs
|
||||||
./programs/git.nix
|
|
||||||
./programs/plasma.nix
|
|
||||||
./programs/rime.nix
|
|
||||||
./programs/spicetify.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# ⚠️ 极其重要:替换成你的实际系统用户名
|
# ⚠️ 极其重要:替换成你的实际系统用户名
|
||||||
@@ -20,6 +16,8 @@
|
|||||||
jetbrains-toolbox
|
jetbrains-toolbox
|
||||||
google-chrome
|
google-chrome
|
||||||
neovim
|
neovim
|
||||||
|
htop
|
||||||
|
btop
|
||||||
telegram-desktop
|
telegram-desktop
|
||||||
wechat
|
wechat
|
||||||
gpu-screen-recorder
|
gpu-screen-recorder
|
||||||
@@ -37,7 +35,7 @@
|
|||||||
nodejs
|
nodejs
|
||||||
pnpm
|
pnpm
|
||||||
kdePackages.kate
|
kdePackages.kate
|
||||||
rime-ice
|
termius
|
||||||
];
|
];
|
||||||
|
|
||||||
# 让 nix-shell 等传统命令也能安装 unfree 软件
|
# 让 nix-shell 等传统命令也能安装 unfree 软件
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./clash.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./fish.nix
|
||||||
|
./git.nix
|
||||||
|
./plasma.nix
|
||||||
|
./rime.nix
|
||||||
|
./spicetify.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -5,10 +5,150 @@
|
|||||||
"$HOME/.npm-global/bin"
|
"$HOME/.npm-global/bin"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
programs.starship = {
|
||||||
|
enable = true;
|
||||||
|
enableFishIntegration = true;
|
||||||
|
settings = {
|
||||||
|
add_newline = true;
|
||||||
|
command_timeout = 1000;
|
||||||
|
|
||||||
|
format = "$directory$git_branch$git_status$nix_shell$nodejs$python$cmd_duration$line_break$character";
|
||||||
|
|
||||||
|
palette = "luodh";
|
||||||
|
palettes.luodh = {
|
||||||
|
blue = "#7aa2f7";
|
||||||
|
cyan = "#7dcfff";
|
||||||
|
green = "#9ece6a";
|
||||||
|
orange = "#ff9e64";
|
||||||
|
purple = "#bb9af7";
|
||||||
|
red = "#f7768e";
|
||||||
|
yellow = "#e0af68";
|
||||||
|
};
|
||||||
|
|
||||||
|
character = {
|
||||||
|
success_symbol = "[❯](bold green)";
|
||||||
|
error_symbol = "[❯](bold red)";
|
||||||
|
vimcmd_symbol = "[❮](bold purple)";
|
||||||
|
};
|
||||||
|
|
||||||
|
directory = {
|
||||||
|
style = "bold blue";
|
||||||
|
truncation_length = 4;
|
||||||
|
truncate_to_repo = false;
|
||||||
|
read_only = " ro";
|
||||||
|
};
|
||||||
|
|
||||||
|
git_branch = {
|
||||||
|
symbol = "git ";
|
||||||
|
style = "bold purple";
|
||||||
|
format = "[$symbol$branch]($style) ";
|
||||||
|
};
|
||||||
|
|
||||||
|
git_status = {
|
||||||
|
style = "bold orange";
|
||||||
|
format = "([$all_status$ahead_behind]($style) )";
|
||||||
|
};
|
||||||
|
|
||||||
|
nix_shell = {
|
||||||
|
symbol = "nix ";
|
||||||
|
style = "bold cyan";
|
||||||
|
format = "[$symbol$state( \\($name\\))]($style) ";
|
||||||
|
};
|
||||||
|
|
||||||
|
nodejs = {
|
||||||
|
symbol = "node ";
|
||||||
|
style = "bold green";
|
||||||
|
format = "[$symbol$version]($style) ";
|
||||||
|
};
|
||||||
|
|
||||||
|
python = {
|
||||||
|
symbol = "py ";
|
||||||
|
style = "bold yellow";
|
||||||
|
format = "[\${symbol}\${pyenv_prefix}(\${version} )(\\($virtualenv\\) )]($style)";
|
||||||
|
};
|
||||||
|
|
||||||
|
cmd_duration = {
|
||||||
|
min_time = 500;
|
||||||
|
style = "bold yellow";
|
||||||
|
format = "took [$duration]($style) ";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
programs.fish = {
|
programs.fish = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
shellAbbrs = {
|
||||||
|
c = "clear";
|
||||||
|
cat = "bat";
|
||||||
|
e = "$EDITOR";
|
||||||
|
g = "git";
|
||||||
|
ga = "git add";
|
||||||
|
gc = "git commit";
|
||||||
|
gd = "git diff";
|
||||||
|
gl = "git log --oneline --decorate --graph";
|
||||||
|
gp = "git push";
|
||||||
|
gs = "git status --short --branch";
|
||||||
|
l = "ls -lah";
|
||||||
|
ll = "ls -alF";
|
||||||
|
rebuild = "sudo nixos-rebuild switch --flake /etc/nixos#nixos";
|
||||||
|
update = "sudo nix flake update --flake /etc/nixos && sudo nixos-rebuild switch --flake /etc/nixos#nixos";
|
||||||
|
};
|
||||||
|
|
||||||
interactiveShellInit = ''
|
interactiveShellInit = ''
|
||||||
|
set fish_greeting
|
||||||
|
|
||||||
|
set -g fish_color_autosuggestion 6c7086
|
||||||
|
set -g fish_color_cancel f7768e
|
||||||
|
set -g fish_color_command 7aa2f7
|
||||||
|
set -g fish_color_comment 565f89
|
||||||
|
set -g fish_color_cwd 9ece6a
|
||||||
|
set -g fish_color_cwd_root f7768e
|
||||||
|
set -g fish_color_end ff9e64
|
||||||
|
set -g fish_color_error f7768e
|
||||||
|
set -g fish_color_escape bb9af7
|
||||||
|
set -g fish_color_history_current --bold
|
||||||
|
set -g fish_color_match --background=313244
|
||||||
|
set -g fish_color_normal c0caf5
|
||||||
|
set -g fish_color_operator 7dcfff
|
||||||
|
set -g fish_color_param e0af68
|
||||||
|
set -g fish_color_quote 9ece6a
|
||||||
|
set -g fish_color_redirection bb9af7
|
||||||
|
set -g fish_color_search_match --background=313244
|
||||||
|
set -g fish_color_selection --background=313244
|
||||||
|
set -g fish_color_status f7768e
|
||||||
|
set -g fish_color_valid_path --underline
|
||||||
|
set -g fish_pager_color_completion c0caf5
|
||||||
|
set -g fish_pager_color_description 6c7086
|
||||||
|
set -g fish_pager_color_prefix 7aa2f7 --bold --underline
|
||||||
|
set -g fish_pager_color_progress 6c7086
|
||||||
|
set -g fish_pager_color_selected_background --background=313244
|
||||||
|
|
||||||
fish_add_path "$HOME/.npm-global/bin"
|
fish_add_path "$HOME/.npm-global/bin"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
programs.bat.enable = true;
|
||||||
|
programs.fzf = {
|
||||||
|
enable = true;
|
||||||
|
enableFishIntegration = true;
|
||||||
|
colors = {
|
||||||
|
bg = "#1a1b26";
|
||||||
|
fg = "#c0caf5";
|
||||||
|
"bg+" = "#292e42";
|
||||||
|
"fg+" = "#c0caf5";
|
||||||
|
header = "#7dcfff";
|
||||||
|
hl = "#7aa2f7";
|
||||||
|
"hl+" = "#7aa2f7";
|
||||||
|
info = "#bb9af7";
|
||||||
|
marker = "#9ece6a";
|
||||||
|
pointer = "#f7768e";
|
||||||
|
prompt = "#7dcfff";
|
||||||
|
spinner = "#e0af68";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
programs.zoxide = {
|
||||||
|
enable = true;
|
||||||
|
enableFishIntegration = true;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
rime-ice
|
||||||
|
];
|
||||||
|
|
||||||
home.file.".local/share/fcitx5/rime/default.custom.yaml".text = ''
|
home.file.".local/share/fcitx5/rime/default.custom.yaml".text = ''
|
||||||
patch:
|
patch:
|
||||||
schema_list:
|
schema_list:
|
||||||
|
|||||||
Reference in New Issue
Block a user