Dendritic Nix - Community-driven Nix distribution based on the Dendritic pattern.
5
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix spacing

+22 -12
+21 -11
dev/elm/src/Results.elm
··· 4 4 import Data 5 5 import Deco 6 6 import Dict exposing (Dict) 7 - import Html exposing (Html, button, code, div, pre, text) 7 + import Html exposing (Html, button, code, div, p, pre, text) 8 8 import Html.Attributes exposing (class, id) 9 9 import Html.Events exposing (onClick) 10 10 import Json.Decode as D ··· 99 99 dict 100 100 ) 101 101 Dict.empty 102 + 103 + aspectCount = 104 + Dict.keys aspectClassMap |> List.length |> String.fromInt 105 + 106 + classesCount = 107 + Dict.values aspectClassMap |> List.concatMap identity |> List.Extra.unique |> List.length |> String.fromInt 102 108 in 103 109 [ div [] [ button [ onClick ClearFilters ] [ text "Reset filters" ] ] 104 - , div [] 105 - ([ text (String.fromInt totalFiles ++ " files\n") 106 - , text "contaning the following aspects:\n" 107 - ] 108 - ++ viewAspectSummary aspectClassMap 109 - ) 110 - , viewUsage model.repos 110 + , p [] 111 + [ text (String.fromInt totalFiles ++ " nix files\n") 112 + , text ("contaning the following " ++ aspectCount ++ " aspects across " ++ classesCount ++ " configuration classes:\n") 113 + ] 114 + , p [] (viewAspectSummary aspectClassMap) 115 + , p [] 116 + [ text "Add the following to your " 117 + , code [] [ text "flake.nix" ] 118 + , text " to include these configuration modules." 119 + ] 120 + , viewUsageCode model.repos 111 121 ] 112 122 113 123 ··· 126 136 ) 127 137 128 138 129 - viewUsage : List Data.Repository -> Html msg 130 - viewUsage repos = 139 + viewUsageCode : List Data.Repository -> Html msg 140 + viewUsageCode repos = 131 141 pre [ id "dendrix-usage" ] 132 142 [ code [ class "language-nix" ] 133 143 [ let ··· 142 152 trees 143 153 144 154 codes = 145 - [ """# Usage in your flake: 155 + [ """# flake.nix 146 156 { 147 157 outputs = inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } 148 158 (inputs.import-tree [
+1 -1
dev/modules/devshell.nix
··· 17 17 { 18 18 name = "book"; 19 19 help = "serve dev/book"; 20 - command = "elm-build && ${pkgs.mdbook}/bin/mdbook serve dev/book"; 20 + command = "elm-check && elm-build && ${pkgs.mdbook}/bin/mdbook serve dev/book"; 21 21 } 22 22 ]; 23 23 };