diff --git a/flake.lock b/flake.lock index f7b7156..de74461 100644 --- a/flake.lock +++ b/flake.lock @@ -330,22 +330,6 @@ "type": "github" } }, - "linux-ntfs": { - "flake": false, - "locked": { - "lastModified": 1784514524, - "narHash": "sha256-opG3HF0XoDBmZCYbG4MD0+Jt7rFL/VCEdBH74RouKPs=", - "owner": "namjaejeon", - "repo": "linux-ntfs", - "rev": "ca149db6b901a0d44cdd88e54047e0cd422ca70d", - "type": "github" - }, - "original": { - "owner": "namjaejeon", - "repo": "linux-ntfs", - "type": "github" - } - }, "nix-cachyos-kernel": { "inputs": { "cachyos-kernel": "cachyos-kernel", @@ -542,27 +526,6 @@ "type": "indirect" } }, - "ntfsplus": { - "inputs": { - "linux-ntfs": "linux-ntfs", - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1774317576, - "narHash": "sha256-HSDFaDLvfS/NqJlXbHh9135DEpqH6JrNuWqbu3YPcTg=", - "owner": "cmspam", - "repo": "ntfsplus-flake", - "rev": "e22d1bcbac31b4e6484d32c503396e8184650215", - "type": "github" - }, - "original": { - "owner": "cmspam", - "repo": "ntfsplus-flake", - "type": "github" - } - }, "peerix": { "inputs": { "flake-compat": "flake-compat_3", @@ -644,7 +607,6 @@ "nixpkgs": "nixpkgs_2", "nixpkgs-2605": "nixpkgs-2605", "nixpkgs-linuxeol": "nixpkgs-linuxeol", - "ntfsplus": "ntfsplus", "peerix": "peerix", "plasma-manager": "plasma-manager" } diff --git a/flake.nix b/flake.nix index a847c5d..ecfe243 100644 --- a/flake.nix +++ b/flake.nix @@ -49,10 +49,6 @@ url = "github:Lumpiasty/acer-wmi-ext/main"; inputs.nixpkgs.follows = "nixpkgs"; }; - ntfsplus = { - url = "github:cmspam/ntfsplus-flake"; - inputs.nixpkgs.follows = "nixpkgs"; - }; nix-skills = { url = "github:sudosubin/nix-skills"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/hosts/gaming-pc.nix b/hosts/gaming-pc.nix index 2092d8c..f05f4af 100644 --- a/hosts/gaming-pc.nix +++ b/hosts/gaming-pc.nix @@ -102,8 +102,6 @@ }; }; - # Use ntfs-plus instead driver - services.ntfsplus.enable = true; # Force disable ntfs-3g driver boot.supportedFilesystems.ntfs = lib.mkForce false; diff --git a/lib/mkNixosSystem.nix b/lib/mkNixosSystem.nix index e8f9eef..46be51b 100644 --- a/lib/mkNixosSystem.nix +++ b/lib/mkNixosSystem.nix @@ -10,7 +10,6 @@ nix-sweep, peerix, acer-wmi-ext, - ntfsplus, nix-skills, nixpkgs-linuxeol, bun2nix, @@ -26,7 +25,6 @@ nixpkgs.lib.nixosSystem { inherit plasma-manager; inherit acer-wmi-ext; inherit nixpkgs-linuxeol; - inherit ntfsplus; }; modules = [ { diff --git a/modules/default.nix b/modules/default.nix index 5f874a7..e76d59b 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -7,7 +7,6 @@ hardware/no-mitigations.nix hardware/acer-undervolt.nix - system/ntfsplus.nix system/roles.nix system/nixpkgs.nix system/location.nix diff --git a/modules/system/ntfsplus-patches/0001-fix-windows_names-option.patch b/modules/system/ntfsplus-patches/0001-fix-windows_names-option.patch deleted file mode 100644 index 9067952..0000000 --- a/modules/system/ntfsplus-patches/0001-fix-windows_names-option.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 8b5c5d23c1218a996a1d6780ca56853454813418 Mon Sep 17 00:00:00 2001 -From: Lumpiasty -Date: Thu, 7 May 2026 01:50:05 +0200 -Subject: [PATCH 1/2] fix windows_names option - ---- - super.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/super.c b/super.c -index 875fb5a..49ad898 100644 ---- a/super.c -+++ b/super.c -@@ -91,7 +91,7 @@ static const struct fs_parameter_spec ntfs_parameters[] = { - fsparam_flag("sys_immutable", Opt_sys_immutable), - fsparam_flag("nohidden", Opt_nohidden), - fsparam_flag("hide_dot_files", Opt_hide_dot_files), -- fsparam_flag("windows_names", Opt_check_windows_names), -+ fsparam_bool("windows_names", Opt_check_windows_names), - fsparam_flag("acl", Opt_acl), - fsparam_flag("discard", Opt_discard), - fsparam_flag("sparse", Opt_sparse), --- -2.53.0 - diff --git a/modules/system/ntfsplus-patches/0002-gate-bad-character-check-by-windows_names.patch b/modules/system/ntfsplus-patches/0002-gate-bad-character-check-by-windows_names.patch deleted file mode 100644 index 41cf026..0000000 --- a/modules/system/ntfsplus-patches/0002-gate-bad-character-check-by-windows_names.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 7fbf82056e26d99bfa4d5aab87ce287cd8c8cbef Mon Sep 17 00:00:00 2001 -From: Lumpiasty -Date: Thu, 7 May 2026 01:56:33 +0200 -Subject: [PATCH 2/2] gate bad character check by windows_names - ---- - namei.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/namei.c b/namei.c -index 9e937d1..7369943 100644 ---- a/namei.c -+++ b/namei.c -@@ -61,12 +61,12 @@ static int ntfs_check_bad_windows_name(struct ntfs_volume *vol, - const __le16 *wc, - unsigned int wc_len) - { -- if (ntfs_check_bad_char(wc, wc_len)) -- return -EINVAL; -- - if (!NVolCheckWindowsNames(vol)) - return 0; - -+ if (ntfs_check_bad_char(wc, wc_len)) -+ return -EINVAL; -+ - /* Check for trailing space or dot. */ - if (wc_len > 0 && - (wc[wc_len - 1] == cpu_to_le16(' ') || --- -2.53.0 - diff --git a/modules/system/ntfsplus.nix b/modules/system/ntfsplus.nix deleted file mode 100644 index a4a3552..0000000 --- a/modules/system/ntfsplus.nix +++ /dev/null @@ -1,78 +0,0 @@ -{ config, pkgs, lib, ntfsplus, ... }: - -# Builds and loads the ntfsplus kernel driver (github:namjaejeon/linux-ntfs), -# a maintained out-of-tree NTFS driver for Linux 6.1+. -# -# The upstream driver is used as-is, with two local patches applied on top -# (see ntfsplus-patches/). This avoids maintaining a fork that would need -# rebasing on every upstream update — patches are plain files that apply -# cleanly regardless of upstream churn. -# -# The ntfsplus flake's nixosModule is NOT used directly. It builds the kernel -# module as a `let` binding inside the module closure — not exposed as a -# package in its flake outputs — so there is nothing in pkgs to override. -# Replicating the module here is the only way to substitute a patched source. -# -# The ntfsplus flake (github:cmspam/ntfsplus-flake) is reused only for: -# - its linux-ntfs source input (ntfsplus.inputs.linux-ntfs) -# - its bundled Makefile (${ntfsplus}/Makefile) -# The flake ships its own Makefile because the upstream repo's Makefile -# has an ifneq KERNELRELEASE guard that breaks the out-of-tree nix build. -# -# The derivation is built inside this module (not via an overlay) so that -# config.boot.kernelPackages.kernel resolves to whatever kernel the host -# declares, with no extra indirection or per-host maintenance. -# -# ntfsplus is passed in via specialArgs in lib/mkNixosSystem.nix. - -let - cfg = config.services.ntfsplus; - - patchedSrc = pkgs.applyPatches { - name = "linux-ntfs-patched"; - src = ntfsplus.inputs.linux-ntfs; - patches = [ - # fsparam_flag → fsparam_bool so windows_names=0/1 is accepted as a - # mount option rather than being treated as a bare flag. - ./ntfsplus-patches/0001-fix-windows_names-option.patch - # Gate the bad-character check behind NVolCheckWindowsNames so that - # the check only runs when windows_names is actually enabled. - ./ntfsplus-patches/0002-gate-bad-character-check-by-windows_names.patch - ]; - }; - - ntfsplus-mod = pkgs.stdenv.mkDerivation { - pname = "ntfsplus-module"; - version = ntfsplus.inputs.linux-ntfs.shortRev or ntfsplus.inputs.linux-ntfs.rev; - src = patchedSrc; - nativeBuildInputs = config.boot.kernelPackages.kernel.moduleBuildDependencies; - preBuild = "cp ${ntfsplus}/Makefile Makefile"; - makeFlags = [ - "KDIR=${config.boot.kernelPackages.kernel.dev}/lib/modules/${config.boot.kernelPackages.kernel.modDirVersion}/build" - "KVERSION=${config.boot.kernelPackages.kernel.modDirVersion}" - "CONFIG_NTFS_FS_POSIX_ACL=y" - ]; - installPhase = '' - mkdir -p $out/lib/modules/${config.boot.kernelPackages.kernel.modDirVersion}/extra - cp ntfs.ko $out/lib/modules/${config.boot.kernelPackages.kernel.modDirVersion}/extra/ - ''; - }; -in -{ - options.services.ntfsplus = { - enable = lib.mkEnableOption "ntfsplus kernel driver and utilities"; - }; - - config = lib.mkIf cfg.enable { - boot.extraModulePackages = [ ntfsplus-mod ]; - boot.kernelModules = [ "ntfs" ]; - boot.extraModprobeConfig = '' - alias fs-ntfs ntfs - alias ntfsplus ntfs - ''; - services.udev.extraRules = '' - SUBSYSTEM=="block", ENV{ID_FS_TYPE}=="ntfs", ENV{ID_FS_TYPE}="ntfs" - ''; - environment.systemPackages = [ pkgs.ntfsprogs-plus ]; - }; -}