downgrade rstudio

This commit is contained in:
EdenQwQ 2025-10-20 10:00:06 +08:00
parent 3bc73d6eaf
commit e41616559a
7 changed files with 78 additions and 58 deletions

12
flake.lock generated
View file

@ -1149,11 +1149,11 @@
},
"nixpkgs_16": {
"locked": {
"lastModified": 1759381078,
"narHash": "sha256-gTrEEp5gEspIcCOx9PD8kMaF1iEmfBcTbO0Jag2QhQs=",
"lastModified": 1760524057,
"narHash": "sha256-EVAqOteLBFmd7pKkb0+FIUyzTF61VKi7YmvP1tw4nEw=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "7df7ff7d8e00218376575f0acdcc5d66741351ee",
"rev": "544961dfcce86422ba200ed9a0b00dd4b1486ec5",
"type": "github"
},
"original": {
@ -1350,11 +1350,11 @@
"nixpkgs": "nixpkgs_16"
},
"locked": {
"lastModified": 1759643458,
"narHash": "sha256-oQLW/vQ8/BLhZqp8K8YyP1k8r9ju6iqkbBgBRZ+ah74=",
"lastModified": 1760849193,
"narHash": "sha256-69I1XFep5MVMfcoDTC/48E/6eOGpf8iIu8W26NVh0Hc=",
"owner": "nix-community",
"repo": "NUR",
"rev": "33404b168828bde62e36a61f9a16b54b6d6bcdfb",
"rev": "1d04acb73115223424fb7d6ba666650402ce62eb",
"type": "github"
},
"original": {

View file

@ -1,6 +1,37 @@
{ config, pkgs, ... }:
{
inputs,
config,
pkgs,
...
}:
let
pkgs-stable = inputs.nixpkgs-stable.legacyPackages.${pkgs.system};
colors = config.lib.stylix.colors.withHashtag;
rPkgs = with pkgs-stable.rPackages; [
ggplot2
dplyr
tidyverse
bruceR
afex
ggpubr
reshape2
rmdformats
see
languageserver
styler
openxlsx
ez
multcomp
rsdmx
MuMIn
ggforce
];
myR = pkgs-stable.rWrapper.override {
packages = rPkgs;
};
myRstudio = pkgs-stable.rstudioWrapper.override {
packages = rPkgs;
};
in
{
home.packages = with pkgs; [
@ -11,6 +42,20 @@ in
)
myR
];
programs.nixvim.plugins.lsp.servers.r_language_server = {
enable = true;
package = null;
cmd = [
"${myR}/bin/R"
"--slave"
"-e"
"languageserver::run()"
];
filetypes = [
"r"
"rmd"
];
};
xdg.configFile."rstudio/themes/stylix.rstheme".text = with colors; ''
/* rsthemes 0.5.0 */
/* https://github.com/danth/stylix */

View file

@ -60,20 +60,6 @@
};
};
texlab.enable = true;
r_language_server = {
enable = true;
package = null;
cmd = [
"${pkgs.myR}/bin/R"
"--slave"
"-e"
"languageserver::run()"
];
filetypes = [
"r"
"rmd"
];
};
qmlls = {
enable = true;
filetypes = [ "qml" ];

View file

@ -10,6 +10,30 @@
GEMINI_API_KEY = "$(cat ${config.age.secrets.gemini_token.path})";
ANTHROPIC_AUTH_TOKEN = "$(cat ${config.age.secrets.anyrouter_token.path})";
ANTHROPIC_BASE_URL = "https://anyrouter.top";
SILICONFLOW_API_KEY = "$(cat ${config.age.secrets.siliconflow_token.path})";
};
# home.packages = with pkgs; [ qwen-code ];
home.packages = with pkgs; [ nur.repos.charmbracelet.crush ];
xdg.configFile."crush/crush.json".text = ''
{
"providers": {
"siliconflow": {
"id": "siliconflow",
"name": "siliconflow",
"base_url": "https://api.siliconflow.cn/v1",
"api_key": "$SILICONFLOW_API_KEY",
"type": "openai",
"models": [
{
"id": "Pro/deepseek-ai/DeepSeek-V3.2-Exp",
"name": "DeepSeek-V3.2",
"cost_per_1m_in": 2,
"cost_per_1m_out": 3,
"context_window": 160000,
"default_max_token": 5000
}
]
}
}
}
'';
}

View file

@ -7,5 +7,5 @@
./wallpaper.nix
./colorscheme.nix
];
desktopShell = "dms";
desktopShell = "noctalia-shell";
}

View file

@ -1,34 +0,0 @@
{
rPackages,
rWrapper,
rstudioWrapper,
}:
let
rPkgs = with rPackages; [
ggplot2
dplyr
tidyverse
bruceR
afex
ggpubr
reshape2
rmdformats
see
languageserver
styler
openxlsx
ez
multcomp
rsdmx
MuMIn
ggforce
];
in
{
myR = rWrapper.override {
packages = rPkgs;
};
myRstudio = rstudioWrapper.override {
packages = rPkgs;
};
}

View file

@ -1,6 +1,5 @@
{ pkgs, ... }:
{
inherit (pkgs.callPackage ./R.nix { }) myR myRstudio;
zju-connect = pkgs.callPackage ./zju-connect.nix { };
swhkd = pkgs.callPackage ./swhkd.nix { };
kose-font = pkgs.callPackage ./fonts/kose.nix { };