Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[READY] nix.treewide: remove flake-parts #800

Merged
merged 15 commits into from
Nov 27, 2024

Conversation

djacu
Copy link
Contributor

@djacu djacu commented Nov 25, 2024

Description of PR

Removes flake parts and restructures the nix sections of the repository.

Previous Behavior

Absolute chaos

New Behavior

Bringing structure and order to the architecture of the nix code.
The hope is that this PR is effectively a no-op and the packages, NixOS configurations, and checks are the same.
Testing in comments below found that the only remaining differences are NixOS system closures revolving around:

  • berkhan being added as a user to all systems
  • system packages being different which is very likely attributed to berkhan being added (e.g. a single new instance of bash showed up) OR system packages being strings and order had changed for no reason (using jd confirmed that the package set was identical in the few cases that were tested)
  • the hostname changed because now there is a default for all hosts

Tests

nix flake check
Lots more see below

djacu added 11 commits November 23, 2024 15:33
Create a new home for nixos modules. Moved most of them over. Gated
them all behind enable flags.
Create a new home for nixos configurations. Moved them all over.
Move pkgs to packages and follow the by-name schema from upstream.
Create overlays for all the packages and expose them in the flake
outputs. Use the overlays to create an exposed legacy-packages output.

Had to modify the devshells and test for now because they were causing
failures.
Create a new home for devShells. Moved them all over and created new
individual ones for smaller package sets.
Flatten the flake inputs. Makes it easier to see all inputs at once when
they are sorted.
Change the legacyPackages to us nixpkgs and not nixpkgs-unstable. Unless
for good reason, when using nixpkgs from inputs, it should use the
nixpkgs input which can be rebound to any other input. But it stays
consistent across its use in the repository.
Since legacyPackages is now bound to the nixpkgs input, it can be used
in other places like devShells. If another package set is needed, it can
be brought into scope but the default one bound to `pkgs` should come
from legacyPackages as it will have the necessary local overlays.
Created a new home for checks. Moved them all over.
flake-parts is no longer necessary and has been removed.
Removing leftover directories from the flake-parts migration.
An old file from the flake-parts migration was still being referenced
and was removed near the end of the clean up. The `loghost` NixOS
configuration has now been split so the test can refer to the since
configuration as before and the host can still be built as normal.
@djacu
Copy link
Contributor Author

djacu commented Nov 25, 2024

small PR
didn't change much :P

Missed one more file from the flake-parts migration.
Added the locally provided packages back as flake outputs.
This is how they are accessed and build in github CI.
@djacu djacu changed the title nix.treewide: remove flake-parts [REVIEW] nix.treewide: remove flake-parts Nov 26, 2024
While removing flake-parts, this input got bumped and is changing the
closures for packages and nixos systems. One of the goals during the
migration from flake-parts was to not have the closures change,
effectively a no-op. This input is being pinned so closures can be
compared between this branch and master to verify closures have not
changed.
@djacu
Copy link
Contributor Author

djacu commented Nov 26, 2024

A script has been written to compare the closures of all the packages and nixos systems listed below.

> cat closure-compare.sh      
my_array=(
  "massflash"
  "serverspec"
  "scaleInventory"
  "nixosConfigurations.bootstrapImage.config.system.build.toplevel"
  "nixosConfigurations.cache.config.system.build.toplevel"
  "nixosConfigurations.coreMaster.config.system.build.toplevel"
  "nixosConfigurations.coreSlave.config.system.build.toplevel"
  "nixosConfigurations.devServer.config.system.build.toplevel"
  "nixosConfigurations.hypervisor1.config.system.build.toplevel"
  "nixosConfigurations.hypervisor2.config.system.build.toplevel"
  "nixosConfigurations.loghost.config.system.build.toplevel"
  "nixosConfigurations.massflash.config.system.build.toplevel"
  "nixosConfigurations.monitor.config.system.build.toplevel"
  "nixosConfigurations.signs.config.system.build.toplevel"
)

