diff --git a/configuration.nix b/configuration.nix index ba6e88b..69737c6 100644 --- a/configuration.nix +++ b/configuration.nix @@ -133,6 +133,9 @@ htop btop (python3.withPackages (ps: with ps; [ pip ])) + zip + unzip + ffmpeg ]; # ── 系统状态版本(请勿修改) ──────────────────────────────── diff --git a/flake.lock b/flake.lock index f1b8529..ecba261 100644 --- a/flake.lock +++ b/flake.lock @@ -36,10 +36,34 @@ "type": "github" } }, + "plasma-manager": { + "inputs": { + "home-manager": [ + "home-manager" + ], + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1775856943, + "narHash": "sha256-b7Mp7P+q2Md5AGt4rjHfMcBykzMumFTen10ST++AuTU=", + "owner": "nix-community", + "repo": "plasma-manager", + "rev": "a524a6160e6df89f7673ba293cf7d78b559eb1a5", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "plasma-manager", + "type": "github" + } + }, "root": { "inputs": { "home-manager": "home-manager", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs", + "plasma-manager": "plasma-manager" } } }, diff --git a/flake.nix b/flake.nix index 48a0987..6975d93 100644 --- a/flake.nix +++ b/flake.nix @@ -12,10 +12,16 @@ inputs.nixpkgs.follows = "nixpkgs"; # 保证 Home Manager 用的软件版本和系统一致 }; + plasma-manager = { + url = "github:nix-community/plasma-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.home-manager.follows = "home-manager"; + }; + }; # 输出(最终建成的系统) - outputs = { self, nixpkgs, home-manager, ... }@inputs: { + outputs = { self, nixpkgs, home-manager, plasma-manager, ... }@inputs: { nixosConfigurations = { # 这里的 "nixos" 是你的系统主机名 (hostname)。 # 如果你在安装系统时改过主机名,请把这里的 "nixos" 换成你的实际主机名。 @@ -30,6 +36,7 @@ { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; + home-manager.sharedModules = [ plasma-manager.homeModules.plasma-manager ]; # ⚠️ 极其重要:把这里的 "luodh" 替换成你在 NixOS 里登录的实际系统用户名 home-manager.users.test = import ./home.nix; diff --git a/home.nix b/home.nix index a491d76..7832020 100644 --- a/home.nix +++ b/home.nix @@ -77,6 +77,24 @@ }; }; + # Plasma 桌面环境接管 + programs.plasma = { + enable = true; + overrideConfig = true; # 每次重建清理旧的迭代设置 + + # 关闭鼠标加速度,灵敏度保持默认 + configFile."kcminputrc" = { + "Mouse" = { + "XLbInptPointerAccel" = 0.0; # 关闭鼠标加速度 + "XLbInptAccelProfileFlat" = true; # 平坦加速曲线 + }; + }; + + # 虚拟键盘 / 输入法设置为 fcitx5 + configFile."kwinrc"."Wayland"."InputMethod" = + "${pkgs.fcitx5}/share/applications/org.fcitx.Fcitx5.desktop"; + }; + # 这个版本号不要改!它不是软件版本,而是系统状态标识 home.stateVersion = "25.11";