Regenerated
This commit is contained in:
+23
-5
@@ -624,27 +624,32 @@ in
|
||||
{ lib, config, pkgs, flakeRoot, ... }:
|
||||
|
||||
let
|
||||
# Resolve the default username
|
||||
username = config.defaultUser or "henrov";
|
||||
moduleName = "stylix";
|
||||
|
||||
assetPath = "${flakeRoot}/assets/system/conf/${moduleName}";
|
||||
# Path to stylix assets
|
||||
assetPath = ../../../assets/system/conf/${moduleName};
|
||||
|
||||
# Read all files in the asset directory
|
||||
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 "";
|
||||
|
||||
# Cursor defaults
|
||||
cursorName = "phinger-cursors-light";
|
||||
cursorSize = 24;
|
||||
|
||||
# Merge all config files and optional stylix.conf into a single home.file set
|
||||
# Merge all config files + optional stylix.conf into one home.file set
|
||||
homeFiles = lib.recursiveUpdate
|
||||
(lib.genAttrs (builtins.attrNames files) (name: {
|
||||
path = "${moduleName}/${name}";
|
||||
@@ -655,22 +660,35 @@ let
|
||||
} else {});
|
||||
in
|
||||
{
|
||||
############################
|
||||
# System packages
|
||||
############################
|
||||
environment.systemPackages = [
|
||||
pkgs.feh
|
||||
pkgs.st
|
||||
];
|
||||
|
||||
############################
|
||||
# Home Manager user settings
|
||||
############################
|
||||
home-manager.users."${username}" = {
|
||||
# Enable Stylix
|
||||
stylix = {
|
||||
enable = true;
|
||||
targets = { gtk = { enable = true; }; };
|
||||
enable = true;
|
||||
|
||||
# GTK integration for this user
|
||||
targets = {
|
||||
gtk = { enable = true; };
|
||||
};
|
||||
};
|
||||
|
||||
# Single home.file definition, no duplicates
|
||||
# Copy all config files into ~/.config/stylix/
|
||||
home.file = homeFiles;
|
||||
|
||||
# Session environment variables
|
||||
home.sessionVariables = {
|
||||
STYLIX_CONF = "$HOME/.config/stylix/stylix.conf";
|
||||
|
||||
XCURSOR_THEME = cursorName;
|
||||
XCURSOR_SIZE = toString cursorSize;
|
||||
HYPRCURSOR_THEME = cursorName;
|
||||
|
||||
Reference in New Issue
Block a user