currentBranch="djacu/remove-flake-parts"

for attrPath in "${my_array[@]}"; do
  echo "$attrPath"
  git switch -q master
  nix eval .\#"$attrPath".drvPath
  git switch -q "$currentBranch"
  nix eval .\#"$attrPath".drvPath
  echo ""
done

Here is the output from running the script as of commit 960ce8a
All packages have identical derivations.
All nixos systems have differing derivations. These will be investigated.

> ./closure-compare.sh
massflash
"/nix/store/npbypaazrs3c1w7r22wfxwyhrqi9da34-massflash.drv"
"/nix/store/npbypaazrs3c1w7r22wfxwyhrqi9da34-massflash.drv"

serverspec
"/nix/store/36gi6ig093skz6qvgghm826dgga9qzsy-serverspec.drv"
"/nix/store/36gi6ig093skz6qvgghm826dgga9qzsy-serverspec.drv"

scaleInventory
"/nix/store/ypfmidmvag36m79iyx11lan5j2wkykj3-scaleInventory.drv"
"/nix/store/ypfmidmvag36m79iyx11lan5j2wkykj3-scaleInventory.drv"

nixosConfigurations.bootstrapImage.config.system.build.toplevel
"/nix/store/ii7hiz8rg5af13wzckr2j65vvd53amdx-nixos-system-nixos-24.05.20241009.d51c286.drv"
"/nix/store/1fj68fj0iyk0clp441aapn4md1dnvan1-nixos-system-bootstrap-image-24.05.20241009.d51c286.drv"

nixosConfigurations.cache.config.system.build.toplevel
"/nix/store/v9s7fyl6if1265xg31lr5117l4fk48nj-nixos-system-cache-24.05.20241009.d51c286.drv"
"/nix/store/6y7kyaf4rjpib6cx2acfwvfpg2f958b0-nixos-system-cache-24.05.20241009.d51c286.drv"

nixosConfigurations.coreMaster.config.system.build.toplevel
"/nix/store/gr497xjzacpf1d3ng7kn9j7sv2k1cccw-nixos-system-coremaster-24.05.20241009.d51c286.drv"
"/nix/store/ncbgzrm3nb5995q1zr23905bdilsyysa-nixos-system-coremaster-24.05.20241009.d51c286.drv"

nixosConfigurations.coreSlave.config.system.build.toplevel
"/nix/store/bhvr2c5xhr6slbgynps2dn7mflg962kp-nixos-system-coreslave-24.05.20241009.d51c286.drv"
"/nix/store/c3yqwnsxp2mfvkjdmac4cayrr5zwq1v5-nixos-system-coreslave-24.05.20241009.d51c286.drv"

nixosConfigurations.devServer.config.system.build.toplevel
"/nix/store/k61k9flcr0rap7csig785ml39wd420f3-nixos-system-nixos-24.05.20241009.d51c286.drv"
"/nix/store/hn353g2cwfbzm3067c39q86xjdbxz5g1-nixos-system-dev-server-24.05.20241009.d51c286.drv"

nixosConfigurations.hypervisor1.config.system.build.toplevel
"/nix/store/i5y71ybc8nr6vnkbqndq3ylhy6canniv-nixos-system-nixos-24.05.20241009.d51c286.drv"
"/nix/store/0ass3v4qar1c9yp881lmfydfzvghyvn8-nixos-system-hypervisor1-24.05.20241009.d51c286.drv"

nixosConfigurations.hypervisor2.config.system.build.toplevel
"/nix/store/zwnbrs40lgvpnfgah46qafzq98hm702b-nixos-system-nixos-24.05.20241009.d51c286.drv"
"/nix/store/1ppyi7si7hz6x4bqikms9pk310nwccd5-nixos-system-hypervisor2-24.05.20241009.d51c286.drv"

nixosConfigurations.loghost.config.system.build.toplevel
"/nix/store/asrn05w714bb2nhm5x2h3m9gljcs62fk-nixos-system-nixos-24.05.20241009.d51c286.drv"
"/nix/store/4iricdywiq5pl453zg921cymngs4fq6n-nixos-system-loghost-24.05.20241009.d51c286.drv"

