Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions modules/noctalia/check.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
pkgs,
self,
}:

let
noctaliaWrapped =
(self.wrapperModules.noctalia.apply {
inherit pkgs;
}).wrapper;

in
pkgs.runCommand "noctalia-test" { } ''
# if the config is invalid the text helix will complain here.
# sady no other dedicated check config command exists
res=$(${pkgs.lib.getExe noctaliaWrapped} config validate)
echo $res
if [[ ''${#res} == 0 ]]; then
touch $out
fi
''
55 changes: 55 additions & 0 deletions modules/noctalia/module.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
config,
lib,
wlib,
...
}:
let
tomlFmt = config.pkgs.formats.toml { };
in
{
_class = "wrapper";
options = {
settings = lib.mkOption {
type = tomlFmt.type;
description = ''
Noctalia Settings
See <https://docs.noctalia.dev/v5/>
'';
default = { };
};
"config.toml" = lib.mkOption {
type = wlib.types.file config.pkgs;
default.path = tomlFmt.generate "noctalia-config" config.settings;
};
};

config = {
# waiting for noctalia to be updated to v5 in nixpkgs
package = config.pkgs.callPackage ./package.nix { };
env = {
NOCTALIA_CONFIG_HOME = toString (
config.pkgs.linkFarm "noctalia-config" [
{
name = "noctalia/config.toml";
path = config."config.toml".path;
}
]
);
};
meta = {
maintainers = [
{
# waiting to become a nixpkgs maintainer
github = "kruemmelspalter";
githubId = 54735589;
name = "kruemmelspalter";
email = "kruemmelspalter@kruemmelspalter.org";
matrix = "@kruemmelsplater:kruemmelspalter.org";
keys = [ { fingerprint = "28F5 4BD4 73F1 7495 24BF F4BD 4F4A 2EFA E386 71C8"; } ];
}
];
platforms = lib.platforms.linux;
};
};
}
101 changes: 101 additions & 0 deletions modules/noctalia/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
### waiting for noctalia to be updated to v5 in nixpkgs
### adapted from upstream at <https://github.com/noctalia-dev/noctalia/blob/d967ed5f5484e57866350106be8bfe3b50f90cfd/nix/package.nix> (licensed MIT)
{
lib,
config,
stdenv,
fetchFromGitHub,
meson,
ninja,
pkg-config,
wayland-scanner,
wayland,
wayland-protocols,
libGL,
libglvnd,
freetype,
fontconfig,
cairo,
pango,
harfbuzz,
libxkbcommon,
sdbus-cpp_2,
systemdLibs,
pipewire,
pam,
curl,
libwebp,
glib,
polkit,
librsvg,
libqalculate,
libxml2,
jemalloc,
autoAddDriverRunpath,
cudaSupport ? config.cudaSupport,
}:

stdenv.mkDerivation {
pname = "noctalia";
version = "4.7.7-unstable-2026-06-11";

strictDeps = true;
__structuredAttrs = true;

src = fetchFromGitHub {
owner = "noctalia-dev";
repo = "noctalia";
rev = "7421f80b041e81d6e202a25ade6bfc59d716dd43";
hash = "sha256-H+uwJBulU/0Qt+BGUvlyrTPgcdOfojSalklpEuKKD2c=";
};

postPatch = ''
# Remove -march=native and -mtune=native for reproducible builds
substituteInPlace meson.build --replace-fail "'-march=native', '-mtune=native'," ""
'';

nativeBuildInputs = [
meson
ninja
pkg-config
wayland-scanner
]
++ lib.optional cudaSupport autoAddDriverRunpath;

buildInputs = [
wayland
wayland-protocols
libGL
libglvnd
freetype
fontconfig
cairo
pango
harfbuzz
libxkbcommon
sdbus-cpp_2
systemdLibs
pipewire
pam
curl
libwebp
glib
polkit
librsvg
libqalculate
libxml2
jemalloc
];

mesonBuildType = "release";

ninjaFlags = [ "-v" ];

meta = {
description = "Sleek and minimal desktop shell thoughtfully crafted for Wayland";
homepage = "https://github.com/noctalia-dev/noctalia";
license = lib.licenses.mit;
platforms = lib.platforms.linux;
mainProgram = "noctalia";
};
}
Loading