summaryrefslogtreecommitdiff
path: root/os/common/modules
diff options
context:
space:
mode:
authorsinanmohd <sinan@sinanmohd.com>2025-12-11 14:17:25 +0530
committersinanmohd <sinan@sinanmohd.com>2025-12-11 14:17:25 +0530
commit60716fe535d2a5c4839fbb2d0050a9520fa3a594 (patch)
tree5c89e8042030614e3489b4022bf5ba8cde5ed6d8 /os/common/modules
parent4cb91d608e08b0fb5d569c0bf3edca4c1eebd747 (diff)
chore(common/nix): drop upstreamed changes
Diffstat (limited to 'os/common/modules')
-rw-r--r--os/common/modules/nix.nix (renamed from os/common/modules/nix/default.nix)13
-rw-r--r--os/common/modules/nix/nix.patch53
2 files changed, 0 insertions, 66 deletions
diff --git a/os/common/modules/nix/default.nix b/os/common/modules/nix.nix
index e7c5bfb..e04a156 100644
--- a/os/common/modules/nix/default.nix
+++ b/os/common/modules/nix.nix
@@ -1,25 +1,12 @@
{
config,
- pkgs,
- determinate,
- lib,
...
}:
let
user = config.global.userdata.name;
-
- nixWithFix = determinate.inputs.nix.packages.${pkgs.stdenv.system}.nix-everything.override {
- nix-cli = determinate.inputs.nix.packages.${pkgs.stdenv.system}.nix-cli.overrideAttrs (oldAttrs: {
- patches = (oldAttrs.patches or [ ]) ++ [
- ./nix.patch
- ];
- });
- };
in
{
nix = {
- package = lib.mkForce nixWithFix;
-
gc = {
automatic = true;
dates = "weekly";
diff --git a/os/common/modules/nix/nix.patch b/os/common/modules/nix/nix.patch
deleted file mode 100644
index 606e61d..0000000
--- a/os/common/modules/nix/nix.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-diff --git a/develop.cc b/develop.cc
-index c27c254fb..e914d5f6c 100644
---- a/develop.cc
-+++ b/develop.cc
-@@ -629,13 +629,12 @@ struct CmdDevelop : Common, MixEnvironment
- fmt("[ -n \"$PS1\" ] && PS1+=%s;\n", escapeShellArgAlways(developSettings.bashPromptSuffix.get()));
- }
-
-- writeFull(rcFileFd.get(), script);
--
- setEnviron();
- // prevent garbage collection until shell exits
- setEnv("NIX_GCROOT", store->printStorePath(gcroot).c_str());
-
- Path shell = "bash";
-+ bool foundInteractive = false;
-
- try {
- auto state = getEvalState();
-@@ -658,19 +657,17 @@ struct CmdDevelop : Common, MixEnvironment
- Strings{"legacyPackages." + settings.thisSystem.get() + "."},
- nixpkgsLockFlags);
-
-- bool found = false;
--
- for (auto & path : Installable::toStorePathSet(
- getEvalStore(), store, Realise::Outputs, OperateOn::Output, {bashInstallable})) {
- auto s = store->printStorePath(path) + "/bin/bash";
- if (pathExists(s)) {
- shell = s;
-- found = true;
-+ foundInteractive = true;
- break;
- }
- }
-
-- if (!found)
-+ if (!foundInteractive)
- throw Error("package 'nixpkgs#bashInteractive' does not provide a 'bin/bash'");
-
- } catch (Error &) {
-@@ -680,6 +677,11 @@ struct CmdDevelop : Common, MixEnvironment
- // Override SHELL with the one chosen for this environment.
- // This is to make sure the system shell doesn't leak into the build environment.
- setEnv("SHELL", shell.c_str());
-+ // https://github.com/NixOS/nix/issues/5873
-+ script += fmt("SHELL=\"%s\"\n", shell);
-+ if (foundInteractive)
-+ script += fmt("PATH=\"%s${PATH:+:$PATH}\"\n", std::filesystem::path(shell).parent_path());
-+ writeFull(rcFileFd.get(), script);
-
- #ifdef _WIN32 // TODO re-enable on Windows
- throw UnimplementedError("Cannot yet spawn processes on Windows");