format with alejandra

This commit is contained in:
Sean Kovacs 2025-12-24 11:29:41 -05:00
commit 71522c6b5d
Signed by: sckova
GPG key ID: 00F325187C68651A
35 changed files with 578 additions and 589 deletions

View file

@ -1,14 +1,15 @@
{ config, pkgs, ... }:
let
{
config,
pkgs,
...
}: let
catppuccin-fuzzel = pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "fuzzel";
rev = "0af0e26901b60ada4b20522df739f032797b07c3";
sha256 = "sha256-XpItMGsYq4XvLT+7OJ9YRILfd/9RG1GMuO6J4hSGepg=";
};
in
{
in {
imports = [
./niri.nix
./noctalia.nix

View file

@ -1,6 +1,8 @@
{ config, pkgs, ... }:
{
config,
pkgs,
...
}: {
programs.niri.package = pkgs.niri-unstable.overrideAttrs (old: {
doCheck = false;
});
@ -10,7 +12,7 @@
hotkey-overlay.skip-at-startup = true;
prefer-no-csd = true;
gestures.hot-corners.enable = false;
spawn-at-startup = [ ]; # systemd is based sorry
spawn-at-startup = []; # systemd is based sorry
overview = {
backdrop-color = pkgs.catppuccin.${config.catppuccin.flavor}.crust;
workspace-shadow.enable = false;
@ -66,9 +68,9 @@
proportion = 0.5;
};
preset-column-widths = [
{ proportion = 1.0 / 3.0; }
{ proportion = 1.0 / 2.0; }
{ proportion = 2.0 / 3.0; }
{proportion = 1.0 / 3.0;}
{proportion = 1.0 / 2.0;}
{proportion = 2.0 / 3.0;}
];
border = {
enable = true;
@ -135,10 +137,10 @@
}
];
binds = {
"Mod+Shift+Slash".action.show-hotkey-overlay = { };
"Mod+Shift+Slash".action.show-hotkey-overlay = {};
"Mod+T" = {
action.spawn = [ "kitty" ];
action.spawn = ["kitty"];
hotkey-overlay.title = "Open a Terminal: kitty";
};
"Mod+Space" = {
@ -229,96 +231,96 @@
};
"Mod+O" = {
action.toggle-overview = { };
action.toggle-overview = {};
repeat = false;
};
"Mod+Q" = {
action.close-window = { };
action.close-window = {};
repeat = false;
};
"Mod+Left".action.focus-column-left = { };
"Mod+Down".action.focus-window-down = { };
"Mod+Up".action.focus-window-up = { };
"Mod+Right".action.focus-column-right = { };
"Mod+H".action.focus-column-left = { };
"Mod+J".action.focus-window-down = { };
"Mod+K".action.focus-window-up = { };
"Mod+L".action.focus-column-right = { };
"Mod+Left".action.focus-column-left = {};
"Mod+Down".action.focus-window-down = {};
"Mod+Up".action.focus-window-up = {};
"Mod+Right".action.focus-column-right = {};
"Mod+H".action.focus-column-left = {};
"Mod+J".action.focus-window-down = {};
"Mod+K".action.focus-window-up = {};
"Mod+L".action.focus-column-right = {};
"Mod+Ctrl+Left".action.move-column-left = { };
"Mod+Ctrl+Down".action.move-window-down = { };
"Mod+Ctrl+Up".action.move-window-up = { };
"Mod+Ctrl+Right".action.move-column-right = { };
"Mod+Ctrl+H".action.move-column-left = { };
"Mod+Ctrl+J".action.move-window-down = { };
"Mod+Ctrl+K".action.move-window-up = { };
"Mod+Ctrl+L".action.move-column-right = { };
"Mod+Ctrl+Left".action.move-column-left = {};
"Mod+Ctrl+Down".action.move-window-down = {};
"Mod+Ctrl+Up".action.move-window-up = {};
"Mod+Ctrl+Right".action.move-column-right = {};
"Mod+Ctrl+H".action.move-column-left = {};
"Mod+Ctrl+J".action.move-window-down = {};
"Mod+Ctrl+K".action.move-window-up = {};
"Mod+Ctrl+L".action.move-column-right = {};
"Mod+Home".action.focus-column-first = { };
"Mod+End".action.focus-column-last = { };
"Mod+Ctrl+Home".action.move-column-to-first = { };
"Mod+Ctrl+End".action.move-column-to-last = { };
"Mod+Home".action.focus-column-first = {};
"Mod+End".action.focus-column-last = {};
"Mod+Ctrl+Home".action.move-column-to-first = {};
"Mod+Ctrl+End".action.move-column-to-last = {};
"Mod+Shift+Left".action.focus-monitor-left = { };
"Mod+Shift+Down".action.focus-monitor-down = { };
"Mod+Shift+Up".action.focus-monitor-up = { };
"Mod+Shift+Right".action.focus-monitor-right = { };
"Mod+Shift+H".action.focus-monitor-left = { };
"Mod+Shift+J".action.focus-monitor-down = { };
"Mod+Shift+K".action.focus-monitor-up = { };
"Mod+Shift+L".action.focus-monitor-right = { };
"Mod+Shift+Left".action.focus-monitor-left = {};
"Mod+Shift+Down".action.focus-monitor-down = {};
"Mod+Shift+Up".action.focus-monitor-up = {};
"Mod+Shift+Right".action.focus-monitor-right = {};
"Mod+Shift+H".action.focus-monitor-left = {};
"Mod+Shift+J".action.focus-monitor-down = {};
"Mod+Shift+K".action.focus-monitor-up = {};
"Mod+Shift+L".action.focus-monitor-right = {};
"Mod+Shift+Ctrl+Left".action.move-column-to-monitor-left = { };
"Mod+Shift+Ctrl+Down".action.move-column-to-monitor-down = { };
"Mod+Shift+Ctrl+Up".action.move-column-to-monitor-up = { };
"Mod+Shift+Ctrl+Right".action.move-column-to-monitor-right = { };
"Mod+Shift+Ctrl+H".action.move-column-to-monitor-left = { };
"Mod+Shift+Ctrl+J".action.move-column-to-monitor-down = { };
"Mod+Shift+Ctrl+K".action.move-column-to-monitor-up = { };
"Mod+Shift+Ctrl+L".action.move-column-to-monitor-right = { };
"Mod+Shift+Ctrl+Left".action.move-column-to-monitor-left = {};
"Mod+Shift+Ctrl+Down".action.move-column-to-monitor-down = {};
"Mod+Shift+Ctrl+Up".action.move-column-to-monitor-up = {};
"Mod+Shift+Ctrl+Right".action.move-column-to-monitor-right = {};
"Mod+Shift+Ctrl+H".action.move-column-to-monitor-left = {};
"Mod+Shift+Ctrl+J".action.move-column-to-monitor-down = {};
"Mod+Shift+Ctrl+K".action.move-column-to-monitor-up = {};
"Mod+Shift+Ctrl+L".action.move-column-to-monitor-right = {};
"Mod+Page_Down".action.focus-workspace-down = { };
"Mod+Page_Up".action.focus-workspace-up = { };
"Mod+U".action.focus-workspace-down = { };
"Mod+I".action.focus-workspace-up = { };
"Mod+Ctrl+Page_Down".action.move-column-to-workspace-down = { };
"Mod+Ctrl+Page_Up".action.move-column-to-workspace-up = { };
"Mod+Ctrl+U".action.move-column-to-workspace-down = { };
"Mod+Ctrl+I".action.move-column-to-workspace-up = { };
"Mod+Page_Down".action.focus-workspace-down = {};
"Mod+Page_Up".action.focus-workspace-up = {};
"Mod+U".action.focus-workspace-down = {};
"Mod+I".action.focus-workspace-up = {};
"Mod+Ctrl+Page_Down".action.move-column-to-workspace-down = {};
"Mod+Ctrl+Page_Up".action.move-column-to-workspace-up = {};
"Mod+Ctrl+U".action.move-column-to-workspace-down = {};
"Mod+Ctrl+I".action.move-column-to-workspace-up = {};
"Mod+Shift+Page_Down".action.move-workspace-down = { };
"Mod+Shift+Page_Up".action.move-workspace-up = { };
"Mod+Shift+U".action.move-workspace-down = { };
"Mod+Shift+I".action.move-workspace-up = { };
"Mod+Shift+Page_Down".action.move-workspace-down = {};
"Mod+Shift+Page_Up".action.move-workspace-up = {};
"Mod+Shift+U".action.move-workspace-down = {};
"Mod+Shift+I".action.move-workspace-up = {};
"Mod+WheelScrollDown" = {
action.focus-workspace-down = { };
action.focus-workspace-down = {};
cooldown-ms = 150;
};
"Mod+WheelScrollUp" = {
action.focus-workspace-up = { };
action.focus-workspace-up = {};
cooldown-ms = 150;
};
"Mod+Ctrl+WheelScrollDown" = {
action.move-column-to-workspace-down = { };
action.move-column-to-workspace-down = {};
cooldown-ms = 150;
};
"Mod+Ctrl+WheelScrollUp" = {
action.move-column-to-workspace-up = { };
action.move-column-to-workspace-up = {};
cooldown-ms = 150;
};
"Mod+WheelScrollRight".action.focus-column-right = { };
"Mod+WheelScrollLeft".action.focus-column-left = { };
"Mod+Ctrl+WheelScrollRight".action.move-column-right = { };
"Mod+Ctrl+WheelScrollLeft".action.move-column-left = { };
"Mod+WheelScrollRight".action.focus-column-right = {};
"Mod+WheelScrollLeft".action.focus-column-left = {};
"Mod+Ctrl+WheelScrollRight".action.move-column-right = {};
"Mod+Ctrl+WheelScrollLeft".action.move-column-left = {};
"Mod+Shift+WheelScrollDown".action.focus-column-right = { };
"Mod+Shift+WheelScrollUp".action.focus-column-left = { };
"Mod+Ctrl+Shift+WheelScrollDown".action.move-column-right = { };
"Mod+Ctrl+Shift+WheelScrollUp".action.move-column-left = { };
"Mod+Shift+WheelScrollDown".action.focus-column-right = {};
"Mod+Shift+WheelScrollUp".action.focus-column-left = {};
"Mod+Ctrl+Shift+WheelScrollDown".action.move-column-right = {};
"Mod+Ctrl+Shift+WheelScrollUp".action.move-column-left = {};
"Mod+1".action.focus-workspace = 1;
"Mod+2".action.focus-workspace = 2;
@ -339,23 +341,23 @@
"Mod+Ctrl+8".action.move-column-to-workspace = 8;
"Mod+Ctrl+9".action.move-column-to-workspace = 9;
"Mod+BracketLeft".action.consume-or-expel-window-left = { };
"Mod+BracketRight".action.consume-or-expel-window-right = { };
"Mod+BracketLeft".action.consume-or-expel-window-left = {};
"Mod+BracketRight".action.consume-or-expel-window-right = {};
"Mod+Comma".action.consume-window-into-column = { };
"Mod+Period".action.expel-window-from-column = { };
"Mod+Comma".action.consume-window-into-column = {};
"Mod+Period".action.expel-window-from-column = {};
"Mod+R".action.switch-preset-column-width = { };
"Mod+Shift+R".action.switch-preset-window-height = { };
"Mod+Ctrl+R".action.reset-window-height = { };
"Mod+F".action.maximize-column = { };
"Mod+Shift+F".action.fullscreen-window = { };
"Mod+R".action.switch-preset-column-width = {};
"Mod+Shift+R".action.switch-preset-window-height = {};
"Mod+Ctrl+R".action.reset-window-height = {};
"Mod+F".action.maximize-column = {};
"Mod+Shift+F".action.fullscreen-window = {};
"Mod+Ctrl+F".action.expand-column-to-available-width = { };
"Mod+Ctrl+F".action.expand-column-to-available-width = {};
"Mod+C".action.center-column = { };
"Mod+C".action.center-column = {};
"Mod+Ctrl+C".action.center-visible-columns = { };
"Mod+Ctrl+C".action.center-visible-columns = {};
"Mod+Minus".action.set-column-width = "-10%";
"Mod+Equal".action.set-column-width = "+10%";
@ -363,26 +365,26 @@
"Mod+Shift+Minus".action.set-window-height = "-10%";
"Mod+Shift+Equal".action.set-window-height = "+10%";
"Mod+V".action.toggle-window-floating = { };
"Mod+Shift+V".action.switch-focus-between-floating-and-tiling = { };
"Mod+V".action.toggle-window-floating = {};
"Mod+Shift+V".action.switch-focus-between-floating-and-tiling = {};
"Mod+W".action.toggle-column-tabbed-display = { };
"Mod+W".action.toggle-column-tabbed-display = {};
"Print".action.screenshot = { };
"Mod+Shift+S".action.screenshot = { };
"Ctrl+Print".action.screenshot-screen = { };
"Alt+Print".action.screenshot-window = { };
"Print".action.screenshot = {};
"Mod+Shift+S".action.screenshot = {};
"Ctrl+Print".action.screenshot-screen = {};
"Alt+Print".action.screenshot-window = {};
"Mod+Escape" = {
action.toggle-keyboard-shortcuts-inhibit = { };
action.toggle-keyboard-shortcuts-inhibit = {};
allow-inhibiting = false;
};
"Mod+Shift+E".action.quit = { };
"Ctrl+Alt+Delete".action.quit = { };
"Mod+Shift+E".action.quit = {};
"Ctrl+Alt+Delete".action.quit = {};
"Mod+Shift+P" = {
action.power-off-monitors = { };
action.power-off-monitors = {};
hotkey-overlay.title = "Turn off the display";
};
};

View file

@ -3,9 +3,7 @@
config,
lib,
...
}:
let
}: let
# Get the actual color palettes
darkPalette = pkgs.catppuccin.${config.catppuccin.flavor};
lightPalette = pkgs.catppuccin.latte;
@ -44,45 +42,48 @@ let
customPackage = pkgs.noctalia-shell.overrideAttrs (oldAttrs: {
pname = "noctalia-shell-custom";
nativeBuildInputs = (oldAttrs.nativeBuildInputs or [ ]) ++ [ pkgs.jq ];
nativeBuildInputs = (oldAttrs.nativeBuildInputs or []) ++ [pkgs.jq];
postPatch = (oldAttrs.postPatch or "") + ''
echo "Patching noctalia-shell with Cat-Custom theme..."
echo " Dark: ${config.catppuccin.flavor} / Light: latte"
echo " Accent: ${config.catppuccin.accent}"
if [ -d Assets/ColorScheme/Catppuccin ]; then
mkdir -p Assets/ColorScheme/Cat-Custom
# Write the JSON directly
cat > Assets/ColorScheme/Cat-Custom/Cat-Custom.json << 'COLORSCHEME_EOF'
${schemeJson}
COLORSCHEME_EOF
echo "Created Cat-Custom color scheme:"
${pkgs.jq}/bin/jq -C '.' Assets/ColorScheme/Cat-Custom/Cat-Custom.json || true
# Add translation entries
for lang in en fr de es pt zh-CN; do
if [ -f "Assets/Translations/$lang.json" ]; then
${pkgs.jq}/bin/jq \
'.["color-scheme"].predefined.schemes["Cat-Custom"] = "Cat-Custom"' \
"Assets/Translations/$lang.json" > "Assets/Translations/$lang.json.tmp" \
&& mv "Assets/Translations/$lang.json.tmp" "Assets/Translations/$lang.json"
fi
done
else
echo "ERROR: ColorScheme directory not found"
exit 1
fi
'';
postPatch =
(oldAttrs.postPatch or "")
+ ''
echo "Patching noctalia-shell with Cat-Custom theme..."
echo " Dark: ${config.catppuccin.flavor} / Light: latte"
echo " Accent: ${config.catppuccin.accent}"
meta = oldAttrs.meta // {
description = "${oldAttrs.meta.description} (Cat-Custom: ${config.catppuccin.flavor}/${config.catppuccin.accent})";
};
if [ -d Assets/ColorScheme/Catppuccin ]; then
mkdir -p Assets/ColorScheme/Cat-Custom
# Write the JSON directly
cat > Assets/ColorScheme/Cat-Custom/Cat-Custom.json << 'COLORSCHEME_EOF'
${schemeJson}
COLORSCHEME_EOF
echo "Created Cat-Custom color scheme:"
${pkgs.jq}/bin/jq -C '.' Assets/ColorScheme/Cat-Custom/Cat-Custom.json || true
# Add translation entries
for lang in en fr de es pt zh-CN; do
if [ -f "Assets/Translations/$lang.json" ]; then
${pkgs.jq}/bin/jq \
'.["color-scheme"].predefined.schemes["Cat-Custom"] = "Cat-Custom"' \
"Assets/Translations/$lang.json" > "Assets/Translations/$lang.json.tmp" \
&& mv "Assets/Translations/$lang.json.tmp" "Assets/Translations/$lang.json"
fi
done
else
echo "ERROR: ColorScheme directory not found"
exit 1
fi
'';
meta =
oldAttrs.meta
// {
description = "${oldAttrs.meta.description} (Cat-Custom: ${config.catppuccin.flavor}/${config.catppuccin.accent})";
};
});
in
{
in {
programs.noctalia-shell = {
enable = true;
package = customPackage;
@ -91,7 +92,7 @@ in
bar = {
position = "top";
backgroundOpacity = 1;
monitors = [ ];
monitors = [];
density = "comfortable";
showCapsule = true;
capsuleOpacity = 1;
@ -256,7 +257,7 @@ in
enabled = true;
overviewEnabled = false;
directory = "/home/sckova/.local/share/wallpaper";
monitorDirectories = [ ];
monitorDirectories = [];
enableMultiMonitorDirectories = false;
recursiveSearch = false;
setWallpaperOnAllMonitors = true;
@ -275,7 +276,7 @@ in
enableClipboardHistory = true;
enableClipPreview = true;
position = "top_left";
pinnedExecs = [ ];
pinnedExecs = [];
useApp2Unit = false;
sortByMostUsed = true;
terminalCommand = "kitty -e";
@ -360,8 +361,8 @@ in
floatingRatio = 1;
size = 1;
onlySameOutput = true;
monitors = [ ];
pinnedApps = [ ];
monitors = [];
pinnedApps = [];
colorizeIcons = false;
pinnedStatic = false;
inactiveIndicators = false;
@ -404,7 +405,7 @@ in
};
notifications = {
enabled = true;
monitors = [ ];
monitors = [];
location = "top_right";
overlayLayer = true;
backgroundOpacity = 1;
@ -434,7 +435,7 @@ in
1
2
];
monitors = [ ];
monitors = [];
};
audio = {
volumeStep = 5;
@ -442,7 +443,7 @@ in
cavaFrameRate = 30;
visualizerType = "linear";
visualizerQuality = "high";
mprisBlacklist = [ ];
mprisBlacklist = [];
preferredPlayer = "";
externalMixer = "pwvucontrol || pavucontrol";
};
@ -498,8 +499,8 @@ in
systemd.user.services.noctalia-shell = {
Unit = {
After = [ "niri.service" ];
PartOf = [ "niri.service" ];
After = ["niri.service"];
PartOf = ["niri.service"];
Description = "Noctalia Shell - Wayland desktop shell";
Documentation = "https://docs.noctalia.dev/docs";
};
@ -517,7 +518,7 @@ in
};
Install = {
WantedBy = [ "niri.service" ];
WantedBy = ["niri.service"];
};
};
}

View file

@ -1,5 +1,8 @@
{ pkgs, config, ... }:
let
{
pkgs,
config,
...
}: let
bingWallpaperScript = pkgs.writeShellScript "bing-wallpaper" ''
set -euo pipefail
@ -59,8 +62,7 @@ let
echo "Wallpaper downloaded and applied successfully."
'';
in
{
in {
systemd.user.services.bing-wallpaper = {
Unit = {
Description = "Download and set Bing wallpaper of the day";
@ -81,7 +83,7 @@ in
};
Install = {
WantedBy = [ "niri.service" ];
WantedBy = ["niri.service"];
};
};
}