From 2d697984f287b806e5f6045755211c8a414d60cb Mon Sep 17 00:00:00 2001 From: Fabian Hauser Date: Thu, 16 Jan 2025 14:16:55 +0200 Subject: [PATCH] Remove fixed cifs auth fi --- defaults/cifs-auth-fix/default.nix | 44 ------------------------------ host/ochsenchopf/default.nix | 1 - 2 files changed, 45 deletions(-) delete mode 100644 defaults/cifs-auth-fix/default.nix diff --git a/defaults/cifs-auth-fix/default.nix b/defaults/cifs-auth-fix/default.nix deleted file mode 100644 index e640738..0000000 --- a/defaults/cifs-auth-fix/default.nix +++ /dev/null @@ -1,44 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: - -{ - - # Remove this once https://github.com/NixOS/nixpkgs/issues/34638 is resolved - # The TL;DR is: the kernel calls out to the hard-coded path of - # /sbin/request-key as part of its CIFS auth process, which of course does - # not exist on NixOS due to the usage of Nix store paths. - system.activationScripts.symlink-requestkey = '' - if [ ! -d /sbin ]; then - mkdir /sbin - fi - ln -sfn /run/current-system/sw/bin/request-key /sbin/request-key - ''; - # request-key expects a configuration file under /etc - environment.etc."request-key.conf" = { - text = - let - upcall = "${pkgs.cifs-utils}/bin/cifs.upcall"; - keyctl = "${pkgs.keyutils}/bin/keyctl"; - in - '' - #OP TYPE DESCRIPTION CALLOUT_INFO PROGRAM - # -t is required for DFS share servers... - create cifs.spnego * * ${upcall} -t %k - create dns_resolver * * ${upcall} %k - # Everything below this point is essentially the default configuration, - # modified minimally to work under NixOS. Notably, it provides debug - # logging. - create user debug:* negate ${keyctl} negate %k 30 %S - create user debug:* rejected ${keyctl} reject %k 30 %c %S - create user debug:* expired ${keyctl} reject %k 30 %c %S - create user debug:* revoked ${keyctl} reject %k 30 %c %S - create user debug:loop:* * |${pkgs.coreutils}/bin/cat - create user debug:* * ${pkgs.keyutils}/share/keyutils/request-key-debug.sh %k %d %c %S - negate * * * ${keyctl} negate %k 30 %S - ''; - }; -} diff --git a/host/ochsenchopf/default.nix b/host/ochsenchopf/default.nix index 91f15f1..24737c0 100644 --- a/host/ochsenchopf/default.nix +++ b/host/ochsenchopf/default.nix @@ -8,7 +8,6 @@ ../../defaults/hardware/thinkpad-x1-gen9.nix ../../defaults/base - ../../defaults/cifs-auth-fix ../../defaults/desktop ];