feat(system): comprehensive branding, styling, and system feature update

- Relocate themes to assets/themes/ and update all references.
- Implement custom SDDM theme and Plymouth theme enhancements.
- Add themed templates for Alacritty, Hyprland, Waybar, and other apps.
- Introduce Makima key remapper module and configuration.
- Add Voxtype and Walker configurations.
- Implement systemd power management and timeout optimizations.
- Add Nautilus-python extensions for LocalSend.
- Update branding assets and ASCII art integration.
This commit is contained in:
Bernardo Magri
2026-04-05 10:52:41 +01:00
parent 9d5049aed5
commit 514b305713
465 changed files with 3770 additions and 578 deletions

View File

@@ -1,7 +1,7 @@
{ config, pkgs, inputs, lib, ... }:
let
palettes = import ../../themes/nomarchy-palettes.nix;
palettes = import ../../assets/themes/nomarchy-palettes.nix;
userPackagesFile = "${config.home.homeDirectory}/.config/home-manager/user-packages.json";
userPackages = if builtins.pathExists userPackagesFile then
let

View File

@@ -39,7 +39,7 @@ let
installPhase = ''
mkdir -p $out/bin
cp -r * $out/bin/
find . -type f -exec cp {} $out/bin/ \;
chmod +x $out/bin/*
# Wrap every script to ensure dependencies are in PATH and inject configuration

View File

@@ -119,9 +119,9 @@ in
fonts.monospace = togglesState.font or "JetBrainsMono Nerd Font";
# Derived properties from the theme directory
isLightMode = builtins.pathExists (../../themes + "/${togglesState.theme or "nord"}/light.mode");
isLightMode = builtins.pathExists (../../assets/themes + "/${togglesState.theme or "nord"}/light.mode");
iconsTheme = let
iconsFile = ../../themes + "/${togglesState.theme or "nord"}/icons.theme";
iconsFile = ../../assets/themes + "/${togglesState.theme or "nord"}/icons.theme";
in
if builtins.pathExists iconsFile
then lib.removeSuffix "\n" (builtins.readFile iconsFile)

View File

@@ -2,12 +2,12 @@
let
# Re-use our state-based logic
palettes = import ../../themes/nomarchy-palettes.nix;
palettes = import ../../assets/themes/nomarchy-palettes.nix;
activeThemeName = config.nomarchy.theme;
activeWallpaper = if config.nomarchy.wallpaper != "" then
config.nomarchy.wallpaper
else "${../../themes/catppuccin/backgrounds/1-totoro.png}"; # Fallback
else "${../../assets/themes/catppuccin/backgrounds/1-totoro.png}"; # Fallback
# Map nix-colors palette to a format Stylix expects (attrset of hex strings)
currentPalette = (palettes.${activeThemeName} or palettes.nord).palette;

View File

@@ -2,7 +2,7 @@
{
xdg.configFile."nomarchy/current/theme" = {
source = ../../themes/${config.nomarchy.theme};
source = ../../assets/themes/${config.nomarchy.theme};
recursive = true;
};
@@ -13,5 +13,8 @@
xdg.configFile."nomarchy/branding/logo.txt".source = ../../assets/branding/logo.txt;
# Expose all themes to the system via local share for script accessibility
xdg.dataFile."nomarchy/themes".source = ../../themes;
xdg.dataFile."nomarchy/themes".source = ../../assets/themes;
# Nautilus python extensions
xdg.dataFile."nautilus-python/extensions/localsend.py".source = ../../assets/nautilus-python/extensions/localsend.py;
}

View File

@@ -1,7 +1,7 @@
{ config, pkgs, ... }:
let
palettes = import ../../themes/nomarchy-palettes.nix;
palettes = import ../../assets/themes/nomarchy-palettes.nix;
themeNames = builtins.attrNames palettes;
themeList = builtins.concatStringsSep "\\n" themeNames;

View File

@@ -1,7 +1,7 @@
{ config, pkgs, lib, ... }:
let
palettes = import ../../themes/nomarchy-palettes.nix;
palettes = import ../../assets/themes/nomarchy-palettes.nix;
activeThemeName = config.nomarchy.system.theme;
currentPalette = (palettes.${activeThemeName} or palettes.nord).palette;

View File

@@ -4,6 +4,7 @@
imports = [
./options.nix
./state.nix
./systemd.nix
./plymouth.nix
./sddm.nix
./hardware.nix
@@ -12,6 +13,7 @@
./network.nix
./browser.nix
./impermanence.nix
./makima.nix
];
time.timeZone = config.nomarchy.system.timezone;

View File

@@ -62,6 +62,7 @@ in
(mkIf config.nomarchy.system.features.hybridGPU {
services.supergfxd.enable = true;
systemd.services.supergfxd.serviceConfig.ExecStartPre = "-${pkgs.coreutils}/bin/sleep 5";
})
];
}

25
modules/system/makima.nix Normal file
View File

@@ -0,0 +1,25 @@
{ config, pkgs, lib, ... }:
let
cfg = config.nomarchy.system.features.makima;
in
{
config = lib.mkIf cfg {
# If the user has makima-bin available in their overlays (as they originally used a custom package),
# this will install it. Otherwise, it will fail evaluation if not available in nixpkgs.
environment.systemPackages = [ pkgs.makima-bin ];
environment.etc."makima/AT Translated Set 2 keyboard.toml".source = ../../assets/makima + "/AT Translated Set 2 keyboard.toml";
systemd.services.makima = {
description = "Makima key remapping service";
wantedBy = [ "multi-user.target" ];
serviceConfig = {
User = config.services.displayManager.autoLogin.user;
Environment = "MAKIMA_CONFIG=/etc/makima";
ExecStart = "${pkgs.makima-bin}/bin/makima";
Restart = "on-failure";
};
};
};
}

View File

@@ -40,6 +40,11 @@
default = false;
description = "Whether to enable hybrid GPU support (supergfxd).";
};
makima = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Whether to enable makima key remapper.";
};
};
theme = lib.mkOption {
type = lib.types.str;

View File

@@ -1,11 +1,25 @@
{ config, pkgs, lib, ... }:
let
nomarchy-sddm-theme = pkgs.stdenv.mkDerivation {
pname = "nomarchy-sddm-theme";
version = "1.0";
src = ../../assets/sddm/nomarchy;
installPhase = ''
mkdir -p $out/share/sddm/themes/nomarchy
cp -r * $out/share/sddm/themes/nomarchy/
'';
};
in
{
services.displayManager.sddm = {
enable = true;
wayland.enable = true;
theme = "nomarchy";
};
environment.systemPackages = [ nomarchy-sddm-theme ];
# Enable Hyprland system-level dependencies
programs.hyprland.enable = true;
}

View File

@@ -22,6 +22,7 @@ in
fingerprint = systemState.features.fingerprint or false;
fido2 = systemState.features.fido2 or false;
hybridGPU = systemState.features.hybridGPU or false;
makima = systemState.features.makima or false;
};
theme = systemState.theme or "nord";
};

View File

@@ -0,0 +1,64 @@
{ config, pkgs, lib, ... }:
{
systemd.settings.Manager.DefaultTimeoutStopSec = "5s";
systemd.services."user@".serviceConfig.TimeoutStopSec = "5s";
powerManagement.powerDownCommands = ''
# --- force-igpu ---
# Use the Vfio to Integrated trick to turn off NVIDIA dgpu when in integrated mode
if [[ $1 == "hibernate" ]] && ${pkgs.coreutils}/bin/lsmod | grep -q supergfxd; then
${pkgs.supergfxctl}/bin/supergfxctl -m Vfio || true
sleep 1
fi
# --- keyboard-backlight ---
# Turn off keyboard backlight before hibernate to prevent hang on power-off.
if [[ $1 == "hibernate" ]]; then
device=""
for candidate in /sys/class/leds/*kbd_backlight*; do
if [[ -e "$candidate" ]]; then
device="$(${pkgs.coreutils}/bin/basename "$candidate")"
break
fi
done
if [[ -n "$device" ]]; then
${pkgs.brightnessctl}/bin/brightnessctl -d "$device" set 0 >/dev/null 2>&1 || true
fi
fi
# --- unmount-fuse ---
# Lazy-unmount gvfsd-fuse filesystems before suspend/hibernate
while IFS=' ' read -r _ mountpoint fstype _; do
if [[ $fstype == fuse.gvfsd-fuse ]]; then
mountpoint=$(printf '%b' "$mountpoint")
${pkgs.fuse3}/bin/fusermount3 -uz "$mountpoint" 2>/dev/null || ${pkgs.fuse}/bin/fusermount -uz "$mountpoint" 2>/dev/null || true
fi
done < /proc/mounts
'';
powerManagement.resumeCommands = ''
# --- force-igpu ---
if ${pkgs.coreutils}/bin/lsmod | grep -q supergfxd; then
sleep 4
${pkgs.supergfxctl}/bin/supergfxctl -m Vfio || true
sleep 1
${pkgs.supergfxctl}/bin/supergfxctl -m Integrated || true
fi
# --- unmount-fuse ---
(
sleep 5
for uid_dir in /run/user/*; do
uid="$(${pkgs.coreutils}/bin/basename "$uid_dir")"
if [[ -S $uid_dir/bus ]]; then
sudo -u "#$uid" env \
DBUS_SESSION_BUS_ADDRESS="unix:path=$uid_dir/bus" \
XDG_RUNTIME_DIR="$uid_dir" \
systemctl --user restart gvfs-daemon.service 2>/dev/null || true
fi
done
) &
'';
}