NixOS
Nix Flakes
Section titled “Nix Flakes”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.
Adding the Flake input
Section titled “Adding the Flake input”Add Noctalia to your flake inputs:
{ inputs = { noctalia = { url = "github:noctalia-dev/noctalia"; inputs.nixpkgs.follows = "nixpkgs"; }; };}Installing the Package
Section titled “Installing the Package”Add the package to your system packages or equivalent:
{ inputs, pkgs, ... }:{ environment.systemPackages = [ inputs.noctalia.packages.${pkgs.stdenv.hostPlatform.system}.default ];}Home Manager Module
Section titled “Home Manager Module”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"; }; }; }; };}Hjem Module
Section titled “Hjem Module”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 = { ... }; }; }; };}Systemd Service
Section titled “Systemd Service”Both of the above modules include a systemd user service for Noctalia, which can be enabled by setting programs.noctalia.systemd.enable = true.
Binary Cache
Section titled “Binary Cache”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=" ];};nixConfig = { extra-substituters = [ "https://noctalia.cachix.org" ]; extra-trusted-public-keys = [ "noctalia.cachix.org-1:pCOR47nnMEo5thcxNDtzWpOxNFQsBRglJzxWPp3dkU4=" ];};extra-substituters = https://noctalia.cachix.orgextra-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";tack add noctalia github:noctalia-dev/noctalia/cachixnpins add github noctalia-dev noctalia --branch cachixnoctalia-src = fetchTarball { url = "https://github.com/noctalia-dev/noctalia/archive/cachix.tar.gz"; sha256 = ""; # replace with hash from nix build output};