nix-on-droid icon indicating copy to clipboard operation
nix-on-droid copied to clipboard

[WIP] nix.nix: split, align and reuse macros from NixOS

Open ShamrockLee opened this issue 1 year ago • 1 comments

This PR demonstrates the possibility to reuse/inherit NixOS macros.

The original Nix-related options and config in the NixOS modules are mostly inside nixos/modules/services/system/nix-daemon.nix, making it hard to reuse without also getting those privilege-required part of implementation. The good news is that the configuration-related part has been split out and become nixos/modules/config/nix.nix, nixos/modules/config/nix-flakes.nix, nixos/modules/config/nix-channel.nix and nixos/modules/config/nix-remote-build.nix, making it much easier to reuse.

This PR first align the behavior of nix.nix with the NixOS upstream, and then split out nix-flakes.nix and nix-channel.nix. Finally, it imports the upstream nix.nix and nix-flakes.nix to replace the local interface and implementation.

ShamrockLee avatar Feb 15 '24 21:02 ShamrockLee

fakedroid now builds and runs.

The check failure might indicate the need to update the test interface (to supply with the nixpkgs argument, etc.).

@t184256 Could you give me some hint where the test cases resides and which file is likely to be responsible for injecting the arguments?

ShamrockLee avatar Feb 19 '24 05:02 ShamrockLee