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

38
flake/dev/flake.lock generated
View file

@ -216,6 +216,26 @@
"type": "github"
}
},
"noctalia": {
"inputs": {
"nixpkgs": [
"dev-nixpkgs"
]
},
"locked": {
"lastModified": 1781121630,
"narHash": "sha256-FvJwY670/K4i6YNfA1+1MlcM9A2tB4NYt4X26NeauH8=",
"owner": "noctalia-dev",
"repo": "noctalia",
"rev": "7a623c36b6d9964ea833ed996f7fedc4307ea7c3",
"type": "github"
},
"original": {
"owner": "noctalia-dev",
"repo": "noctalia",
"type": "github"
}
},
"noctalia-qs": {
"inputs": {
"nixpkgs": [
@ -230,11 +250,11 @@
]
},
"locked": {
"lastModified": 1780194487,
"narHash": "sha256-M+YtjKCTkHrkplNaKVyaxfa8hAWjRF6wFOUBAZvxQ4U=",
"lastModified": 1780799499,
"narHash": "sha256-YloRtLqJabzYUWvdLyh67zH4DZrR3kQj+dlQJwLPmPM=",
"owner": "noctalia-dev",
"repo": "noctalia-qs",
"rev": "07398e12b54f194e3a2d47c87e3fd10b8eeaa27d",
"rev": "f308426239665e3bc3d624014e9295b2ae2f58ff",
"type": "github"
},
"original": {
@ -251,16 +271,17 @@
"noctalia-qs": "noctalia-qs"
},
"locked": {
"lastModified": 1780197945,
"narHash": "sha256-zeluNQgRgTglqKnv5EaM7DzSaqmrCdqTocmaWC7dxy0=",
"lastModified": 1780949817,
"narHash": "sha256-2oJuPyt+4dd+ZzO7TFqpmkSAAYpRg9SF4eV8kJGl6Tk=",
"owner": "noctalia-dev",
"repo": "noctalia-shell",
"rev": "b16dc50250af05d5048ac454dbf4e898d1adcac0",
"repo": "noctalia",
"rev": "f816591afc2f2f606d1f0cf70b51e95c04a7a8aa",
"type": "github"
},
"original": {
"owner": "noctalia-dev",
"repo": "noctalia-shell",
"ref": "legacy-v4",
"repo": "noctalia",
"type": "github"
}
},
@ -304,6 +325,7 @@
"git-hooks": "git-hooks",
"home-manager": "home-manager",
"nixvim": "nixvim",
"noctalia": "noctalia",
"noctalia-shell": "noctalia-shell",
"nvf": "nvf",
"spicetify-nix": "spicetify-nix",

View file

@ -168,8 +168,13 @@
};
};
noctalia = {
url = "github:noctalia-dev/noctalia";
inputs.nixpkgs.follows = "dev-nixpkgs";
};
noctalia-shell = {
url = "github:noctalia-dev/noctalia-shell";
url = "github:noctalia-dev/noctalia/legacy-v4";
inputs = {
nixpkgs.follows = "dev-nixpkgs";
noctalia-qs.inputs = {

View file

@ -55,6 +55,15 @@
matrix = "@noodlez1232:matrix.org";
name = "Nathaniel Barragan";
};
Swarsel = {
email = "leon@swarsel.win";
github = "Swarsel";
githubId = 32304731;
keys = [
{ fingerprint = "4BE7 9252 6228 9B47 6DBB C17B 76FD 3810 215A E097"; }
];
name = "Leon Schwarzäugl";
};
TheColorman = {
email = "nixpkgs@colorman.me";
github = "TheColorman";

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; };
}

View file

@ -55,6 +55,8 @@ let
inputs.noctalia-shell.homeModules.default
];
noctalia.home-manager.sharedModules = [ inputs.noctalia.homeModules.default ];
nvf = inputs.nvf.nixosModules.default;
zen-browser.home-manager.sharedModules = [