-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Needed to add syntaxes to syntaxes/ because apparently using extra_syntaxes results in the default syntaxes not working anymore: getzola/zola#1309
- Loading branch information
Mukund Lakshman
committed
Jun 4, 2021
1 parent
f3b6b65
commit 33a45ac
Showing
15 changed files
with
3,831 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
base_url = "https://blog.yaymukund.com" | ||
title = "yaymukund's weblog" | ||
description = "thoughts i'd like to keep around" | ||
default_language = "en" | ||
compile_sass = true | ||
build_search_index = true | ||
compile_sass = true | ||
default_language = "en" | ||
description = "thoughts i'd like to keep around" | ||
generate_feed = true | ||
title = "yaymukund's weblog" | ||
|
||
[markdown] | ||
extra_syntaxes = ["syntaxes"] | ||
highlight_code = true | ||
highlight_theme = "inspired-github" | ||
extra_syntaxes = ["syntaxes"] | ||
smart_punctuation = true | ||
|
||
[extra] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
+++ | ||
date = 2021-06-02 | ||
title = "NixOS: Overriding packages" | ||
+++ | ||
|
||
## Overriding packages in NixOS | ||
|
||
In NixOS, it's sometimes desirable to override a package in order to extend | ||
or modify its behavior. For example, I override my Neovim to add plugins so | ||
they get all the benefits of being in the nix store. Here's how I do it. | ||
|
||
<!-- more --> | ||
|
||
```nix | ||
# in configuration.nix | ||
nixpkgs.overlays = [ | ||
(import ./overlays.nix) | ||
]; | ||
# in overlays.nix | ||
self: super: { | ||
neovim-mukund = self.callPackage ./packages/neovim-mukund.nix {}; | ||
} | ||
# finally, in packages/neovim-mukund.nix | ||
{ pkgs }: | ||
neovim.override { | ||
vimAlias = true; | ||
viAlias = true; | ||
configure = { | ||
packages.mukund-plugins = with pkgs.vimPlugins; { | ||
start = [ | ||
ale | ||
fzf-vim | ||
# ... | ||
]; | ||
}; | ||
}; | ||
} | ||
# putting it all together | ||
environment.systemPackages = [ | ||
neovim-mukund | ||
]; | ||
``` | ||
|
||
### Bonus: Installing a single package from `main` | ||
|
||
If you need to install a single package from the `main` branch but keep the | ||
rest of your code on your nix channel (usually the main channel or | ||
`nixos-unstable`), then try this: | ||
|
||
```nix | ||
# in packages/neovim-mukund.nix | ||
let neovim-master = (import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/master.tar.gz") {}).neovim | ||
in | ||
environment.systemPackage = [ | ||
neovim-master | ||
] | ||
``` | ||
This time, I'm fetching and installing from the `master.tar.gz` file. This is | ||
handy if there's an update upstream that you want to use immediately. For | ||
example, I often use this when `Discord` releases an update. Nixpkgs usually | ||
merges the version bump fairly quickly, but it doesn't reach the release | ||
channels for many days during which Discord is unusable. | ||
|
||
### References | ||
|
||
- [NixOS Wiki: Overlays](https://nixos.wiki/wiki/Overlays) | ||
- [/r/NixOS: Install a package from specific version of NixOS](https://old.reddit.com/r/NixOS/comments/a3w67x/install_a_package_from_a_specific_version_of/eb9q19s/?context=3) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ pkgs ? import <nixpkgs> {} }: | ||
pkgs.mkShell { | ||
nativeBuildInputs = with pkgs; [ | ||
zola | ||
]; | ||
} |
Oops, something went wrong.