noctalia: init (#2364)

Link: https://github.com/nix-community/stylix/pull/2364

Tested-by: Leon Schwarzäugl <leon.schwarzaeugl@gmail.com>
Tested-by: https://github.com/irisfalke
Reviewed-by: Alexander <63157919+rwxae@users.noreply.github.com>
Reviewed-by: Noah Biewesch <dev@noahbiewesch.com>
This commit is contained in:
Leon Schwarzäugl 2026-07-03 19:52:22 +02:00 committed by GitHub
parent 8bca95e381
commit 831414670d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 168 additions and 9 deletions

View file

@ -5,6 +5,11 @@
...
}:
mkTarget {
autoEnable =
lib.warnIf (lib.oldestSupportedReleaseIsAtLeast 2705)
"stylix: `config.stylix.targets.noctalia-shell` targets the deprecated Noctalia v4 and is replaced by Noctalia v5 with `config.stylix.targets.noctalia`, with `config.stylix.targets.noctalia-shell` being removed after 27.11."
true;
config = lib.optionals (options.programs ? noctalia-shell) [
(
{ colors }:

101
modules/noctalia/hm.nix Normal file
View file

@ -0,0 +1,101 @@
{
mkTarget,
lib,
options,
...
}:
let
theme = "stylix";
in
mkTarget {
config = lib.optionals (options.programs ? noctalia) [
(
{ colors }:
{
programs.noctalia = {
settings.theme = {
source = "custom";
custom_palette = theme;
};
customPalettes.${theme}.dark = with colors.withHashtag; {
mPrimary = base0D;
mOnPrimary = base00;
mSecondary = base0E;
mOnSecondary = base00;
mTertiary = base0C;
mOnTertiary = base00;
mError = base08;
mOnError = base00;
mSurface = base00;
mOnSurface = base05;
mHover = base0C;
mOnHover = base00;
mSurfaceVariant = base01;
mOnSurfaceVariant = base04;
mOutline = base03;
mShadow = base00;
terminal = {
foreground = base05;
background = base00;
cursor = base05;
cursorText = base00;
selectionFg = base05;
selectionBg = base02;
normal = {
black = base00;
red = base08;
green = base0B;
yellow = base0A;
blue = base0D;
magenta = base0E;
cyan = base0C;
white = base05;
};
bright = {
black = base03;
red = base08;
green = base0B;
yellow = base0A;
blue = base0D;
magenta = base0E;
cyan = base0C;
white = base07;
};
};
};
};
}
)
(
{ polarity }:
{
programs.noctalia.settings.theme.mode =
if polarity == "dark" then polarity else "light";
}
)
(
{ opacity }:
{
programs.noctalia.settings = {
dock.background_opacity = opacity.desktop;
notification.background_opacity = opacity.popups;
osd.background_opacity = opacity.popups;
};
}
)
(
{ fonts }:
{
programs.noctalia.settings.shell.font_family = fonts.sansSerif.name;
}
)
(
{ image }:
{
programs.noctalia.settings.wallpaper.default.path = image;
}
)
];
}

View file

@ -0,0 +1,6 @@
{ lib, ... }:
{
name = "Noctalia";
homepage = "https://docs.noctalia.dev/v5";
maintainers = [ lib.maintainers.swarsel ];
}

View file

@ -0,0 +1,9 @@
{ lib, ... }:
{
stylix.testbed.ui = {
graphicalEnvironment = "hyprland";
command.text = "noctalia";
};
home-manager.sharedModules = lib.singleton { programs.noctalia.enable = true; };
}