From 53d7676389a99de40f2e7f7c67a16166ef910692 Mon Sep 17 00:00:00 2001 From: Gytis Ivaskevicius Date: Fri, 25 Jun 2021 16:40:11 +0300 Subject: [PATCH 1/9] [RFC 0096] Experimental Nix flakes release [RFC 0096] Experimental Nix flakes release --- rfcs/0096-experimental-flakes-release.md | 33 ++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 rfcs/0096-experimental-flakes-release.md diff --git a/rfcs/0096-experimental-flakes-release.md b/rfcs/0096-experimental-flakes-release.md new file mode 100644 index 000000000..3dfb909f5 --- /dev/null +++ b/rfcs/0096-experimental-flakes-release.md @@ -0,0 +1,33 @@ +--- +feature: experimental-flakes-release +start-date: 2021-06-25 +author: gytis-ivaskevicius +co-authors: +shepherd-team: +shepherd-leader: +related-issues: +--- + +# Summary +[summary]: #summary + +Add a way for users to use Nix flakes without enabling any options in `nix.conf` file + +# Detailed design +[design]: #detailed-design +Reimplementation of [this PR](https://github.com/NixOS/nixpkgs/pull/120141). +Possibly with rename `nixFlakes` to `nixExperimentalFlakes` or something along +those lines. + +# Unresolved questions +[unresolved]: #unresolved-questions + +Do we change package names? +Do we add additional warnings of some sort so that end-users realize that they +are using an experimental feature? + +# Future work +[future]: #future-work + +Removal after actual release :) + From aa95a9cfa3daee23e1cae6e06b55543eab8a7150 Mon Sep 17 00:00:00 2001 From: Gytis Ivaskevicius Date: Sat, 26 Jun 2021 17:08:30 +0300 Subject: [PATCH 2/9] [RFC 0096] Experimental Nix derivations --- rfcs/0096-experimental-flakes-release.md | 33 ---------- rfcs/0096-experimental-nix-derivations.md | 78 +++++++++++++++++++++++ 2 files changed, 78 insertions(+), 33 deletions(-) delete mode 100644 rfcs/0096-experimental-flakes-release.md create mode 100644 rfcs/0096-experimental-nix-derivations.md diff --git a/rfcs/0096-experimental-flakes-release.md b/rfcs/0096-experimental-flakes-release.md deleted file mode 100644 index 3dfb909f5..000000000 --- a/rfcs/0096-experimental-flakes-release.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -feature: experimental-flakes-release -start-date: 2021-06-25 -author: gytis-ivaskevicius -co-authors: -shepherd-team: -shepherd-leader: -related-issues: ---- - -# Summary -[summary]: #summary - -Add a way for users to use Nix flakes without enabling any options in `nix.conf` file - -# Detailed design -[design]: #detailed-design -Reimplementation of [this PR](https://github.com/NixOS/nixpkgs/pull/120141). -Possibly with rename `nixFlakes` to `nixExperimentalFlakes` or something along -those lines. - -# Unresolved questions -[unresolved]: #unresolved-questions - -Do we change package names? -Do we add additional warnings of some sort so that end-users realize that they -are using an experimental feature? - -# Future work -[future]: #future-work - -Removal after actual release :) - diff --git a/rfcs/0096-experimental-nix-derivations.md b/rfcs/0096-experimental-nix-derivations.md new file mode 100644 index 000000000..b46b61843 --- /dev/null +++ b/rfcs/0096-experimental-nix-derivations.md @@ -0,0 +1,78 @@ +--- +feature: experimental-nix-derivations +start-date: 2021-06-25 +author: gytis-ivaskevicius +co-authors: +shepherd-team: +shepherd-leader: +related-issues: +--- + +# Summary +[summary]: #summary + +Add a way for users to use experimental Nix features with improved user-experience +and better communication to the user that they are using an experimental feature. + +# Motivation +[motivation]: #motivation + +Motivation: +- Revert of (this)[https://github.com/NixOS/nixpkgs/pull/123898]. +- Noticed quite a few peeps who were very supportive of [this](https://github.com/NixOS/nixpkgs/pull/120141) PR (which got reverted). +- Lack of visibility for the end-users that they are using experimental features. + +Expected outcome: +- Improved UX. +- Reduced risk of users using experimental features in production environments. +- Reduced non-bug questions/issues on common support channels. + +# Detailed design +[design]: #detailed-design + +Additional derivations `nixExperimentalFlakes` and `nixExperimentalAll`. (Possibly more if necessary) + +What's so special about these derivations: +- Experimental features enabled by default. Much like [this](https://github.com/NixOS/nixpkgs/pull/120141) PR. +- When using these derivations it shows a warning. + + +Warning expected to look something like this: +``` +WARNING: You are using experimental Nix features which are up to a subject to change. For more information visit https://nixos.org/xyz +``` + +A webpage is expected to contain information as such: +- Support channels if any. +- A little rundown of the current state of the feature(s). +- Some "URL dump" kind of wiki page that that would contain a list of links to issues with existing bugs/workarounds/edge-cases. + +# Examples and Interactions +[examples-and-interactions]: #examples-and-interactions + +If we take Nix flakes as an example: +The additional line to `nix.conf` is not a deal-breaker for anyone who decides to +use Nix Flakes. Even if someone were to do so in a production environment is +likely to get by unnoticed. On another hand, if there is an explicit warning it is +likely to make multiple peeps question their decisions. + +# Drawbacks +[drawbacks]: #drawbacks + +I can't think of any drawbacks. + +# Alternatives +[alternatives]: #alternatives + +Not doing this would preserve a lack of visibility. Especially when using projects like [DevOS](https://github.com/divnix/devos) or [flake-utils-plus](https://github.com/gytis-ivaskevicius/flake-utils-plus/) + +# Unresolved questions +[unresolved]: #unresolved-questions + +How exactly warning should look like? + +# Future work +[future]: #future-work + +Removal/Deprecation of Nix experimental packages on a per case basis. + From 6cfcf3c6143b5c1447f16030eabd8ec74661f7cf Mon Sep 17 00:00:00 2001 From: Gytis Ivaskevicius Date: Wed, 30 Jun 2021 12:49:13 +0300 Subject: [PATCH 3/9] [RFC 0096] Update implenetation --- rfcs/0096-experimental-nix-derivations.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/rfcs/0096-experimental-nix-derivations.md b/rfcs/0096-experimental-nix-derivations.md index b46b61843..57a695738 100644 --- a/rfcs/0096-experimental-nix-derivations.md +++ b/rfcs/0096-experimental-nix-derivations.md @@ -30,11 +30,14 @@ Expected outcome: # Detailed design [design]: #detailed-design -Additional derivations `nixExperimentalFlakes` and `nixExperimentalAll`. (Possibly more if necessary) +`nixUnstable` derivation definitions should be updated in such a way so end users would be able to overwrite features with something along the lines of this: +```nix +nixUnstable.override { experimentalFeatures = ["flakes"]; } +``` -What's so special about these derivations: -- Experimental features enabled by default. Much like [this](https://github.com/NixOS/nixpkgs/pull/120141) PR. -- When using these derivations it shows a warning. +What's so special about this override: +- Makes specified experimental features enabled by default. (A little similar to [this](https://github.com/NixOS/nixpkgs/pull/120141) PR) +- When using these overwritten derivations warning should be shown. Warning expected to look something like this: @@ -70,9 +73,9 @@ Not doing this would preserve a lack of visibility. Especially when using projec [unresolved]: #unresolved-questions How exactly warning should look like? +How exactly `experimentalFeatures` feature flag should be implemented? (Via CLI argument? Env variable? Dynamically generated patch/sed?) # Future work [future]: #future-work Removal/Deprecation of Nix experimental packages on a per case basis. - From 56d4faf53bb273d6de54ebdccf07d97a683bc43f Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 22 Jul 2021 18:52:42 +0200 Subject: [PATCH 4/9] Add shepherds --- rfcs/0096-experimental-nix-derivations.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rfcs/0096-experimental-nix-derivations.md b/rfcs/0096-experimental-nix-derivations.md index 57a695738..22168ae14 100644 --- a/rfcs/0096-experimental-nix-derivations.md +++ b/rfcs/0096-experimental-nix-derivations.md @@ -3,8 +3,8 @@ feature: experimental-nix-derivations start-date: 2021-06-25 author: gytis-ivaskevicius co-authors: -shepherd-team: -shepherd-leader: +shepherd-team: niksnut, blaggacao, maljub01, nrdxp +shepherd-leader: niksnut related-issues: --- From 001c47134a63b8480f0db9209277f78d5a3d5685 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 22 Jul 2021 18:53:28 +0200 Subject: [PATCH 5/9] Fix shepherd --- rfcs/0096-experimental-nix-derivations.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rfcs/0096-experimental-nix-derivations.md b/rfcs/0096-experimental-nix-derivations.md index 22168ae14..6ed8eccc1 100644 --- a/rfcs/0096-experimental-nix-derivations.md +++ b/rfcs/0096-experimental-nix-derivations.md @@ -3,8 +3,8 @@ feature: experimental-nix-derivations start-date: 2021-06-25 author: gytis-ivaskevicius co-authors: -shepherd-team: niksnut, blaggacao, maljub01, nrdxp -shepherd-leader: niksnut +shepherd-team: edolstra, blaggacao, maljub01, nrdxp +shepherd-leader: edolstra related-issues: --- From 98b5ed7c33e986943efa20a3aa17505709935cc9 Mon Sep 17 00:00:00 2001 From: Gytis Ivaskevicius Date: Thu, 18 Nov 2021 20:13:37 +0200 Subject: [PATCH 6/9] Update rfcs/0096-experimental-nix-derivations.md --- rfcs/0096-experimental-nix-derivations.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/rfcs/0096-experimental-nix-derivations.md b/rfcs/0096-experimental-nix-derivations.md index 6ed8eccc1..6b9a6c0fd 100644 --- a/rfcs/0096-experimental-nix-derivations.md +++ b/rfcs/0096-experimental-nix-derivations.md @@ -45,10 +45,7 @@ Warning expected to look something like this: WARNING: You are using experimental Nix features which are up to a subject to change. For more information visit https://nixos.org/xyz ``` -A webpage is expected to contain information as such: -- Support channels if any. -- A little rundown of the current state of the feature(s). -- Some "URL dump" kind of wiki page that that would contain a list of links to issues with existing bugs/workarounds/edge-cases. +Currently, experimental features are undiscoverable and undocumented. It would be nice if there was a way to query which experimental features are available in a Nix release, and to get some documentation about them (like a link to an associated RFC and possibly links to additional resources) # Examples and Interactions [examples-and-interactions]: #examples-and-interactions From 81fcc230b645ae1acc037a5eb7ce4b69b9b2730c Mon Sep 17 00:00:00 2001 From: Gytis Ivaskevicius Date: Thu, 18 Nov 2021 20:13:46 +0200 Subject: [PATCH 7/9] Update rfcs/0096-experimental-nix-derivations.md --- rfcs/0096-experimental-nix-derivations.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/rfcs/0096-experimental-nix-derivations.md b/rfcs/0096-experimental-nix-derivations.md index 6b9a6c0fd..0e032ce10 100644 --- a/rfcs/0096-experimental-nix-derivations.md +++ b/rfcs/0096-experimental-nix-derivations.md @@ -30,13 +30,14 @@ Expected outcome: # Detailed design [design]: #detailed-design -`nixUnstable` derivation definitions should be updated in such a way so end users would be able to overwrite features with something along the lines of this: -```nix -nixUnstable.override { experimentalFeatures = ["flakes"]; } -``` +`nix` derivation definitions should be updated in such a way so end users would be able to overwrite features with something along the lines of this: +\```nix +nix.override { experimentalFeatures = ["flakes"]; } +\``` What's so special about this override: -- Makes specified experimental features enabled by default. (A little similar to [this](https://github.com/NixOS/nixpkgs/pull/120141) PR) +- Passes configure flag which looks something like this: `--with-experimental-features="nix-command flakes"` +- Allows building `nix` with selected features enabled by the default - When using these overwritten derivations warning should be shown. From 538397ca4294fead8034bad97f7faa29cdebd850 Mon Sep 17 00:00:00 2001 From: Gytis Ivaskevicius Date: Thu, 18 Nov 2021 20:13:52 +0200 Subject: [PATCH 8/9] Update rfcs/0096-experimental-nix-derivations.md --- rfcs/0096-experimental-nix-derivations.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rfcs/0096-experimental-nix-derivations.md b/rfcs/0096-experimental-nix-derivations.md index 0e032ce10..33356f747 100644 --- a/rfcs/0096-experimental-nix-derivations.md +++ b/rfcs/0096-experimental-nix-derivations.md @@ -60,7 +60,8 @@ likely to make multiple peeps question their decisions. # Drawbacks [drawbacks]: #drawbacks -I can't think of any drawbacks. +- In case of addition of 'warning' - it may end up being bothersome + # Alternatives [alternatives]: #alternatives From 13a485ac80506b11ab1c98afdfee40709e35ccda Mon Sep 17 00:00:00 2001 From: Gytis Ivaskevicius Date: Thu, 18 Nov 2021 20:14:54 +0200 Subject: [PATCH 9/9] Fix formatting --- rfcs/0096-experimental-nix-derivations.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rfcs/0096-experimental-nix-derivations.md b/rfcs/0096-experimental-nix-derivations.md index 33356f747..f39fa8362 100644 --- a/rfcs/0096-experimental-nix-derivations.md +++ b/rfcs/0096-experimental-nix-derivations.md @@ -31,9 +31,9 @@ Expected outcome: [design]: #detailed-design `nix` derivation definitions should be updated in such a way so end users would be able to overwrite features with something along the lines of this: -\```nix +```nix nix.override { experimentalFeatures = ["flakes"]; } -\``` +``` What's so special about this override: - Passes configure flag which looks something like this: `--with-experimental-features="nix-command flakes"`