1
0
Fork 0

Fix myNixPath

This commit is contained in:
Malte Brandy 2020-05-16 16:47:52 +02:00
parent fafaffad3b
commit 2b1c5e43bb
No known key found for this signature in database
GPG key ID: 226A2D41EF5378C9
4 changed files with 4 additions and 4 deletions

View file

@ -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
'';

View file

@ -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

View file

@ -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
'';
}

View file

@ -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)
'';