Regenerated
This commit is contained in:
+7
-150
@@ -1,78 +1,17 @@
|
||||
Rewrite my ./generated/modules/traveldroid/desktop/stylix.nix to integrate nicely with my existing flake.nix en host.nix
|
||||
Rewrite my ./generated/modules/traveldroid/system/dbus.nix to integrate nicely with my existing flake.nix en host.nix
|
||||
Avoid infinite recursion
|
||||
Just look at how to rewrite this, ignore previous interactions around stylix.nix
|
||||
Just look at how to rewrite this, ignore previous interactions around this nix
|
||||
This version worked, stay as close to it as you can.
|
||||
Specifically avoid this error:
|
||||
error: The option `home-manager.users.henrov.stylix' does not exist. Definition values:
|
||||
- In `/nix/store/lbvakwy35r61bb10s9pj921dsndq5g2p-source/Droidnix/generated/modules/traveldroid/desktop/stylix.nix':
|
||||
{
|
||||
enable = true;
|
||||
targets = {
|
||||
gtk = {
|
||||
enable = true;
|
||||
...
|
||||
Just add gtk.target = enable
|
||||
I added gtk.nix for reference
|
||||
I added thunar.nix for reference
|
||||
|
||||
|
||||
|
||||
|
||||
------------------------------------------------------------------------
|
||||
{ lib, config, pkgs, ... }:
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
username = config.defaultUser or "henrov";
|
||||
|
||||
moduleName = "stylix";
|
||||
assetPath = ../../../assets/system/conf/${moduleName};
|
||||
|
||||
# Read all files in asset directory
|
||||
programFiles = builtins.readDir assetPath;
|
||||
|
||||
files = lib.genAttrs (builtins.attrNames programFiles) (name: {
|
||||
source = "${assetPath}/${name}";
|
||||
});
|
||||
|
||||
# Read 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;
|
||||
in
|
||||
{
|
||||
# System packages
|
||||
environment.systemPackages = [
|
||||
pkgs.feh
|
||||
pkgs.st
|
||||
];
|
||||
|
||||
# Home Manager user settings
|
||||
_module.args.hmUsers = {
|
||||
${username} = {
|
||||
|
||||
# Copy all stylix config files into ~/.config/stylix/
|
||||
xdg.configFile =
|
||||
lib.mapAttrs' (name: value: {
|
||||
name = "${moduleName}/${name}";
|
||||
value = { inherit (value) source; };
|
||||
}) files;
|
||||
|
||||
# Session variables
|
||||
home.sessionVariables = {
|
||||
STYLIX_CONF = "$HOME/.config/stylix/stylix.conf";
|
||||
|
||||
XCURSOR_THEME = cursorName;
|
||||
XCURSOR_SIZE = toString cursorSize;
|
||||
HYPRCURSOR_THEME = cursorName;
|
||||
HYPRCURSOR_SIZE = toString cursorSize;
|
||||
};
|
||||
};
|
||||
services.dbus = {
|
||||
enable = true;
|
||||
# Use the dbus-broker backend explicitly
|
||||
package = pkgs.dbus-broker;
|
||||
};
|
||||
}
|
||||
------------------------------------------------------------------------
|
||||
@@ -174,85 +113,3 @@ in
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
}
|
||||
|
||||
gtk.nix:
|
||||
|
||||
{ pkgs, config, lib, ... }:
|
||||
|
||||
let
|
||||
# Resolve the username from the host config
|
||||
username = config.defaultUser or "henrov";
|
||||
in
|
||||
{
|
||||
############################
|
||||
# System-level GTK packages
|
||||
############################
|
||||
environment.systemPackages = with pkgs; [
|
||||
gtk3
|
||||
gtk4
|
||||
];
|
||||
|
||||
############################
|
||||
# Home Manager user-level GTK configuration
|
||||
############################
|
||||
# Directly assign the GTK config to the user, no recursiveUpdate
|
||||
home-manager.users."${username}" = {
|
||||
gtk = {
|
||||
enable = true;
|
||||
|
||||
# GTK theme
|
||||
theme = {
|
||||
name = "Catppuccin-Mocha-Standard-Blue-Dark";
|
||||
package = pkgs.magnetic-catppuccin-gtk;
|
||||
};
|
||||
|
||||
# Icon theme
|
||||
iconTheme = {
|
||||
name = "Papirus-Dark";
|
||||
package = pkgs.papirus-icon-theme;
|
||||
};
|
||||
|
||||
# Extra GTK3 / GTK4 settings
|
||||
gtk3.extraConfig = {
|
||||
"gtk-application-prefer-dark-theme" = 1;
|
||||
};
|
||||
gtk4.extraConfig = {
|
||||
"gtk-application-prefer-dark-theme" = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Thunar.nix:
|
||||
|
||||
{ pkgs, config, lib, ... }:
|
||||
|
||||
let
|
||||
# Resolve the default username from host config
|
||||
username = config.defaultUser or "henrov";
|
||||
in
|
||||
{
|
||||
############################
|
||||
# System-level packages
|
||||
############################
|
||||
environment.systemPackages = with pkgs; [
|
||||
thunar # main file manager
|
||||
thunar-archive-plugin # zip, tar, rar, 7z support
|
||||
thunar-volman # auto-mount removable drives
|
||||
gvfs # support for external drives and network shares
|
||||
xarchiver # optional GUI archive manager
|
||||
];
|
||||
|
||||
############################
|
||||
# Home Manager user-level configuration
|
||||
############################
|
||||
# Direct assignment to the user avoids recursiveUpdate issues
|
||||
home-manager.users."${username}" = {
|
||||
home.stateVersion = "26.05"; # required
|
||||
|
||||
home.sessionVariables = {
|
||||
FILE_MANAGER = "thunar";
|
||||
USERNAME = username;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user