From c18135d1274d5012196073c0bc021d9868108291 Mon Sep 17 00:00:00 2001 From: Rose Hogenson Date: Fri, 25 Oct 2024 22:44:33 -0700 Subject: Get rid of the blog and use webp. --- templates/404.html.template | 4 +- templates/blog/post.html.template | 5 -- .../blog/posts/2024-10-22_nix_flakes.html.template | 82 ---------------------- templates/index.html.template | 10 +-- templates/outline.html.template | 2 +- templates/pong.html.template | 2 +- 6 files changed, 6 insertions(+), 99 deletions(-) delete mode 100644 templates/blog/post.html.template delete mode 100644 templates/blog/posts/2024-10-22_nix_flakes.html.template (limited to 'templates') diff --git a/templates/404.html.template b/templates/404.html.template index a5cccf6..b30281f 100644 --- a/templates/404.html.template +++ b/templates/404.html.template @@ -2,7 +2,7 @@ Not Found - +
@@ -10,7 +10,7 @@ {{.Path}} was not found
- +
diff --git a/templates/blog/post.html.template b/templates/blog/post.html.template deleted file mode 100644 index 80670d6..0000000 --- a/templates/blog/post.html.template +++ /dev/null @@ -1,5 +0,0 @@ -
- ⬅️Home -

{{template "title" .}}

-{{template "post"}} -
diff --git a/templates/blog/posts/2024-10-22_nix_flakes.html.template b/templates/blog/posts/2024-10-22_nix_flakes.html.template deleted file mode 100644 index d191908..0000000 --- a/templates/blog/posts/2024-10-22_nix_flakes.html.template +++ /dev/null @@ -1,82 +0,0 @@ -{{define "title"}}nix flakes for busy people{{end}} - -

TL;DR

- -

To enable flakes on a NixOS system

- -

Just put

- -
-  nix.settings.experimental-features = [
-    "nix-command"
-    "flakes"
-  ];
-
- -

in your configuration.nix. IMO it's a shame that flakes -have been locked behind experimental for so long, it's a large part of -why they have a bad reputation. It's absolutely worth enabling them -since they're so useful.

- -

To use a flake from github

- -
-nix shell github:ggerganov/llama.cpp
-
- -

or to install a specific flake output:

- -
-nix shell github:ggerganov/llama.cpp#rocm
-
- -

To list the outputs for a specific flake, you can usually type -nix shell github:ggerganov/llama.cpp#<tab> and your -shell may or may not list the outputs. If anyone has a better way to do this, -please let me know.

- -

To install a flake in your system profile, use

- -
-nix profile install github:ggerganov/llama.cpp
-
- -

Here is the greatest power of nix flakes: the ability to install and -use them as first-class packages just like anything from nixpkgs. It -feels a lot better integrated than something like the AUR.

- -

To create a nix flake for your own project

- -
-nix flake init -t templates#go-hello
-
- -

Replace go-hello with whatever template you want that most closely -matches your project configuration. Unfortunately many of these templates -have the questionable behavior of also overwriting source files in the -current directory, so I recommend only running nix flake init in an -empty directory, and copying the flake.nix file over to your -existing project.

- -

A philosophical intro to nix flakes

- -

Flakes are a way to replace the centralized nixpkgs repository with -decentralized packages controlled directly by upstream. In many ways -Linux packaging has been moving more and more towards upstream with -things like appimages or flatpak, and being able to remove many of the -distro-specific hacks needed to make things run on various systems. Nix -flakes address this same issue, by allowing upstream to control their own -flake.nix, and pull in the specific versions of any dependencies they -might need. They also give an easy way to install any programs that -might not be packaged yet for nixpkgs, as long as anyone has written a -flake and published it online.

- -

The bad parts

- -

Nix flakes are still rough around the edges, and the worst part for -a new Nix user is the lack of documentation. This is a large part of why -I'm writing yet another nix flakes tutorial! -https://xeiaso.net/blog/nix-flakes-1-2022-02-21 -is really good, but reading this as a new user, I only wanted to know -how to install an app packaged with flakes, and I didn't care so much -about how to package my own stuff yet.

diff --git a/templates/index.html.template b/templates/index.html.template index 4737e3d..9591293 100644 --- a/templates/index.html.template +++ b/templates/index.html.template @@ -1,19 +1,13 @@ {{define "title"}}roseh.moe{{end}} -
+

roseh.moe

- A dragon loli + A dragon loli

Games? (Warning: loud)

- -{{range .}} -
-

{{.Name}}

-
-{{end}} diff --git a/templates/outline.html.template b/templates/outline.html.template index 9dd6730..1dbc621 100644 --- a/templates/outline.html.template +++ b/templates/outline.html.template @@ -2,7 +2,7 @@ {{template "title" .}} - + diff --git a/templates/pong.html.template b/templates/pong.html.template index 141a685..777e0d0 100644 --- a/templates/pong.html.template +++ b/templates/pong.html.template @@ -2,7 +2,7 @@ Pong - + -- cgit v1.3.1