mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-12 04:19:22 +08:00
Merge branch 'next' into production
This commit is contained in:
@@ -60,11 +60,7 @@ inputs:
|
||||
hardware =
|
||||
{
|
||||
cpus = [ "amd" ];
|
||||
gpu =
|
||||
{
|
||||
type = "amd+nvidia";
|
||||
nvidia = { prime.busId = { amd = "5:0:0"; nvidia = "1:0:0"; }; dynamicBoost = true; driver = "latest"; };
|
||||
};
|
||||
gpu = { type = "nvidia"; nvidia = { dynamicBoost = true; driver = "latest"; }; };
|
||||
legion = {};
|
||||
};
|
||||
virtualization =
|
||||
@@ -127,7 +123,7 @@ inputs:
|
||||
publicKey = "l1gFSDCeBxyf/BipXNvoEvVvLqPgdil84nmr5q6+EEw=";
|
||||
wireguardIp = "192.168.83.3";
|
||||
};
|
||||
gamemode = { enable = true; drmDevice = 1; };
|
||||
gamemode = { enable = true; drmDevice = 0; };
|
||||
slurm =
|
||||
{
|
||||
enable = true;
|
||||
@@ -178,15 +174,14 @@ inputs:
|
||||
{
|
||||
nixos =
|
||||
{
|
||||
hardware.gpu.type = inputs.lib.mkForce "nvidia";
|
||||
services.gamemode.drmDevice = inputs.lib.mkForce 0;
|
||||
hardware.gpu =
|
||||
{
|
||||
type = inputs.lib.mkForce "amd+nvidia";
|
||||
nvidia.prime.busId = { amd = "5:0:0"; nvidia = "1:0:0"; };
|
||||
};
|
||||
services.gamemode.drmDevice = inputs.lib.mkForce 1;
|
||||
};
|
||||
system.nixos.tags = [ "nvidia" ];
|
||||
};
|
||||
zen.configuration =
|
||||
{
|
||||
nixos.system.kernel = { variant = inputs.lib.mkForce "zen"; patches = inputs.lib.mkForce []; };
|
||||
system.nixos.tags = [ "zen" ];
|
||||
system.nixos.tags = [ "hybrid" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
182
flake.lock
generated
182
flake.lock
generated
@@ -8,11 +8,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1722680456,
|
||||
"narHash": "sha256-q3ZxjLD/6WnAGwihLlRLoEzIEaVE1AqnH5h1TePYP/I=",
|
||||
"lastModified": 1723815556,
|
||||
"narHash": "sha256-TgkChEFJHqrciuI1Va7buSs5RQHCSxbWRFmuOI+e2tY=",
|
||||
"owner": "ezKEa",
|
||||
"repo": "aagl-gtk-on-nix",
|
||||
"rev": "54264a57d0c58afd12888eb1c576f96ca811530c",
|
||||
"rev": "4d7fa422b50b612aa29bfb8487472f1cd9bad85b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -59,11 +59,11 @@
|
||||
},
|
||||
"catppuccin": {
|
||||
"locked": {
|
||||
"lastModified": 1723691425,
|
||||
"narHash": "sha256-F25VvHFMaqr26b7goaVWspXaK6XTRFz8RnILV+9OPkk=",
|
||||
"lastModified": 1724469296,
|
||||
"narHash": "sha256-p3R4LUNk6gC+fTKRUm9ByXaoRIocnQMwVuJSIxECQ8o=",
|
||||
"owner": "catppuccin",
|
||||
"repo": "nix",
|
||||
"rev": "552056779a136092eb6358c573d925630172fc30",
|
||||
"rev": "874e668ddaf3687e8d38ccd0188a641ffefe1cfb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -88,11 +88,11 @@
|
||||
"yafas": "yafas"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1723531925,
|
||||
"narHash": "sha256-QPETOkVNZwm3Zx0FRfkrPWScbc46I5QwIOdBmByYtKg=",
|
||||
"lastModified": 1724689493,
|
||||
"narHash": "sha256-fNjxhUlj1/tsz4NmVvGiomEhnRlzRNi4/FUmYr7QO5I=",
|
||||
"owner": "chaotic-cx",
|
||||
"repo": "nyx",
|
||||
"rev": "b8b1c616f8b869af7bce3179ad423e3d45b0d079",
|
||||
"rev": "9fbc509c51ab1e49b5c54a8c06d492830f6d8437",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -203,11 +203,11 @@
|
||||
"eigen": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1723671724,
|
||||
"narHash": "sha256-ZYRLIWSqTCUjPvUXONCPlLxUBIlgoF8P/oWEFeJSBuk=",
|
||||
"lastModified": 1724459406,
|
||||
"narHash": "sha256-CzysP5sq15+5U/hBBrP9lLecAa09OJH6a1bQ+pmWAVU=",
|
||||
"owner": "libeigen",
|
||||
"repo": "eigen",
|
||||
"rev": "92e373e6f553dd842337c8467f4ddb669e0e9199",
|
||||
"rev": "c5189ac656c2bf5eead9bc967282cf084cbaeb64",
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
@@ -225,11 +225,11 @@
|
||||
"treefmt-nix": "treefmt-nix"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1719875359,
|
||||
"narHash": "sha256-JwF3XxYsnVwZwYrHnWuM1KbtiwnhALAlpw5KGpvZek0=",
|
||||
"lastModified": 1724111875,
|
||||
"narHash": "sha256-Cit1pRfzgq8G1vCMRQ4eE4YdaUJPCxvj0p3EvhIPAUY=",
|
||||
"owner": "Mic92",
|
||||
"repo": "envfs",
|
||||
"rev": "135193473c3eac12922802f42760e2228a6f5ff6",
|
||||
"rev": "c8493adca165b700f53a53e06f578f3b9f64bcfc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -247,11 +247,11 @@
|
||||
"rust-analyzer-src": "rust-analyzer-src"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1723444276,
|
||||
"narHash": "sha256-ErWXmB84hedrDmeaHOaFFfNShC21AopTfM4x4rlvk3c=",
|
||||
"lastModified": 1724394478,
|
||||
"narHash": "sha256-JSiv2uwI4UJo/4pxt4255BfzWCiEberJmBC6pCxnzas=",
|
||||
"owner": "nix-community",
|
||||
"repo": "fenix",
|
||||
"rev": "70c22198ab822aa93c92a7ec0933908b17131edd",
|
||||
"rev": "2e7bcdc4ef73aa56abd2f970e5a8b9c0cc87e614",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -563,11 +563,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1723399884,
|
||||
"narHash": "sha256-97wn0ihhGqfMb8WcUgzzkM/TuAxce2Gd20A8oiruju4=",
|
||||
"lastModified": 1724435763,
|
||||
"narHash": "sha256-UNky3lJNGQtUEXT2OY8gMxejakSWPTfWKvpFkpFlAfM=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "086f619dd991a4d355c07837448244029fc2d9ab",
|
||||
"rev": "c2cd2a52e02f1dfa1c88f95abeb89298d46023be",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -578,11 +578,11 @@
|
||||
},
|
||||
"impermanence": {
|
||||
"locked": {
|
||||
"lastModified": 1719091691,
|
||||
"narHash": "sha256-AxaLX5cBEcGtE02PeGsfscSb/fWMnyS7zMWBXQWDKbE=",
|
||||
"lastModified": 1724489415,
|
||||
"narHash": "sha256-ey8vhwY/6XCKoh7fyTn3aIQs7WeYSYtLbYEG87VCzX4=",
|
||||
"owner": "nix-community",
|
||||
"repo": "impermanence",
|
||||
"rev": "23c1f06316b67cb5dabdfe2973da3785cfe9c34a",
|
||||
"rev": "c7f5b394397398c023000cf843986ee2571a1fd7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -600,11 +600,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1723367191,
|
||||
"narHash": "sha256-noi5tre7BLtxImN38jEHeVOtOG1Xu37sJFwHKSAPHjo=",
|
||||
"lastModified": 1724304322,
|
||||
"narHash": "sha256-/nrlMDubg9oG2VNANRBxsas5RbcJtB6IIDPZC3yHLW8=",
|
||||
"owner": "Jovian-Experiments",
|
||||
"repo": "Jovian-NixOS",
|
||||
"rev": "91178062f365b64eece94c5dff93e09b07e87d9d",
|
||||
"rev": "924a18ea8df89a39166dd202f3e73cd022825768",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -616,11 +616,11 @@
|
||||
"kylin-virtual-keyboard": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1710313521,
|
||||
"narHash": "sha256-A8Y+lvAPlh0HeTxTaHCdAD/CilQCQwsX4C+fBBKaqTU=",
|
||||
"lastModified": 1723713444,
|
||||
"narHash": "sha256-AvuoCe9ka0tfXtNW0KxInRI6xoSayiyrX+tBlAjGNLY=",
|
||||
"ref": "refs/heads/upstream",
|
||||
"rev": "a8ec88762d63d676aae4f5f1e6d9d1dedf07cf28",
|
||||
"revCount": 161,
|
||||
"rev": "eba6dbbfd5d3d4128cbd300be7e109088cd82858",
|
||||
"revCount": 162,
|
||||
"type": "git",
|
||||
"url": "https://gitee.com/openkylin/kylin-virtual-keyboard.git"
|
||||
},
|
||||
@@ -632,11 +632,11 @@
|
||||
"lepton": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1723185812,
|
||||
"narHash": "sha256-Mtnoit1CAGJoc8eiJ+0vfGc9v+3tomm8V8/tWfeAj7o=",
|
||||
"lastModified": 1724686250,
|
||||
"narHash": "sha256-Ngof+vfBm/3HFtjsNZGo9sWIHuoAet8v3f/FSMbARr4=",
|
||||
"owner": "black7375",
|
||||
"repo": "Firefox-UI-Fix",
|
||||
"rev": "c79922aa45ff04a62e04ef0f8562dc53990b5208",
|
||||
"rev": "c346292707c4507e2ccd890adacba65c85dc62d1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -648,11 +648,11 @@
|
||||
"linux-surface": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1723804050,
|
||||
"narHash": "sha256-MYwEgnw3KjEm6oh39XUmCq12tKdH+0QZj9SZlWbwyxo=",
|
||||
"lastModified": 1723861744,
|
||||
"narHash": "sha256-a4rrhMYb75Kk4G7JEZkacJPWI4u7o5xX88hwgty38D8=",
|
||||
"owner": "linux-surface",
|
||||
"repo": "linux-surface",
|
||||
"rev": "4439a5efb6516c443df5f52173cb55aef01560d1",
|
||||
"rev": "9103a6bf08d622fd583fd9839d2dc4ef9b2a46e2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -664,11 +664,11 @@
|
||||
"lmod": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1723142745,
|
||||
"narHash": "sha256-bNTOW6MffUpiGEfZxP1MSioa2MpYW456wymXHO5Uvr4=",
|
||||
"lastModified": 1724105894,
|
||||
"narHash": "sha256-MhoKG0QwTAccK0NE8vnm325T8Azqy4VKf77LGaSDNZI=",
|
||||
"owner": "TACC",
|
||||
"repo": "Lmod",
|
||||
"rev": "efd893e9a2dab1300a0d6f3ea998dc3503fd8d39",
|
||||
"rev": "c7974de5ba3376c7bdc123c42a8e9c3648a84ec4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -746,11 +746,11 @@
|
||||
"nc4nix": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1724033015,
|
||||
"narHash": "sha256-L0HSyoCAfrPF0zdlMmwu7Bpcqz43UsRFkTnXPZjLRiY=",
|
||||
"lastModified": 1724637826,
|
||||
"narHash": "sha256-/ZI1Bs96JyTxOnG12Rqx2o8aYfwqKxF7IMCUIfLBX3w=",
|
||||
"owner": "helsinki-systems",
|
||||
"repo": "nc4nix",
|
||||
"rev": "924dc2b20cac3bf48f7204d58255a9c62bf80f96",
|
||||
"rev": "c082bb1e4d237090bec9cb845af43627766724a9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -826,11 +826,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1723352546,
|
||||
"narHash": "sha256-WTIrvp0yV8ODd6lxAq4F7EbrPQv0gscBnyfn559c3k8=",
|
||||
"lastModified": 1724576102,
|
||||
"narHash": "sha256-uM7n5nNL6fmA0bwMJBNll11f4cMWOFa2Ni6F5KeIldM=",
|
||||
"owner": "Mic92",
|
||||
"repo": "nix-index-database",
|
||||
"rev": "ec78079a904d7d55e81a0468d764d0fffb50ac06",
|
||||
"rev": "e333d62b70b179da1dd78d94315e8a390f2d12e5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -847,11 +847,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1723352546,
|
||||
"narHash": "sha256-WTIrvp0yV8ODd6lxAq4F7EbrPQv0gscBnyfn559c3k8=",
|
||||
"lastModified": 1723950649,
|
||||
"narHash": "sha256-dHMkGjwwCGj0c2MKyCjRXVBXq2Sz3TWbbM23AS7/5Hc=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nix-index-database",
|
||||
"rev": "ec78079a904d7d55e81a0468d764d0fffb50ac06",
|
||||
"rev": "392828aafbed62a6ea6ccab13728df2e67481805",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -869,11 +869,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1723685172,
|
||||
"narHash": "sha256-TXrwOBvk9yQnfS9zgyG6jWJA7bK+UVfnSoGX1Gp4/uU=",
|
||||
"lastModified": 1724635787,
|
||||
"narHash": "sha256-01rsv0PLT/x5BZybqTnrlYipnG1CFF5s7ZX9otCnFlM=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nix-vscode-extensions",
|
||||
"rev": "e470c879f34c9f3915d7f1fe95c33f9a958f8c10",
|
||||
"rev": "d1980fd00e84460f6769cc1684899fead5224080",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -915,11 +915,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1724171353,
|
||||
"narHash": "sha256-Qdxgirl1bChkSnTgvHibkzF0wnak6HtRA0bLB4cindQ=",
|
||||
"lastModified": 1724805153,
|
||||
"narHash": "sha256-MFgWuUxpxphKDkymInOSKVvAJMqWhI0Xk+zuhxOrvXU=",
|
||||
"owner": "CHN-beta",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "3f0bb934a09d868ce7e5a4a4ce415afb71a2655e",
|
||||
"rev": "ac7d64c6a94e2d95f91f68df0097184db12364db",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -995,11 +995,11 @@
|
||||
},
|
||||
"nixpkgs-24_05": {
|
||||
"locked": {
|
||||
"lastModified": 1723556749,
|
||||
"narHash": "sha256-+CHVZnTnIYRLYsARInHYoWkujzcRkLY/gXm3s5bE52o=",
|
||||
"lastModified": 1723938990,
|
||||
"narHash": "sha256-9tUadhnZQbWIiYVXH8ncfGXGvkNq3Hag4RCBEMUk7MI=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "4a92571f9207810b559c9eac203d1f4d79830073",
|
||||
"rev": "c42fcfbdfeae23e68fc520f9182dde9f38ad1890",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -1079,11 +1079,11 @@
|
||||
"treefmt-nix": "treefmt-nix_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1723573880,
|
||||
"narHash": "sha256-OWRxvKlh7+s4VhYiLEC8Dr5MLQ6vlTWFgCTIkO80XMs=",
|
||||
"lastModified": 1724610772,
|
||||
"narHash": "sha256-XAOnvYuIAMv7V2YVnVLUpMb+kzmxFxaXCaQASyJq7Ho=",
|
||||
"owner": "linyinfeng",
|
||||
"repo": "nur-packages",
|
||||
"rev": "70d09e1e7c10f81b697e3ac2315cbf6779ed62b0",
|
||||
"rev": "4593675609c0064d9a01e11df2e5c1ff369b98be",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -1105,11 +1105,11 @@
|
||||
"treefmt-nix": "treefmt-nix_4"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1723629877,
|
||||
"narHash": "sha256-gd0Dnx1igw1wHvkmihrtVPf/9sWdHgWCsCTpQglBZs0=",
|
||||
"lastModified": 1724379880,
|
||||
"narHash": "sha256-PatYnOuctc4rYrY7EqUDXbGkeRbyvhNIC845b0HS+oQ=",
|
||||
"owner": "xddxdd",
|
||||
"repo": "nur-packages",
|
||||
"rev": "68859480c1412142ad1e011b9f41f12bbee132c1",
|
||||
"rev": "655aedb45bb67e16c7ac2a116614f28d36eec8b9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -1197,11 +1197,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1723587631,
|
||||
"narHash": "sha256-FZ27DsgOROvv/4Cvo34UcIqEJLQ6cKIWHcQsM3zLN3I=",
|
||||
"lastModified": 1724556439,
|
||||
"narHash": "sha256-gPR3sxkKxISUvydnqoj54znpUkK8av/HVFuFJuYUw3w=",
|
||||
"owner": "pjones",
|
||||
"repo": "plasma-manager",
|
||||
"rev": "76dab4ba280ddd1b6c5aec0bb0aa0ace201c39ae",
|
||||
"rev": "5c97fe8af2a2e561f14195ed357d8c451fdbff4c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -1221,11 +1221,11 @@
|
||||
"nixpkgs-stable": "nixpkgs-stable"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1723202784,
|
||||
"narHash": "sha256-qbhjc/NEGaDbyy0ucycubq4N3//gDFFH3DOmp1D3u1Q=",
|
||||
"lastModified": 1723803910,
|
||||
"narHash": "sha256-yezvUuFiEnCFbGuwj/bQcqg7RykIEqudOy/RBrId0pc=",
|
||||
"owner": "cachix",
|
||||
"repo": "pre-commit-hooks.nix",
|
||||
"rev": "c7012d0c18567c889b948781bc74a501e92275d1",
|
||||
"rev": "bfef0ada09e2c8ac55bbcd0831bd0c9d42e651ba",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -1241,11 +1241,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1723036528,
|
||||
"narHash": "sha256-/w7Yv1c16nz9O8DQQsBUNWLaR1Y278g8ebHCTD8Wb1E=",
|
||||
"lastModified": 1724664864,
|
||||
"narHash": "sha256-VEaGrv5sGNIdN6eQADXH9GylMp7X7qKCfOBmX93lsik=",
|
||||
"owner": "Nix-QChem",
|
||||
"repo": "NixOS-QChem",
|
||||
"rev": "437d809ed9c6cdc4cee9b0e1d04ac6061f8f30f1",
|
||||
"rev": "7fcab915d585fd3c4261ec21585d4e9e117bc2c9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -1313,11 +1313,11 @@
|
||||
"rsshub": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1723692588,
|
||||
"narHash": "sha256-4z39e+om3z3Rcm66NmV5VUfbMueZ/iE+A51SvDf4I9c=",
|
||||
"lastModified": 1724689272,
|
||||
"narHash": "sha256-iTkKoHSO/mD+TPR3hT9PO9TdHnxiqJDREyHb6a2LqaY=",
|
||||
"owner": "DIYgod",
|
||||
"repo": "RSSHub",
|
||||
"rev": "351578a8767f8faa06a26eeace168622503e7682",
|
||||
"rev": "6709293f140f38fbbcf3df8fc4e851f88800eafd",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -1329,11 +1329,11 @@
|
||||
"rust-analyzer-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1723304838,
|
||||
"narHash": "sha256-xAxVDxuvCs8WWkrxVWjCiqxTkHhGj7sSppr1YMuEdT8=",
|
||||
"lastModified": 1724345276,
|
||||
"narHash": "sha256-MKvjkqVL/RJ3QXOA8tSUoK7HHXVGSB2AL+vKxU4Cf+c=",
|
||||
"owner": "rust-lang",
|
||||
"repo": "rust-analyzer",
|
||||
"rev": "0daeb5c0b05cfdf2101b0f078c27539099bf38e6",
|
||||
"rev": "9b724459b5900c2424f5069023d6596a8617284b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -1346,11 +1346,11 @@
|
||||
"rycee": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1723694590,
|
||||
"narHash": "sha256-7cufibbD4mf84wPBOTq0bNYjtUz5/Aq1azv9Nil5bzk=",
|
||||
"lastModified": 1724645012,
|
||||
"narHash": "sha256-XJ8B9ecksgZBlWV9pnDgBWVePyHDg/cLYJ/6YF/RdRA=",
|
||||
"owner": "rycee",
|
||||
"repo": "nur-expressions",
|
||||
"rev": "bc49bde3aa2e9408a22bf62d2faf4358508ce4b6",
|
||||
"rev": "70645c904b41b9ddf70f7218898c48df93e8254f",
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
@@ -1417,11 +1417,11 @@
|
||||
"sqlite-orm": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1679666045,
|
||||
"narHash": "sha256-KqphGFcnR1Y11KqL7sxODSv7lEvcURdF6kLd3cg84kc=",
|
||||
"lastModified": 1724485979,
|
||||
"narHash": "sha256-jgRCYOtCyXj2E5J3iYBffX2AyBwvhune+i4Pb2eCBrA=",
|
||||
"owner": "fnc12",
|
||||
"repo": "sqlite_orm",
|
||||
"rev": "ff7c878af872f7987b62d825284fb25d6043af10",
|
||||
"rev": "6630268477b1df9d22a6a563c62aec2c91ee4249",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -1556,11 +1556,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1723454642,
|
||||
"narHash": "sha256-S0Gvsenh0II7EAaoc9158ZB4vYyuycvMGKGxIbERNAM=",
|
||||
"lastModified": 1724338379,
|
||||
"narHash": "sha256-kKJtaiU5Ou+e/0Qs7SICXF22DLx4V/WhG1P6+k4yeOE=",
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"rev": "349de7bc435bdff37785c2466f054ed1766173be",
|
||||
"rev": "070f834771efa715f3e74cd8ab93ecc96fabc951",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -1577,11 +1577,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1723454642,
|
||||
"narHash": "sha256-S0Gvsenh0II7EAaoc9158ZB4vYyuycvMGKGxIbERNAM=",
|
||||
"lastModified": 1723808491,
|
||||
"narHash": "sha256-rhis3qNuGmJmYC/okT7Dkc4M8CeUuRCSvW6kC2f3hBc=",
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"rev": "349de7bc435bdff37785c2466f054ed1766173be",
|
||||
"rev": "1d07739554fdc4f8481068f1b11d6ab4c1a4167a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@@ -61,7 +61,7 @@ inputs:
|
||||
nix-template nil pnpm-lock-export bundix
|
||||
# instant messager
|
||||
element-desktop telegram-desktop discord fluffychat zoom-us signal-desktop slack nur-linyinfeng.wemeet
|
||||
cinny-desktop nheko # qq nur-xddxdd.wechat-uos
|
||||
nheko # qq nur-xddxdd.wechat-uos TODO: cinny-desktop
|
||||
# browser
|
||||
google-chrome tor-browser microsoft-edge
|
||||
# office
|
||||
|
||||
@@ -1,141 +0,0 @@
|
||||
From ae1e766f623f7a2a889a0b09eb076dd9a60efbe9 Mon Sep 17 00:00:00 2001
|
||||
From: Filipe Manana <fdmanana@suse.com>
|
||||
Date: Sun, 11 Aug 2024 11:53:42 +0100
|
||||
Subject: btrfs: only run the extent map shrinker from kswapd tasks
|
||||
|
||||
Currently the extent map shrinker can be run by any task when attempting
|
||||
to allocate memory and there's enough memory pressure to trigger it.
|
||||
|
||||
To avoid too much latency we stop iterating over extent maps and removing
|
||||
them once the task needs to reschedule. This logic was introduced in commit
|
||||
b3ebb9b7e92a ("btrfs: stop extent map shrinker if reschedule is needed").
|
||||
|
||||
While that solved high latency problems for some use cases, it's still
|
||||
not enough because with a too high number of tasks entering the extent map
|
||||
shrinker code, either due to memory allocations or because they are a
|
||||
kswapd task, we end up having a very high level of contention on some
|
||||
spin locks, namely:
|
||||
|
||||
1) The fs_info->fs_roots_radix_lock spin lock, which we need to find
|
||||
roots to iterate over their inodes;
|
||||
|
||||
2) The spin lock of the xarray used to track open inodes for a root
|
||||
(struct btrfs_root::inodes) - on 6.10 kernels and below, it used to
|
||||
be a red black tree and the spin lock was root->inode_lock;
|
||||
|
||||
3) The fs_info->delayed_iput_lock spin lock since the shrinker adds
|
||||
delayed iputs (calls btrfs_add_delayed_iput()).
|
||||
|
||||
Instead of allowing the extent map shrinker to be run by any task, make
|
||||
it run only by kswapd tasks. This still solves the problem of running
|
||||
into OOM situations due to an unbounded extent map creation, which is
|
||||
simple to trigger by direct IO writes, as described in the changelog
|
||||
of commit 956a17d9d050 ("btrfs: add a shrinker for extent maps"), and
|
||||
by a similar case when doing buffered IO on files with a very large
|
||||
number of holes (keeping the file open and creating many holes, whose
|
||||
extent maps are only released when the file is closed).
|
||||
|
||||
Reported-by: kzd <kzd@56709.net>
|
||||
Link: https://bugzilla.kernel.org/show_bug.cgi?id=219121
|
||||
Reported-by: Octavia Togami <octavia.togami@gmail.com>
|
||||
Link: https://lore.kernel.org/linux-btrfs/CAHPNGSSt-a4ZZWrtJdVyYnJFscFjP9S7rMcvEMaNSpR556DdLA@mail.gmail.com/
|
||||
Fixes: 956a17d9d050 ("btrfs: add a shrinker for extent maps")
|
||||
CC: stable@vger.kernel.org # 6.10+
|
||||
Tested-by: kzd <kzd@56709.net>
|
||||
Tested-by: Octavia Togami <octavia.togami@gmail.com>
|
||||
Signed-off-by: Filipe Manana <fdmanana@suse.com>
|
||||
Reviewed-by: David Sterba <dsterba@suse.com>
|
||||
Signed-off-by: David Sterba <dsterba@suse.com>
|
||||
---
|
||||
fs/btrfs/extent_map.c | 22 ++++++----------------
|
||||
fs/btrfs/super.c | 10 ++++++++++
|
||||
2 files changed, 16 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/fs/btrfs/extent_map.c b/fs/btrfs/extent_map.c
|
||||
index 23b65dc73c0048..10ac5f657e3889 100644
|
||||
--- a/fs/btrfs/extent_map.c
|
||||
+++ b/fs/btrfs/extent_map.c
|
||||
@@ -1147,8 +1147,7 @@ static long btrfs_scan_inode(struct btrfs_inode *inode, struct btrfs_em_shrink_c
|
||||
return 0;
|
||||
|
||||
/*
|
||||
- * We want to be fast because we can be called from any path trying to
|
||||
- * allocate memory, so if the lock is busy we don't want to spend time
|
||||
+ * We want to be fast so if the lock is busy we don't want to spend time
|
||||
* waiting for it - either some task is about to do IO for the inode or
|
||||
* we may have another task shrinking extent maps, here in this code, so
|
||||
* skip this inode.
|
||||
@@ -1191,9 +1190,7 @@ next:
|
||||
/*
|
||||
* Stop if we need to reschedule or there's contention on the
|
||||
* lock. This is to avoid slowing other tasks trying to take the
|
||||
- * lock and because the shrinker might be called during a memory
|
||||
- * allocation path and we want to avoid taking a very long time
|
||||
- * and slowing down all sorts of tasks.
|
||||
+ * lock.
|
||||
*/
|
||||
if (need_resched() || rwlock_needbreak(&tree->lock))
|
||||
break;
|
||||
@@ -1222,12 +1219,7 @@ static long btrfs_scan_root(struct btrfs_root *root, struct btrfs_em_shrink_ctx
|
||||
if (ctx->scanned >= ctx->nr_to_scan)
|
||||
break;
|
||||
|
||||
- /*
|
||||
- * We may be called from memory allocation paths, so we don't
|
||||
- * want to take too much time and slowdown tasks.
|
||||
- */
|
||||
- if (need_resched())
|
||||
- break;
|
||||
+ cond_resched();
|
||||
|
||||
inode = btrfs_find_first_inode(root, min_ino);
|
||||
}
|
||||
@@ -1285,14 +1277,12 @@ long btrfs_free_extent_maps(struct btrfs_fs_info *fs_info, long nr_to_scan)
|
||||
ctx.last_ino);
|
||||
}
|
||||
|
||||
- /*
|
||||
- * We may be called from memory allocation paths, so we don't want to
|
||||
- * take too much time and slowdown tasks, so stop if we need reschedule.
|
||||
- */
|
||||
- while (ctx.scanned < ctx.nr_to_scan && !need_resched()) {
|
||||
+ while (ctx.scanned < ctx.nr_to_scan) {
|
||||
struct btrfs_root *root;
|
||||
unsigned long count;
|
||||
|
||||
+ cond_resched();
|
||||
+
|
||||
spin_lock(&fs_info->fs_roots_radix_lock);
|
||||
count = radix_tree_gang_lookup(&fs_info->fs_roots_radix,
|
||||
(void **)&root,
|
||||
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
|
||||
index 83478deada3bd2..11044e9e2cb110 100644
|
||||
--- a/fs/btrfs/super.c
|
||||
+++ b/fs/btrfs/super.c
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <linux/btrfs.h>
|
||||
#include <linux/security.h>
|
||||
#include <linux/fs_parser.h>
|
||||
+#include <linux/swap.h>
|
||||
#include "messages.h"
|
||||
#include "delayed-inode.h"
|
||||
#include "ctree.h"
|
||||
@@ -2409,6 +2410,15 @@ static long btrfs_free_cached_objects(struct super_block *sb, struct shrink_cont
|
||||
const long nr_to_scan = min_t(unsigned long, LONG_MAX, sc->nr_to_scan);
|
||||
struct btrfs_fs_info *fs_info = btrfs_sb(sb);
|
||||
|
||||
+ /*
|
||||
+ * We may be called from any task trying to allocate memory and we don't
|
||||
+ * want to slow it down with scanning and dropping extent maps. It would
|
||||
+ * also cause heavy lock contention if many tasks concurrently enter
|
||||
+ * here. Therefore only allow kswapd tasks to scan and drop extent maps.
|
||||
+ */
|
||||
+ if (!current_is_kswapd())
|
||||
+ return 0;
|
||||
+
|
||||
return btrfs_free_extent_maps(fs_info, nr_to_scan);
|
||||
}
|
||||
|
||||
--
|
||||
cgit 1.2.3-korg
|
||||
|
||||
@@ -133,16 +133,8 @@ inputs:
|
||||
name = "amdgpu";
|
||||
patch = ./0001-drm-amdgpu-sdma5.2-limit-wptr-workaround-to-sdma-5.2.patch;
|
||||
}];
|
||||
# TODO: remove in 6.11
|
||||
btrfs =
|
||||
[{
|
||||
name = "btrfs";
|
||||
patch =
|
||||
let version = inputs.lib.versions.majorMinor inputs.config.boot.kernelPackages.kernel.version;
|
||||
in if version == "6.10" then ./btrfs.patch else null;
|
||||
}];
|
||||
};
|
||||
in builtins.concatLists (builtins.map (name: patches.${name}) (kernel.patches ++ [ "btrfs" ]));
|
||||
in builtins.concatLists (builtins.map (name: patches.${name}) kernel.patches);
|
||||
};
|
||||
}
|
||||
(
|
||||
|
||||
@@ -23,7 +23,7 @@ inputs:
|
||||
nixpkgs =
|
||||
let
|
||||
permittedInsecurePackages =
|
||||
[ "openssl_1_1" "python2" "zotero" "electron_27" "electron_28" ];
|
||||
[ "openssl_1_1" "python2" "zotero" "electron_27" "electron_28" "olm" "fluffychat" ];
|
||||
hostPlatform = if nixpkgs.march != null
|
||||
then { system = "${nixpkgs.arch}-linux"; gcc = { arch = nixpkgs.march; tune = nixpkgs.march; }; }
|
||||
else "${nixpkgs.arch}-linux";
|
||||
|
||||
Reference in New Issue
Block a user