Files
nixos/Droidnix/generated/modules/traveldroid/desktop/stylix.nix
T
2026-03-24 08:49:31 +00:00

57 lines
1.3 KiB
Nix

{ pkgs, lib, config, flakeRoot, ... }:
let
username = config.defaultUser or "henrov";
moduleName = "stylix";
assetPath = "${flakeRoot}/assets/traveldroid/conf/";
programFiles = builtins.readDir assetPath;
files = lib.genAttrs (builtins.attrNames programFiles) (name: {
source = "${assetPath}/${name}";
});
cursorName = "phinger-cursors-light";
cursorSize = 24;
in
{
############################
# System-level packages
############################
environment.systemPackages = [
pkgs.feh
pkgs.st
];
############################
# Home Manager user config
############################
home-manager.users = lib.recursiveUpdate (config.home-manager.users or {}) {
"${username}" = {
stylix = {
enable = true;
targets = {
gtk = {
enable = true;
};
};
xdg.configFile = lib.mapAttrs' (name: value: {
name = "${moduleName}/${name}";
value = { inherit (value) source; };
}) files;
};
home.sessionVariables = {
STYLIX_CONF = "$HOME/.config/stylix/stylix.conf";
XCURSOR_THEME = cursorName;
XCURSOR_SIZE = toString cursorSize;
HYPRCURSOR_THEME = cursorName;
HYPRCURSOR_SIZE = toString cursorSize;
};
};
};
}