nix-on-droid
nix-on-droid copied to clipboard
[WIP] nix.nix: split, align and reuse macros from NixOS
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.
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?