Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion examples/devos/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,13 @@
};
nixpkgs-darwin-stable = {
imports = [ (digga.lib.importOverlays ./overlays) ];
overlays = [ ];
overlays = [
# TODO: restructure overlays directory for per-channel overrides
# `importOverlays` will import everything under the path given
(channels: final: prev: {
inherit (channels.latest) mas;
} // prev.lib.optionalAttrs true { })
];
};
latest = { };
};
Expand Down
4 changes: 4 additions & 0 deletions examples/devos/hosts/darwin/Mac.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@
{
imports = with suites;
base;

# The `mas` package is included here as a test for platform-specific package
# support in Digga. Feel free to remove it in your config.
environment.systemPackages = with pkgs; [mas];
}
7 changes: 4 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
devshell.url = "github:numtide/devshell";
devshell.inputs.nixpkgs.follows = "nixpkgs";

flake-utils-plus.url = "github:gytis-ivaskevicius/flake-utils-plus";
flake-utils-plus.url = "github:gytis-ivaskevicius/flake-utils-plus/?ref=refs/pull/120/head";

flake-compat = {
url = "github:edolstra/flake-compat";
Expand Down
7 changes: 6 additions & 1 deletion src/mkFlake/fup-adapter.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,12 @@ let
})
];

unifyOverlays = channels: map (o: if builtins.isFunction (o null null) then o channels else o);
unifyOverlays = channels:
let
getChannel = inputs."${channelName}".legacyPackages.x86_64-linux;
channelName = builtins.elemAt (builtins.attrNames channels) 0;
in
map (o: if builtins.isFunction (o getChannel getChannel) then o channels else o);

stripChannel = channel: removeAttrs channel [
# arguments in our channels api that shouldn't be passed to fup
Expand Down