diff --git a/home/laptop.nix b/home/laptop.nix index 464ce1e4..8ea479ff 100644 --- a/home/laptop.nix +++ b/home/laptop.nix @@ -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 ''; diff --git a/lib/default.nix b/lib/default.nix index d1c907df..d1e07ca5 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -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 diff --git a/lib/update-home.nix b/lib/update-home.nix index 00ef2aa8..04f4124d 100644 --- a/lib/update-home.nix +++ b/lib/update-home.nix @@ -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 ''; } diff --git a/lib/update-system.nix b/lib/update-system.nix index 1c40a1cd..e7cbbf5e 100644 --- a/lib/update-system.nix +++ b/lib/update-system.nix @@ -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) '';