aspe:keyoxide.org:ESQIYIHUFMW4ZI3NLH3TFYM2CM
In my previous article, [How to build with Nix], I explained how to write a Nix package and contribute it to
the official Nix package repository. One of the advantages of Nix is how easy it is to develop your own custom
Nix package repository, called a channel. A channel can be implemented simply as a tarball containing a
default.nix
file like this:
let
pkgs = import <nixpkgs> {};
in
[Nix] is a cross-platform package manager and domain-specific language used to define packages. In this article, I will demonstrate how to write and contribute Nix packages to [Nixpkgs], the [world's largest software repository]. I assume that you, dear reader, already know the basics of software development. Nix brings a number of advantages over comparable packaging solutions, most importantly:
- more reproducible builds
- a large and welcoming community
In a previous post
I explained how to manage Neovim plugins with Nix and Home Manager.
In this post I want to go further and show how to migrate Neovim configuration
from ~/.config/nvim
to ~/.config/home-manager
entirely. The end result will
be to split our Neovim setup into multiple modules that colocate plugin sourcing
and configuration.
If you haven't read the post linked above, do so now. We will assume the
# This file should be sourced in your /etc/nixos/configuration.nix | |
# imports declaration. | |
{ pkgs, ... }: | |
{ | |
environment = { | |
systemPackages = with pkgs; [ | |
libguestfs-with-appliance | |
libvirt | |
libvirt-glib |
NixOS provides good support for the Xfce desktop environment out-of-the-box, but the defaults are minimal. The files in this Gist provide a more complete experience, including a suite of basic software and plugins as well as an optional home-manager
configuration for theming.
The key additions to the default Xfce provided by NixOS are:
- Complete bluetooth / audio support with panel indicators and apps
- LightDM with theme
- Extra Xfce apps for calendaring, disk partitioning, etc.
- Various quality-of-life improving non-essentials
TCL-Expect scripts are an amazingly easy way to script out laborious tasks in the shell when you need to be interactive with the console. Think of them as a "macro" or way to programmaticly step through a process you would run by hand. They are similar to shell scripts but utilize the .tcl
extension and a different #!
call.
The first step, similar to writing a bash script, is to tell the script what it's executing under. For expect
we use the following:
#!/usr/bin/expect