diff --git a/flake.nix b/flake.nix index 7e2c634..519c1ba 100644 --- a/flake.nix +++ b/flake.nix @@ -6,6 +6,7 @@ outputs = { self, flake-utils }: let inherit (builtins) isList isAttrs mapAttrs; + inherit (flake-utils.lib) defaultSystems eachSystemMap; fupArgs = { flake-utils-plus = self; }; mkFlake = import ./lib/mkFlake.nix fupArgs; @@ -22,7 +23,7 @@ nixosModules.autoGenFromInputs = import ./lib/options.nix; darwinModules.autoGenFromInputs = import ./lib/options.nix; - devShell.x86_64-linux = import ./devShell.nix { system = "x86_64-linux"; }; + devShell = eachSystemMap defaultSystems (system: import ./devShell.nix { inherit system; }); lib = flake-utils.lib // { inherit mkFlake exportModules exportOverlays exportPackages genPkgOverlay; diff --git a/tests/hosts-config/flake.nix b/tests/hosts-config/flake.nix index 555e67e..5be7342 100644 --- a/tests/hosts-config/flake.nix +++ b/tests/hosts-config/flake.nix @@ -1,7 +1,8 @@ { inputs.utils.url = path:../../; + inputs.nix-darwin.url = github:LnL7/nix-darwin?ref=2f2bdf658d2b79bada78dc914af99c53cad37cba; - outputs = inputs@{ self, nixpkgs, utils }: + outputs = inputs@{ self, nixpkgs, nix-darwin, utils }: let base-nixos = { boot.loader.grub.devices = [ "nodev" ]; @@ -31,7 +32,6 @@ specialArgs.sharedSpecialArg = "sharedSpecialArg"; modules = [ - base-nixos # Assigning to lib.* so we could assert these options in checks ({ sharedExtraArg, sharedSpecialArg, ... }: { lib = { inherit sharedExtraArg sharedSpecialArg; }; @@ -39,11 +39,12 @@ ]; }; - hosts.Plain = { }; + hosts.Plain.modules = [ base-nixos ]; - hosts."com.example.myhost" = { }; + hosts."com.example.myhost".modules = [ base-nixos ]; hosts.WithFakeBuilder = { + modules = [ base-nixos ]; builder = args: { fakeBuilder = "fakeBuilder"; }; }; @@ -53,6 +54,7 @@ channelName = "unstable"; extraArgs.hostExtraArg = "hostExtraArg"; specialArgs.hostSpecialArg = "hostSpecialArg"; + builder = nix-darwin.lib.darwinSystem; # Assigning to lib.* so we could assert these options in checks modules = [ @@ -83,7 +85,7 @@ reverseDnsHostDomain = reverseDnsHost.config.networking.domain; customizedHost = self.darwinConfigurations.Customized; - customizedHostPkgs = customizedHost.config.nixpkgs.pkgs; + customizedHostPkgs = customizedHost.pkgs; in {