Fix myNixPath
This commit is contained in:
parent
fafaffad3b
commit
2b1c5e43bb
|
@ -42,7 +42,7 @@ in {
|
|||
} ''
|
||||
main = do
|
||||
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"
|
||||
activate_mode
|
||||
'';
|
||||
|
|
|
@ -100,7 +100,7 @@ rec {
|
|||
|
||||
getNivPath :: Text -> Text -> IO Text
|
||||
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
|
||||
escaped <- nix_instantiate ["--eval" :: String, "-E", [i|toString #{expr}|]] |> captureTrim
|
||||
pure . Text.dropAround ('"' ==) . decodeUtf8 . trim $ escaped
|
||||
|
|
|
@ -7,7 +7,7 @@ in {
|
|||
} ''
|
||||
main = do
|
||||
args <- getArgs
|
||||
paths <- myNixPath "${configPath}/nix/sources.nix"
|
||||
paths <- myNixPath "${configPath}"
|
||||
home_manager $ paths ++ ["switch"] ++ fmap toString args
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ in rec {
|
|||
bins = [ nixos-rebuild ];
|
||||
} ''
|
||||
main = do
|
||||
paths <- myNixPath "${configPath}/nix/sources.nix"
|
||||
paths <- myNixPath "${configPath}"
|
||||
args <- getArgs
|
||||
nixos_rebuild (paths ++ ["switch"] ++ fmap toString args)
|
||||
'';
|
||||
|
|
Loading…
Reference in a new issue