diff --git a/nixos/default.nix b/nixos/default.nix index 471adb4e65ae25f800efd3f4bb43c23d27a64d6d..6b21845519a995182a1e12d53a58c7c273ab629f 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -5,15 +5,18 @@ with builtins; let - defaultChannel = (import channels/nixos-unstable); + # defaultChannel :: path (channel) + defaultChannel = loadChannel "nixos-unstable"; # helpers :: { *: ? } helpers = import ./helpers.nix; # channelsDir :: path channelsDir = ./channels; - # allChannels :: { *: path } - allChannels = with helpers; keysToAttrs (channelname: import (channelsDir + "/${channelname}") channelname) (readFilterDir (filterAnd [(not filterDirHidden) filterDirDirs]) channelsDir); + # loadChannel :: string -> path (channel) + loadChannel = name: import (channelsDir + "/${name}") name; + # allChannels :: { *: path (channel) } + allChannels = with helpers; keysToAttrs loadChannel (readFilterDir (filterAnd [(not filterDirHidden) filterDirDirs]) channelsDir); # getMachineChannel :: string -> path getMachineChannel = { name, path }: let