diff options
-rw-r--r-- | nix/tailscale/default.nix | 4 | ||||
-rw-r--r-- | ops/besadii/default.nix | 4 | ||||
-rw-r--r-- | users/tazjin/blog/fragments.nix | 10 |
3 files changed, 8 insertions, 10 deletions
diff --git a/nix/tailscale/default.nix b/nix/tailscale/default.nix index a21af7d115dc..8d6a0f661b92 100644 --- a/nix/tailscale/default.nix +++ b/nix/tailscale/default.nix @@ -2,7 +2,7 @@ # # https://tailscale.com/kb/1018/install-acls -{ depot, ... }: +{ depot, pkgs, ... }: with depot.nix.yants; @@ -27,4 +27,4 @@ let # Actual ACL entries ACLs = list acl; }; -in config: toFile "tailscale-acl.json" (toJSON (aclConfig config)) +in config: pkgs.writeText "tailscale-acl.json" (toJSON (aclConfig config)) diff --git a/ops/besadii/default.nix b/ops/besadii/default.nix index c3e2310b6a71..1199c56cfb94 100644 --- a/ops/besadii/default.nix +++ b/ops/besadii/default.nix @@ -2,9 +2,7 @@ # Buildkite, Sourcegraph reindexing and other maintenance tasks. { depot, ... }: -let - inherit (builtins) toFile toJSON; -in depot.nix.buildGo.program { +depot.nix.buildGo.program { name = "besadii"; srcs = [ ./main.go ]; } diff --git a/users/tazjin/blog/fragments.nix b/users/tazjin/blog/fragments.nix index fb750a729910..78a64afa3932 100644 --- a/users/tazjin/blog/fragments.nix +++ b/users/tazjin/blog/fragments.nix @@ -10,7 +10,7 @@ { depot, lib, ... }: let - inherit (builtins) filter map hasAttr replaceStrings toFile; + inherit (builtins) filter map hasAttr replaceStrings; inherit (depot.third_party) runCommandNoCC writeText; inherit (depot.users.tazjin) renderMarkdown; @@ -51,7 +51,7 @@ let </body> ''; - draftWarning = toFile "draft.html" '' + draftWarning = writeText "draft.html" '' <p class="cheddar-callout cheddar-warning"> <b>Note:</b> This post is a <b>draft</b>! Please do not share the link to it without asking me first. @@ -59,7 +59,7 @@ let <hr> ''; - unlistedWarning = toFile "unlisted.html" '' + unlistedWarning = writeText "unlisted.html" '' <p class="cheddar-callout cheddar-warning"> <b>Note:</b> This post is <b>unlisted</b>! Please do not share the link to it without asking me first. @@ -68,7 +68,7 @@ let ''; renderPost = post: runCommandNoCC "${post.key}.html" {} '' - cat ${toFile "header.html" (header post.title)} > $out + cat ${writeText "header.html" (header post.title)} > $out # Write the post title & date echo '<article><h2 class="inline">${escape post.title}</h2>' >> $out @@ -89,7 +89,7 @@ let cat ${renderMarkdown post.content} >> $out echo '</article>' >> $out - cat ${toFile "footer.html" footer} >> $out + cat ${writeText "footer.html" footer} >> $out ''; in { inherit renderPost isDraft isUnlisted; |