Fix myNixPath
This commit is contained in:
parent
fafaffad3b
commit
2b1c5e43bb
|
@ -42,7 +42,7 @@ in {
|
||||||
} ''
|
} ''
|
||||||
main = do
|
main = do
|
||||||
say "Building ~/.modes for apollo"
|
say "Building ~/.modes for apollo"
|
||||||
nixPath <- myNixPath "${configPath}/nix/sources.nix"
|
nixPath <- myNixPath "${configPath}"
|
||||||
nix_build nixPath "${configPath}/home/target.nix" "-A" "apollo" "-o" "/home/maralorn/.modes"
|
nix_build nixPath "${configPath}/home/target.nix" "-A" "apollo" "-o" "/home/maralorn/.modes"
|
||||||
activate_mode
|
activate_mode
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -100,7 +100,7 @@ rec {
|
||||||
|
|
||||||
getNivPath :: Text -> Text -> IO Text
|
getNivPath :: Text -> Text -> IO Text
|
||||||
getNivPath sources channel = do
|
getNivPath sources channel = do
|
||||||
let expr = [i|(import #{sources}).#{channel}|] :: String
|
let expr = [i|(import #{sources}/nix/sources.nix).#{channel}|] :: String
|
||||||
nix_build ["-Q", "-E", expr, "--no-out-link"] &> devNull
|
nix_build ["-Q", "-E", expr, "--no-out-link"] &> devNull
|
||||||
escaped <- nix_instantiate ["--eval" :: String, "-E", [i|toString #{expr}|]] |> captureTrim
|
escaped <- nix_instantiate ["--eval" :: String, "-E", [i|toString #{expr}|]] |> captureTrim
|
||||||
pure . Text.dropAround ('"' ==) . decodeUtf8 . trim $ escaped
|
pure . Text.dropAround ('"' ==) . decodeUtf8 . trim $ escaped
|
||||||
|
|
|
@ -7,7 +7,7 @@ in {
|
||||||
} ''
|
} ''
|
||||||
main = do
|
main = do
|
||||||
args <- getArgs
|
args <- getArgs
|
||||||
paths <- myNixPath "${configPath}/nix/sources.nix"
|
paths <- myNixPath "${configPath}"
|
||||||
home_manager $ paths ++ ["switch"] ++ fmap toString args
|
home_manager $ paths ++ ["switch"] ++ fmap toString args
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ in rec {
|
||||||
bins = [ nixos-rebuild ];
|
bins = [ nixos-rebuild ];
|
||||||
} ''
|
} ''
|
||||||
main = do
|
main = do
|
||||||
paths <- myNixPath "${configPath}/nix/sources.nix"
|
paths <- myNixPath "${configPath}"
|
||||||
args <- getArgs
|
args <- getArgs
|
||||||
nixos_rebuild (paths ++ ["switch"] ++ fmap toString args)
|
nixos_rebuild (paths ++ ["switch"] ++ fmap toString args)
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Reference in a new issue