nixosConfigurations.massflash.config.system.build.toplevel
"/nix/store/q1ic3m9jizglwbg5j61r5gf00gg4g458-nixos-system-massflash-24.05.20241009.d51c286.drv"
"/nix/store/vlv5v250k5daq2dnhj3bzn7p5dnsrg2f-nixos-system-massflash-24.05.20241009.d51c286.drv"

nixosConfigurations.monitor.config.system.build.toplevel
"/nix/store/giyxwraih51pilcprqvz31msml8jl0n4-nixos-system-monitor-24.05.20241009.d51c286.drv"
"/nix/store/vx021gijq5f0c4575jq4na4ffifs0c36-nixos-system-monitor-24.05.20241009.d51c286.drv"

nixosConfigurations.signs.config.system.build.toplevel
"/nix/store/hzcx0rj654hsdmx4v7zz0y749d74w1k5-nixos-system-nixos-24.05.20241009.d51c286.drv"
"/nix/store/6ijq714jjcpprgm9xph6zivs97b9b6k4-nixos-system-signs-24.05.20241009.d51c286.drv"

@djacu
Copy link
Contributor Author

djacu commented Nov 26, 2024

Reviewing the signs nixos system, there are 3 differences.

  1. The hostname
  2. The users
  3. The packages

The hostname differs because it was previously unset and defaults to nixos. Now all system closures set a hostname that matches the directory where the configuration is stored.

The users differ because of the addition of berkhan to all nixos systems.

> git switch master
> nix eval .\#nixosConfigurations.signs.config.users.users --json > old.json
> git switch djacu/remove-flake-parts
> nix eval .\#nixosConfigurations.signs.config.users.users --json > new.json
> diff <(jq --sort-keys . old.json) <(jq --sort-keys . new.json)
1a2,41
>   "berkhan": {
>     "autoSubUidGidRange": true,
>     "createHome": true,
>     "cryptHomeLuks": null,
>     "description": "",
>     "expires": null,
>     "extraGroups": [
>       "wheel"
>     ],
>     "group": "users",
>     "hashedPassword": null,
>     "hashedPasswordFile": null,
>     "home": "/home/berkhan",
>     "homeMode": "700",
>     "ignoreShellProgramCheck": false,
>     "initialHashedPassword": null,
>     "initialPassword": null,
>     "isNormalUser": true,
>     "isSystemUser": false,
>     "linger": false,
>     "name": "berkhan",
>     "openssh": {
>       "authorizedKeys": {
>         "keyFiles": [],
>         "keys": [
>           "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH6UhZ/oPqiFzCOxoZWeUqeGZCVLLNQbHH3uuIa6PCTz"
>         ]
>       },
>       "authorizedPrincipals": []
>     },
>     "packages": [],
>     "pamMount": {},
>     "password": null,
>     "passwordFile": null,
>     "shell": "/nix/store/1av86b17lymgk29s85nhgxsmfvmxympz-bash-interactive-5.2p32",
>     "subGidRanges": [],
>     "subUidRanges": [],
>     "uid": 2100,
>     "useDefaultShell": true
>   },

The packages differ most likely because of the addition of berkhan. You can see it has the same nix store path as the shell attribute above.

