Regenerated

This commit is contained in:
2026-03-24 09:27:47 +00:00
parent f92319a66f
commit 1d42042d7b
20 changed files with 28 additions and 800 deletions
+28 -28
View File
@@ -624,53 +624,53 @@ in
{ lib, config, pkgs, flakeRoot, ... }:
let
# Default username
username = config.defaultUser or "henrov";
moduleName = "stylix";
assetPath = "${flakeRoot}/assets/traveldroid/conf/";
# Read all files in the asset directory
assetPath = "${flakeRoot}/assets/system/conf/${moduleName}";
programFiles = builtins.readDir assetPath;
files = lib.genAttrs (builtins.attrNames programFiles) (name: {
source = "${assetPath}/${name}";
});
# Optional stylix.conf
stylixConfFile = "${assetPath}/stylix.conf";
stylixConf = if builtins.pathExists stylixConfFile then builtins.readFile stylixConfFile else "";
stylixConf =
if builtins.pathExists stylixConfFile
then builtins.readFile stylixConfFile
else "";
# Cursor defaults
cursorName = "phinger-cursors-light";
cursorSize = 24;
in {
############################
# System-level packages
############################
environment.systemPackages = with pkgs; [
feh
st
stylix
];
############################
# Home Manager user config
############################
home-manager.users."${username}" = {
# Map all configuration files into ~/.config/stylix/
home.file = lib.genAttrs (builtins.attrNames files) (name: {
# Merge all config files and optional stylix.conf into a single home.file set
homeFiles = lib.recursiveUpdate
(lib.genAttrs (builtins.attrNames files) (name: {
path = "${moduleName}/${name}";
source = files.${name}.source;
});
}))
(if stylixConf != "" then {
"${moduleName}/stylix.conf" = { text = stylixConf; };
} else {});
in
{
environment.systemPackages = [
pkgs.feh
pkgs.st
];
# Optionally write stylix.conf if it exists
home.file."${moduleName}/stylix.conf".text = stylixConf;
home-manager.users."${username}" = {
stylix = {
enable = true;
targets = { gtk = { enable = true; }; };
};
# Single home.file definition, no duplicates
home.file = homeFiles;
# GTK target (enabled via config file)
# No need to define a `stylix` attribute directly
home.sessionVariables = {
STYLIX_CONF = "$HOME/.config/stylix/stylix.conf";
XCURSOR_THEME = cursorName;
XCURSOR_SIZE = toString cursorSize;
HYPRCURSOR_THEME = cursorName;