Show nix-shell instructions first instead of NixOS Configuration (#526)
This commit is contained in:
parent
a52737a3cc
commit
a76f3f779c
|
@ -520,21 +520,7 @@ viewResultItem nixosChannels channel showInstallDetails show item =
|
||||||
Maybe.withDefault
|
Maybe.withDefault
|
||||||
[ li
|
[ li
|
||||||
[ classList
|
[ classList
|
||||||
[ ( "active", List.member showInstallDetails [ Search.Unset, Search.ViaNixOS, Search.FromFlake ] )
|
[ ( "active", List.member showInstallDetails [ Search.Unset, Search.ViaNixShell, Search.FromFlake ] )
|
||||||
, ( "pull-right", True )
|
|
||||||
]
|
|
||||||
]
|
|
||||||
[ a
|
|
||||||
[ href "#"
|
|
||||||
, Search.onClickStop <|
|
|
||||||
SearchMsg <|
|
|
||||||
Search.ShowInstallDetails Search.ViaNixOS
|
|
||||||
]
|
|
||||||
[ text "NixOS Configuration" ]
|
|
||||||
]
|
|
||||||
, li
|
|
||||||
[ classList
|
|
||||||
[ ( "active", showInstallDetails == Search.ViaNixShell )
|
|
||||||
, ( "pull-right", True )
|
, ( "pull-right", True )
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
@ -546,6 +532,20 @@ viewResultItem nixosChannels channel showInstallDetails show item =
|
||||||
]
|
]
|
||||||
[ text "nix-shell" ]
|
[ text "nix-shell" ]
|
||||||
]
|
]
|
||||||
|
, li
|
||||||
|
[ classList
|
||||||
|
[ ( "active", showInstallDetails == Search.ViaNixOS )
|
||||||
|
, ( "pull-right", True )
|
||||||
|
]
|
||||||
|
]
|
||||||
|
[ a
|
||||||
|
[ href "#"
|
||||||
|
, Search.onClickStop <|
|
||||||
|
SearchMsg <|
|
||||||
|
Search.ShowInstallDetails Search.ViaNixOS
|
||||||
|
]
|
||||||
|
[ text "NixOS Configuration" ]
|
||||||
|
]
|
||||||
, li
|
, li
|
||||||
[ classList
|
[ classList
|
||||||
[ ( "active", showInstallDetails == Search.ViaNixEnv )
|
[ ( "active", showInstallDetails == Search.ViaNixEnv )
|
||||||
|
@ -651,7 +651,31 @@ viewResultItem nixosChannels channel showInstallDetails show item =
|
||||||
, div
|
, div
|
||||||
[ classList
|
[ classList
|
||||||
[ ( "tab-pane", True )
|
[ ( "tab-pane", True )
|
||||||
, ( "active", showInstallDetails == Search.ViaNixShell )
|
, ( "active", showInstallDetails == Search.ViaNixOS )
|
||||||
|
]
|
||||||
|
]
|
||||||
|
[ p []
|
||||||
|
[ text "Add the following Nix code to your NixOS Configuration, usually located in "
|
||||||
|
, strong [] [ text "/etc/nixos/configuration.nix" ]
|
||||||
|
]
|
||||||
|
]
|
||||||
|
, div
|
||||||
|
[ classList
|
||||||
|
[ ( "active", showInstallDetails == Search.ViaNixOS )
|
||||||
|
]
|
||||||
|
, class "tab-pane"
|
||||||
|
, id "package-details-nixpkgs"
|
||||||
|
]
|
||||||
|
[ pre [ class "code-block" ]
|
||||||
|
[ text <| " environment.systemPackages = [\n pkgs."
|
||||||
|
, strong [] [ text item.source.attr_name ]
|
||||||
|
, text <| "\n ];"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
, div
|
||||||
|
[ classList
|
||||||
|
[ ( "tab-pane", True )
|
||||||
|
, ( "active", List.member showInstallDetails [ Search.Unset, Search.ViaNixShell, Search.FromFlake ] )
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
[ p []
|
[ p []
|
||||||
|
@ -666,39 +690,15 @@ viewResultItem nixosChannels channel showInstallDetails show item =
|
||||||
]
|
]
|
||||||
, div
|
, div
|
||||||
[ classList
|
[ classList
|
||||||
[ ( "active", showInstallDetails == Search.ViaNixShell )
|
[ ( "tab-pane", True )
|
||||||
|
, ( "active", List.member showInstallDetails [ Search.Unset, Search.ViaNixShell, Search.FromFlake ] )
|
||||||
]
|
]
|
||||||
, class "tab-pane"
|
|
||||||
, id "package-details-nixpkgs"
|
|
||||||
]
|
]
|
||||||
[ pre [ class "code-block shell-command" ]
|
[ pre [ class "code-block shell-command" ]
|
||||||
[ text "nix-shell -p "
|
[ text "nix-shell -p "
|
||||||
, strong [] [ text item.source.attr_name ]
|
, strong [] [ text item.source.attr_name ]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
, div
|
|
||||||
[ classList
|
|
||||||
[ ( "tab-pane", True )
|
|
||||||
, ( "active", List.member showInstallDetails [ Search.Unset, Search.ViaNixOS, Search.FromFlake ] )
|
|
||||||
]
|
|
||||||
]
|
|
||||||
[ p []
|
|
||||||
[ text "Add the following Nix code to your NixOS Configuration, usually located in "
|
|
||||||
, strong [] [ text "/etc/nixos/configuration.nix" ]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
, div
|
|
||||||
[ classList
|
|
||||||
[ ( "tab-pane", True )
|
|
||||||
, ( "active", List.member showInstallDetails [ Search.Unset, Search.ViaNixOS, Search.FromFlake ] )
|
|
||||||
]
|
|
||||||
]
|
|
||||||
[ pre [ class "code-block" ]
|
|
||||||
[ text <| " environment.systemPackages = [\n pkgs."
|
|
||||||
, strong [] [ text item.source.attr_name ]
|
|
||||||
, text <| "\n ];"
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
]
|
||||||
<|
|
<|
|
||||||
Maybe.map
|
Maybe.map
|
||||||
|
|
Loading…
Reference in a new issue