Flake and nixvim

This commit is contained in:
Nox Sluijtman 2024-02-03 15:00:06 +01:00
parent 27ac5fa2a0
commit ee94eadb12
3 changed files with 134 additions and 0 deletions

37
content/rambles/nixvim.md Normal file
View file

@ -0,0 +1,37 @@
---
title: "NixVim"
date: "2024-01-15T02:53:23+01:00"
author: "$HUMANOID"
tags: ["nix", "linux", "vim"]
description: "Some thoughts on Vim, NeoVim and NixVim"
draft: true
---
# Vim and Editors in General
So I've been using Vim for nearly as long as I've been using Linux. I still
vaguely remember awkwardly working `vimtutor` for the first time. Before I
touched Vim, I didn't really have any strong preference for an editor on Linux.
I'd just come from Windows where I'd used Notepad++ to edit small text files and
Visual Studio and JetBrains Rider for my college work at the time -- mainly C#
in conjunction with Unity. Sure, these editors got the job done, but they
weren't... Elegant. Visual Studio and Rider are monstrous pieces of software
with several kitchen sinks. And I'm sure Notepad++ has some really cool features
that I've never touched, but then it didn't really feel inviting to me and thus
I never dug deeper. When moving to Linux, I mainly used Gedit to edit the odd
ini file. This got rather tedious when needing root privileges to edit, say an
`sshd_config` file. Sure, you can open Gedit using `sudo`, but that makes the
terminal window from which you start it useless as long as Gedit is running. On
top of that, it being a GTK application means that it spews a lot of output to
`STDOUT`. At this point -- not wanting to dig into Vim yet -- I found out Nano
is a thing. I never liked it. It's always felt something like a clunky
on-graphical Windows Notepad of Linux.
So after a little while I decided to bite the bullet and start up `vimtutor`.
As mentioned before, it was awkward at first. But I could also see the power
that the anatomy of Vim allows the user to wield and decided to commit at least
the basics to muscle memory.
# Plugins and NeoVim
From here it would only be a matter of time.

61
flake.lock Normal file
View file

@ -0,0 +1,61 @@
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1694529238,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1696983906,
"narHash": "sha256-L7GyeErguS7Pg4h8nK0wGlcUTbfUMDu+HMf1UcyP72k=",
"owner": "NixOs",
"repo": "nixpkgs",
"rev": "bd1cde45c77891214131cbbea5b1203e485a9d51",
"type": "github"
},
"original": {
"owner": "NixOs",
"ref": "nixos-23.05",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

36
flake.nix Normal file
View file

@ -0,0 +1,36 @@
{ description = "Website flake";
inputs = {
nixpkgs.url = github:NixOs/nixpkgs/nixos-23.05;
flake-utils.url = github:numtide/flake-utils;
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
in {
packages = {
default = pkgs.stdenvNoCC.mkDerivation rec {
pname = "voidcruiser";
version = "1.3";
src = ./.;
buildInputs = [ pkgs.hugo ];
buildPhase = ''
hugo
'';
installPhase = ''
mkdir -p $out/share/
cp -r public $out/share/${pname}
'';
};
};
devShell = pkgs.mkShell {
buildInputs = [ pkgs.hugo ];
};
});
}