Regenerated

This commit is contained in:
2026-03-25 20:19:35 +00:00
parent 7221d53d2d
commit fa44f9863b
3 changed files with 91 additions and 124 deletions
+17 -124
View File
@@ -1,145 +1,38 @@
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/bluetooth.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 this nix.
Solve the error. That is really important.
Look at hyprland.nix to see how to avoid the home error
{ lib, config, pkgs, flakeRoot, ... }:
let
username = config.defaultUser or "henrov";
moduleName = "stylix";
# Path to stylix assets
assetPath = "${flakeRoot}/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;
in
{
#################################
# System packages
#################################
environment.systemPackages = [
pkgs.feh
pkgs.st
];
#################################
# Home Manager user-level configuration
#################################
_module.args.hmUsers = {
"${username}" = {
# Copy all stylix config files into ~/.config/stylix/
home.file = lib.mkMerge (lib.mapAttrs' (name: value: {
name = "${moduleName}/${name}";
value = { inherit (value) source; };
}) files);
# Include stylix.conf if it exists
home.file."${moduleName}/stylix.conf".text = stylixConf;
# Session variables for Stylix & cursors
home.sessionVariables = {
STYLIX_CONF = "$HOME/.config/stylix/stylix.conf";
XCURSOR_THEME = cursorName;
XCURSOR_SIZE = toString cursorSize;
HYPRCURSOR_THEME = cursorName;
HYPRCURSOR_SIZE = toString cursorSize;
};
};
};
}
------------------------------------------------------------------------
{ lib, config, pkgs, flakeRoot, ... }:
let
username = config.defaultUser or "henrov";
moduleName = "stylix";
{ config, pkgs, ... }:
# 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;
in
{
############################
# System packages
# Bluetooth hardware
############################
environment.systemPackages = [
pkgs.feh
pkgs.st
hardware.bluetooth = {
enable = true; # turn on the daemon
powerOnBoot = true; # auto-power on
package = pkgs.bluez; # singular, not a list
};
############################
# GUI Bluetooth manager
############################
environment.systemPackages = with pkgs; [
blueman # graphical Bluetooth manager
];
stylix = {
enable = true;
base16Scheme = "${flakeRoot}/assets/system/theming/stylix/catppuccin-mocha.yaml";
polarity = "dark";
targets = {
gtk = { enable = true; };
};
};
############################
# Home Manager user settings
# PipeWire for Bluetooth audio
############################
# Use the _module.args.hmUsers style to avoid "option does not exist"
_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;
# Optionally include stylix.conf
home.file."${moduleName}/stylix.conf".text = stylixConf;
# 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.pipewire.enable = true;
}
------------------------------------------------------------------------
flake.nix
+39
View File
@@ -920,6 +920,45 @@ in
* generated/modules/traveldroid/system
** =generated/modules/traveldroid/system/bluetooth.nix=
#+BEGIN_SRC nix :tangle generated/modules/traveldroid/system/bluetooth.nix :noweb tangle :mkdirp yes :eval never-html
{ lib, config, pkgs, flakeRoot, home-manager, ... }:
let
username = config.defaultUser or "henrov";
in
{
############################
# Bluetooth daemon
############################
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
package = pkgs.bluez; # singular, not a list
};
############################
# GUI Bluetooth manager
############################
environment.systemPackages = with pkgs; [
blueman
];
############################
# Optional Home Manager integration
############################
_module.args.hmUsers = lib.mkIf (home-manager != null) {
${username} = {
# If you want a graphical tray or manager accessible in user session
home.packages = [ pkgs.blueman ];
# Example: could drop any config files for blueman here
home.file = {};
};
};
}
#+END_SRC
** =generated/modules/traveldroid/system/dbus.nix=
This sets the dbus implementation
#+BEGIN_SRC nix :tangle generated/modules/traveldroid/system/dbus.nix :noweb tangle :mkdirp yes :eval never-html
@@ -0,0 +1,35 @@
{ lib, config, pkgs, flakeRoot, home-manager, ... }:
let
username = config.defaultUser or "henrov";
in
{
############################
# Bluetooth daemon
############################
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
package = pkgs.bluez; # singular, not a list
};
############################
# GUI Bluetooth manager
############################
environment.systemPackages = with pkgs; [
blueman
];
############################
# Optional Home Manager integration
############################
_module.args.hmUsers = lib.mkIf (home-manager != null) {
${username} = {
# If you want a graphical tray or manager accessible in user session
home.packages = [ pkgs.blueman ];
# Example: could drop any config files for blueman here
home.file = {};
};
};
}