refactor: move state migration to pre-flight, fix XDG hardcoding, and prevent Nix store bloat

This commit is contained in:
Bernardo Magri
2026-04-06 21:37:24 +01:00
parent 0194569a42
commit db6bdd8495
5 changed files with 114 additions and 90 deletions

View File

@@ -1,4 +1,4 @@
{ config, ... }:
{ config, lib, ... }:
{
xdg.configFile."nomarchy/current/theme" = {
@@ -16,7 +16,20 @@
xdg.configFile."nomarchy/branding/icon.txt".source = ../../assets/branding/icon.txt;
# Expose all themes to the system via local share for script accessibility
xdg.dataFile."nomarchy/themes".source = ../../assets/themes;
# We filter out images to prevent Nix Store bloat
xdg.dataFile."nomarchy/themes".source = builtins.path {
name = "nomarchy-themes-no-images";
path = ../../assets/themes;
filter = path: type:
let
baseName = baseNameOf path;
in
! (type == "regular" && (
lib.hasSuffix ".jpg" baseName ||
lib.hasSuffix ".png" baseName ||
lib.hasSuffix ".jpeg" baseName
));
};
# Nautilus python extensions
xdg.dataFile."nautilus-python/extensions/localsend.py".source = ../../assets/nautilus-python/extensions/localsend.py;