Skip to content

NixOS

To install Noctalia using flakes, first add the flake input. Then you can install the package directly or use either the Home Manager or Hjem modules.

Add Noctalia to your flake inputs:

flake.nix
{
inputs = {
noctalia = {
url = "github:noctalia-dev/noctalia";
inputs.nixpkgs.follows = "nixpkgs";
};
};
}

Add the package to your system packages or equivalent:

configuration.nix
{ inputs, pkgs, ... }:
{
environment.systemPackages = [
inputs.noctalia.packages.${pkgs.stdenv.hostPlatform.system}.default
];
}

The flake also exposes a Home Manager module, which allows you to configure Noctalia’s settings (that you would otherwise put in ~/.config/noctalia/).

{ inputs, ... }:
{
home-manager.users.drfoobar = {
imports = [
inputs.noctalia.homeModules.default
];
programs.noctalia = {
enable = true;
settings = { # This may also be a string or path to a .toml file.
theme = {
mode = "dark";
source = "builtin";
builtin = "Catppuccin";
};
wallpaper = {
enabled = true;
default.path = "/path/to/wallpapers/wallpaper.png";
};
};
};
};
}

For those using Hjem instead of Home Manager, a Hjem module is also available.

{ inputs, ... }:
{
hjem = {
extraModules = [
inputs.noctalia.hjemModules.default
];
users.drfoobar = {
programs.noctalia = {
enable = true;
settings = { ... };
};
};
};
}

Both of the above modules include a systemd user service for Noctalia, which can be enabled by setting programs.noctalia.systemd.enable = true.

Pre-built binaries are available on Cachix, so you can skip compiling locally.

You can configure the substituter either in your NixOS config, flake, or /etc/nix/nix.conf:

nix.settings = {
extra-substituters = [ "https://noctalia.cachix.org" ];
extra-trusted-public-keys = [ "noctalia.cachix.org-1:pCOR47nnMEo5thcxNDtzWpOxNFQsBRglJzxWPp3dkU4=" ];
};

Overriding any of Noctalia’s inputs (e.g. via inputs.nixpkgs.follows with flakes) changes the derivation hash, causing cache misses.

Additionally, tracking main directly may pull in a commit that hasn’t been cached yet by CI.

To avoid this, the cachix branch always points to the latest cached commit. Pinning to this branch guarantees you always track the latest commit that has already been cached:

noctalia.url = "github:noctalia-dev/noctalia/cachix";