> git switch master
> nix eval .\#nixosConfigurations.signs.config.system.path.pkgs --json | jq '. | fromjson' > old.json
> git switch djacu/remove-flake-parts
> nix eval .\#nixosConfigurations.signs.config.system.path.pkgs --json | jq '. | fromjson' > new.json
> diff <(jq --sort-keys . old.json) <(jq --sort-keys . new.json)
449a450,456
>       "/nix/store/1av86b17lymgk29s85nhgxsmfvmxympz-bash-interactive-5.2p32",
>       "/nix/store/9kwv0awas93y7fsfscfdilfc7zk5ibk5-bash-interactive-5.2p32-man"
>     ],
>     "priority": 5
>   },
>   {
>     "paths": [

@djacu
Copy link
Contributor Author

djacu commented Nov 26, 2024

The monitor system alleges to have changes in the system path packages but comparing the differences as was done above shows no difference I can see.

> diff <(jq --sort-keys . old.json) <(jq --sort-keys . new.json)
3a4,23
>       "/nix/store/nz9s8hw4v8lv9a315kppqlixail8nrgk-vim-9.1.0707",
>       "/nix/store/2i2d495si9dygvzaskwyrvxaxkvi9k55-vim-9.1.0707-xxd"
>     ],
>     "priority": 5
>   },
>   {
>     "paths": [
>       "/nix/store/vdd8ccp9x69v7kp5g9khq7j43n6dqf16-git-2.44.1"
>     ],
>     "priority": 5
>   },
>   {
>     "paths": [
>       "/nix/store/w0k2k9x26wzv18c3zkvgcg3zqksq4mln-binutils-wrapper-2.41",
>       "/nix/store/2jq4kzrf5nbdxk7pzwi8di07h4f4a0ix-binutils-wrapper-2.41-man"
>     ],
>     "priority": 10
>   },
>   {
>     "paths": [
182,201d201
<   },
<   {
<     "paths": [
<       "/nix/store/nz9s8hw4v8lv9a315kppqlixail8nrgk-vim-9.1.0707",
<       "/nix/store/2i2d495si9dygvzaskwyrvxaxkvi9k55-vim-9.1.0707-xxd"
<     ],
<     "priority": 5
<   },
<   {
<     "paths": [
<       "/nix/store/vdd8ccp9x69v7kp5g9khq7j43n6dqf16-git-2.44.1"
<     ],
<     "priority": 5
<   },
<   {
<     "paths": [
<       "/nix/store/w0k2k9x26wzv18c3zkvgcg3zqksq4mln-binutils-wrapper-2.41",
<       "/nix/store/2jq4kzrf5nbdxk7pzwi8di07h4f4a0ix-binutils-wrapper-2.41-man"
<     ],
<     "priority": 10

@djacu
Copy link
Contributor Author

djacu commented Nov 26, 2024

massflash, loghost, hypervisor2, coreSlave, cache, and bootstrapImage appear to have the same differences in hostname, users, and system path packages as signs. This was not thoroughly checked but the outputs of nix-diff appear similar and can easily be explained by the addition of berkhan.

hypervisor1, devServer, coreMaster, potentially have significant differences.

Copy link
Member

@kylerisse kylerisse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@djacu Here is my testing output. nix flake check worked but had the warnings below. nix develop also worked. Not sure if those warnings are important. I included a nix-info output as it might be something related to 24.11 or my version of cppnix. @sarcasticadmin will likely have more comprehensive testing but so far it doesn't appear anything broke at a high level. Please let me know if there's anything specific you want tested.

kylerisse@watson ~/g/s/g/k/scale-network (djacu/remove-flake-parts) [SIGHUP]> nix flake check
warning: unknown flake output 'formatterModule'
warning: unknown flake output 'library'
warning: In a derivation named 'neovim-unwrapped-0.9.5', 'structuredAttrs' disables the effect of the derivation attribute 'disallowedRequisites'; use 'outputChecks.<output>.disallowedRequisites' instead
warning: In a derivation named 'neovim-unwrapped-0.9.5', 'structuredAttrs' disables the effect of the derivation attribute 'disallowedRequisites'; use 'outputChecks.<output>.disallowedRequisites' instead
warning: In a derivation named 'neovim-unwrapped-0.9.5', 'structuredAttrs' disables the effect of the derivation attribute 'disallowedRequisites'; use 'outputChecks.<output>.disallowedRequisites' instead
warning: In a derivation named 'neovim-unwrapped-0.9.5', 'structuredAttrs' disables the effect of the derivation attribute 'disallowedRequisites'; use 'outputChecks.<output>.disallowedRequisites' instead
warning: In a derivation named 'neovim-unwrapped-0.9.5', 'structuredAttrs' disables the effect of the derivation attribute 'disallowedRequisites'; use 'outputChecks.<output>.disallowedRequisites' instead
warning: In a derivation named 'neovim-unwrapped-0.9.5', 'structuredAttrs' disables the effect of the derivation attribute 'disallowedRequisites'; use 'outputChecks.<output>.disallowedRequisites' instead
warning: In a derivation named 'neovim-unwrapped-0.9.5', 'structuredAttrs' disables the effect of the derivation attribute 'disallowedRequisites'; use 'outputChecks.<output>.disallowedRequisites' instead
warning: In a derivation named 'neovim-unwrapped-0.9.5', 'structuredAttrs' disables the effect of the derivation attribute 'disallowedRequisites'; use 'outputChecks.<output>.disallowedRequisites' instead
warning: In a derivation named 'neovim-unwrapped-0.9.5', 'structuredAttrs' disables the effect of the derivation attribute 'disallowedRequisites'; use 'outputChecks.<output>.disallowedRequisites' instead
warning: In a derivation named 'neovim-unwrapped-0.9.5', 'structuredAttrs' disables the effect of the derivation attribute 'disallowedRequisites'; use 'outputChecks.<output>.disallowedRequisites' instead
warning: In a derivation named 'neovim-unwrapped-0.9.5', 'structuredAttrs' disables the effect of the derivation attribute 'disallowedRequisites'; use 'outputChecks.<output>.disallowedRequisites' instead
warning: The check omitted these incompatible systems: aarch64-darwin, aarch64-linux, x86_64-darwin
Use '--all-systems' to check all.
kylerisse@watson ~/g/s/g/k/scale-network (djacu/remove-flake-parts)> nix shell nixpkgs#nix-info --command nix-info -m
 - system: `"x86_64-linux"`
 - host os: `Linux 6.11.7, NixOS, 24.11 (Vicuna), 24.11.20241116.057f63b`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.24.10`
 - channels(root): `"nixos"`
 - nixpkgs: `/nix/store/idq1bmwwy9rlkc21hccvx42wlwpxsx1f-source`

kylerisse@watson ~/g/s/g/k/scale-network (djacu/remove-flake-parts)> git lsha
960ce8a26aeae941cf13828d3464d38ff77a8acd
kylerisse@watson ~/g/s/g/k/scale-network (djacu/remove-flake-parts)> nix develop
[nix-flakes scale-network] $ exit
exit

@djacu
Copy link
Contributor Author

djacu commented Nov 27, 2024

@kylerisse thanks for review the changes. @sarcasticadmin and I aren't seeing the warnings about neovim-unwrapped. Here is the output for nix flake check from me.

djacu@malachite:~/dev/socallinuxexpo/scale-network/ > nix flake check                                                                                      
warning: unknown flake output 'formatterModule'
warning: unknown flake output 'library'
warning: The check omitted these incompatible systems: aarch64-darwin, aarch64-linux, x86_64-darwin
Use '--all-systems' to check all.
djacu@malachite:~/dev/socallinuxexpo/scale-network/ > rg neovim    
djacu@malachite:~/dev/socallinuxexpo/scale-network/ > rg nvim  
djacu@malachite:~/dev/socallinuxexpo/scale-network/ > rg unwrapped

The neovim-unwrapped warning seems to be an upstream issue. I found a downstream issue related to it here. nix-community/nixvim#2037

The other warnings I got are nothing to be concerned about. unknown flake outputs are because we have flake outputs that are not part of the default flake schema. The omitted systems are because we only ran checks that are native to the host.

@djacu
Copy link
Contributor Author

djacu commented Nov 27, 2024

@kylerisse are you using neovim-unwrapped in your system?

devServer and hypervisor1 had configurations that were different from
how they were on master before the flake-parts migration. Fixed these
and checked the closure differences with @sarcasticadmin. Now the only
apparent difference besides dumb system packages strings is coreMaster's
bind serial number which is expected to be different.
Copy link
Member

@sarcasticadmin sarcasticadmin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I paired with @djacu and we worked through any of the outstanding diffs. This is by and large a no-op (thank you @djacu for going above and beyond on this front).

@socallinuxexpo/tech If anyone wants to give this a review, feel free to try building locally with: nix flake check -L 🚀

@MatthewCroughan
Copy link
Collaborator

Not sure what the argument for removing flake parts is. I don't like to see code implementation spat out in front of my face. I say that as someone who used the genAttrs pattern for years before finding that flake.parts was worth using, compared to things like flake-utils which still spit the implementation out in your face often. I think you'll re-introduce flake.parts before long, once you realise that you need the module system for the scale of this repo.

@djacu
Copy link
Contributor Author

djacu commented Nov 27, 2024

  1. I like being spit on my face ;)
  2. This is part of a larger effort to bring better organization and structure to the repository. Looking back on the PR that added flake-parts, it did simply some of the structure, but did not fix many underlying organizational issues. @sarcasticadmin, @kylerisse, and myself don't have a good handle on flake-parts yet and it is easier to architect the repository into a better state using plain nix code for now. It is on my list to learn and something we can look at in the future when the repository is in a better state.

@MatthewCroughan
Copy link
Collaborator

Yeah awesome, it's about what works for the people doing the active work on the repo. I can help re-introduce it again in the future, if the need arises, which I think it will.

@djacu
Copy link
Contributor Author

djacu commented Nov 27, 2024

Thanks man. We'll definitely be calling on you for your expertise 🙏

@kylerisse
Copy link
Member

@kylerisse are you using neovim-unwrapped in your system?

had neovim on the system, removed it to test this, same thing. i didn't consider my local system beyond what I pasted from nix-info but you're probably right that it's something specific to my config if nobody can recreate it. just weird that it happens even after removing neovim, and also I don't explicitly use neovim-unwrapped.

Here's more verbose output:

> nix flake check -L --verbose
(...omit for brevity...)
checking flake output 'formatter'...
checking flake output 'formatterModule'...
warning: unknown flake output 'formatterModule'
checking flake output 'legacyPackages'...
checking flake output 'library'...
warning: unknown flake output 'library'
checking flake output 'nixosConfigurations'...
checking NixOS configuration 'nixosConfigurations.loghost'...
warning: In a derivation named 'neovim-unwrapped-0.9.5', 'structuredAttrs' disables the effect of the derivation attribute 'disallowedRequisites'; use 'outputChecks.<output>.disallowedRequisites' instead
checking NixOS configuration 'nixosConfigurations.massflash'...
warning: In a derivation named 'neovim-unwrapped-0.9.5', 'structuredAttrs' disables the effect of the derivation attribute 'disallowedRequisites'; use 'outputChecks.<output>.disallowedRequisites' instead
checking NixOS configuration 'nixosConfigurations.monitor'...
warning: In a derivation named 'neovim-unwrapped-0.9.5', 'structuredAttrs' disables the effect of the derivation attribute 'disallowedRequisites'; use 'outputChecks.<output>.disallowedRequisites' instead
checking NixOS configuration 'nixosConfigurations.cache'...
warning: In a derivation named 'neovim-unwrapped-0.9.5', 'structuredAttrs' disables the effect of the derivation attribute 'disallowedRequisites'; use 'outputChecks.<output>.disallowedRequisites' instead
checking NixOS configuration 'nixosConfigurations.hypervisor1'...
warning: In a derivation named 'neovim-unwrapped-0.9.5', 'structuredAttrs' disables the effect of the derivation attribute 'disallowedRequisites'; use 'outputChecks.<output>.disallowedRequisites' instead
checking NixOS configuration 'nixosConfigurations.hypervisor2'...
warning: In a derivation named 'neovim-unwrapped-0.9.5', 'structuredAttrs' disables the effect of the derivation attribute 'disallowedRequisites'; use 'outputChecks.<output>.disallowedRequisites' instead
checking NixOS configuration 'nixosConfigurations.signs'...
warning: In a derivation named 'neovim-unwrapped-0.9.5', 'structuredAttrs' disables the effect of the derivation attribute 'disallowedRequisites'; use 'outputChecks.<output>.disallowedRequisites' instead
checking NixOS configuration 'nixosConfigurations.bootstrapImage'...
warning: In a derivation named 'neovim-unwrapped-0.9.5', 'structuredAttrs' disables the effect of the derivation attribute 'disallowedRequisites'; use 'outputChecks.<output>.disallowedRequisites' instead
checking NixOS configuration 'nixosConfigurations.coreMaster'...
warning: In a derivation named 'neovim-unwrapped-0.9.5', 'structuredAttrs' disables the effect of the derivation attribute 'disallowedRequisites'; use 'outputChecks.<output>.disallowedRequisites' instead
checking NixOS configuration 'nixosConfigurations.coreSlave'...
warning: In a derivation named 'neovim-unwrapped-0.9.5', 'structuredAttrs' disables the effect of the derivation attribute 'disallowedRequisites'; use 'outputChecks.<output>.disallowedRequisites' instead
checking NixOS configuration 'nixosConfigurations.devServer'...
warning: In a derivation named 'neovim-unwrapped-0.9.5', 'structuredAttrs' disables the effect of the derivation attribute 'disallowedRequisites'; use 'outputChecks.<output>.disallowedRequisites' instead
(...omit for brevity...)
> nix shell nixpkgs#nix-info --command nix-info -m
 - system: `"x86_64-linux"`
 - host os: `Linux 6.12.1, NixOS, 24.11 (Vicuna), 24.11.20241123.0c58267`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.24.10`
 - channels(root): `"nixos"`
 - nixpkgs: `/nix/store/fnbr9s78sy4islw83vsaf0hgf88hih5v-source`

Like I said initially, they're just warnings and nothing fails. I'm just perplexed that it's even related at this phase as it should be pretty sandboxed no? and neovim isn't used for SCaLE AFAIK. Nothing I'm worried about or want to spend further time on though if you two say it's OK. Let me know if you need further testing or info though.

@djacu
Copy link
Contributor Author

djacu commented Nov 27, 2024

Thanks for digging in more @kylerisse. Honestly, I was just grasping at straws when I asked about your system configuration. But I think I figured it out. It is at least partially related to the version of Nix that is being used. When I ran nix flake check before, I was using version 2.21.4. I ran nix-shell -p nixVersions.nix_2_24 which gave me version 2.24.6 which is only patch versions different than the version you were running. And when I run nix flake check with this version of Nix, I see the same warnings about neovim-unwrapped and structuredAttrs that you do. Thankfully, this just appears to be a Nix bug.

djacu@malachite:~/dev/socallinuxexpo/scale-network/ > nix-shell -p nixVersions.nix_2_24 
these 5 paths will be fetched (4.61 MiB download, 17.77 MiB unpacked):
  /nix/store/qra2k11wd0pzwbsqraml3y57v6gy37ys-libgit2-1.8.1-lib
  /nix/store/xsjggjrd33cbm5szga29c843i2vhr79j-nix-2.24.6
  /nix/store/d4qhb3kdxvvcswjv9k9csmbh3gnihv26-nix-2.24.6-dev
  /nix/store/jcih45k67ddhd6wrv1k6bwvxn61rrdhi-nix-2.24.6-man
  /nix/store/012jslm61i2424vxnzzbxqf4j9r60qzh-pcre-8.45
copying path '/nix/store/jcih45k67ddhd6wrv1k6bwvxn61rrdhi-nix-2.24.6-man' from 'https://cache.nixos.org'...
copying path '/nix/store/012jslm61i2424vxnzzbxqf4j9r60qzh-pcre-8.45' from 'https://cache.nixos.org'...
copying path '/nix/store/qra2k11wd0pzwbsqraml3y57v6gy37ys-libgit2-1.8.1-lib' from 'https://cache.nixos.org'...
copying path '/nix/store/xsjggjrd33cbm5szga29c843i2vhr79j-nix-2.24.6' from 'https://cache.nixos.org'...
copying path '/nix/store/d4qhb3kdxvvcswjv9k9csmbh3gnihv26-nix-2.24.6-dev' from 'https://cache.nixos.org'...

[nix-shell:~/dev/socallinuxexpo/scale-network]$ nix flake check
warning: unknown flake output 'formatterModule'
warning: unknown flake output 'library'
warning: In a derivation named 'neovim-unwrapped-0.9.5', 'structuredAttrs' disables the effect of the derivation attribute 'disallowedRequisites'; use 'outputChecks.<output>.disallowedRequisites' instead
warning: In a derivation named 'neovim-unwrapped-0.9.5', 'structuredAttrs' disables the effect of the derivation attribute 'disallowedRequisites'; use 'outputChecks.<output>.disallowedRequisites' instead
warning: In a derivation named 'neovim-unwrapped-0.9.5', 'structuredAttrs' disables the effect of the derivation attribute 'disallowedRequisites'; use 'outputChecks.<output>.disallowedRequisites' instead
warning: In a derivation named 'neovim-unwrapped-0.9.5', 'structuredAttrs' disables the effect of the derivation attribute 'disallowedRequisites'; use 'outputChecks.<output>.disallowedRequisites' instead
warning: In a derivation named 'neovim-unwrapped-0.9.5', 'structuredAttrs' disables the effect of the derivation attribute 'disallowedRequisites'; use 'outputChecks.<output>.disallowedRequisites' instead
warning: In a derivation named 'neovim-unwrapped-0.9.5', 'structuredAttrs' disables the effect of the derivation attribute 'disallowedRequisites'; use 'outputChecks.<output>.disallowedRequisites' instead
warning: In a derivation named 'neovim-unwrapped-0.9.5', 'structuredAttrs' disables the effect of the derivation attribute 'disallowedRequisites'; use 'outputChecks.<output>.disallowedRequisites' instead
warning: In a derivation named 'neovim-unwrapped-0.9.5', 'structuredAttrs' disables the effect of the derivation attribute 'disallowedRequisites'; use 'outputChecks.<output>.disallowedRequisites' instead
warning: In a derivation named 'neovim-unwrapped-0.9.5', 'structuredAttrs' disables the effect of the derivation attribute 'disallowedRequisites'; use 'outputChecks.<output>.disallowedRequisites' instead
warning: In a derivation named 'neovim-unwrapped-0.9.5', 'structuredAttrs' disables the effect of the derivation attribute 'disallowedRequisites'; use 'outputChecks.<output>.disallowedRequisites' instead
warning: In a derivation named 'neovim-unwrapped-0.9.5', 'structuredAttrs' disables the effect of the derivation attribute 'disallowedRequisites'; use 'outputChecks.<output>.disallowedRequisites' instead
warning: The check omitted these incompatible systems: aarch64-darwin, aarch64-linux, x86_64-darwin
Use '--all-systems' to check all.

[nix-shell:~/dev/socallinuxexpo/scale-network]$ nix --version
nix (Nix) 2.24.6

@sarcasticadmin sarcasticadmin changed the title [REVIEW] nix.treewide: remove flake-parts [READY] nix.treewide: remove flake-parts Nov 27, 2024
@sarcasticadmin
Copy link
Member

Thanks for the reviews @MatthewCroughan and @kylerisse sounds like were all the same page and this restructuring its a big improvement from where we were. flake-parts can definitely be reintroduced whenever we need it 🙂

@djacu thanks again for all the effort, Im excited to have this land in master

@sarcasticadmin sarcasticadmin merged commit 2435a08 into master Nov 27, 2024
3 checks passed
@sarcasticadmin sarcasticadmin deleted the djacu/remove-flake-parts branch November 27, 2024 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants