Regenerated

This commit is contained in:
2026-03-20 08:31:08 +00:00
parent 4d0cbd7718
commit 5b2c045c81
29 changed files with 1497 additions and 0 deletions
@@ -0,0 +1,12 @@
{ lib, pkgs, config, ... }:
{
options.enableFonts = lib.mkEnableOption "Enable nerd fonts";
config = lib.mkIf (config.enableFonts or false) {
fonts.packages = with pkgs; [
nerd-fonts.iosevka
nerd-fonts.fira-code
];
};
}
@@ -0,0 +1,30 @@
{ pkgs, user, ... }:
{
environment.systemPackages = with pkgs; [
gtk3 # GTK target
gtk4 # GTK target
];
# Stylix GTK target
stylix.targets.gtk.enable = true;
home-manager.users.${user.username} = {
gtk = {
enable = true;
theme = {
name = "Catppuccin-Mocha-Standard-Blue-Dark";
package = pkgs.magnetic-catppuccin-gtk;
};
iconTheme = {
name = "Papirus-Dark";
package = pkgs.papirus-icon-theme;
};
gtk3.extraConfig = {
gtk-application-prefer-dark-theme = 1;
};
gtk4.extraConfig = {
gtk-application-prefer-dark-theme = 1;
};
};
};
}
@@ -0,0 +1,93 @@
{ lib, config, ... }:
let
# --- Module variables ---
moduleName = "hyprland";
username = config.defaultUser or "henrov";
# Assets directory
assetPath = ../../../assets/hyprland/conf/hypr;
# Read all files except main config
allFiles =
if builtins.pathExists assetPath
then builtins.readDir assetPath
else {};
otherFiles = lib.filter (name: name != "hyprland.conf") (builtins.attrNames allFiles);
files = lib.genAttrs otherFiles (name: {
src = "${assetPath}/${name}";
});
# Main config (inline)
mainConfigPath =
if builtins.pathExists "${assetPath}/hyprland.conf"
then "${assetPath}/hyprland.conf"
else null;
# Top-level toggle
enableProgram = config.enableHyprland or false;
in
{
# --- Option ---
options.enableHyprland = lib.mkEnableOption "Enable Hyprland desktop";
# --- Config ---
config = lib.mkIf enableProgram {
# Enable Hyprland programmatically
programs.hyprland.enable = true;
# --- Home Manager wiring ---
home-manager.users.${username} = {
home.stateVersion = "26.05";
home.username = username;
home.homeDirectory = "/home/${username}";
wayland.windowManager.hyprland = {
enable = true;
settings.general."col.active_border" = lib.mkForce "0xff97cbcd 0xff89b4fa";
};
# Deploy config files
xdg.configFile =
(lib.mapAttrs' (name: value: {
name = "hypr/${name}";
value.source = value.src;
}) files)
// (if mainConfigPath != null then {
"hypr/hyprland.conf".text = builtins.readFile mainConfigPath;
} else {})
// {
"hypr/.keep".text = "";
};
};
# --- Optional: systemd service to sync configs ---
systemd.services."${moduleName}-sync" = {
description = "Sync ${moduleName} configuration files";
wantedBy = [ "multi-user.target" ];
wants = [ "network-online.target" ];
after = [ "network-online.target" ];
serviceConfig = {
Type = "oneshot";
ExecStart = ''
set -euo pipefail
if [ -d "${assetPath}" ]; then
for f in ${lib.concatStringsSep " " (builtins.attrNames files)}; do
cp -u "${assetPath}/$f" "/home/${username}/.config/${moduleName}/$f"
done
fi
if [ -f "${mainConfigPath}" ]; then
cp -u "${mainConfigPath}" "/home/${username}/.config/${moduleName}/hyprland.conf"
fi
'';
};
restartTriggers = [ assetPath ];
path = [];
};
};
}
@@ -0,0 +1,69 @@
{ lib, config, ... }:
let
# --- Module variables ---
moduleName = "stylix";
username = config.defaultUser or "henrov";
# Assets directory for Stylix config
assetPath = ../../../assets/system/conf/${moduleName};
# Read all config files
programFiles = builtins.readDir assetPath;
files = lib.genAttrs (builtins.attrNames programFiles) (name: {
src = "${assetPath}/${name}";
});
# Top-level toggle for this module
enableProgram = config.enableStylix or false;
# Read the main stylix.conf
stylixConfFile = "${assetPath}/stylix.conf";
stylixConf = if builtins.pathExists stylixConfFile
then builtins.readFile stylixConfFile
else "";
in
{
# --- Top-level toggle ---
options.enableStylix = lib.mkEnableOption "Enable Stylix system theming";
# --- Only apply configuration if enabled ---
config = lib.mkIf enableProgram {
# Deploy Stylix configuration files to user's XDG config
home-manager.users.${username}.xdg.configFile =
lib.mapAttrs' (name: value: {
name = "${moduleName}/${name}";
value.source = value.src;
}) files;
# Provide stylix.conf content as an environment variable (or for further init scripts)
home-manager.users.${username}.home.sessionVariables = {
STYLIX_CONF = stylixConf;
};
# Optional wallpaper helper packages (symbolic, install manually or via packages)
environment.systemPackages = [
# symbolic references, actual pkgs mapping done elsewhere
"feh"
"st"
];
# Cursor environment variables (read from stylix.conf if needed)
# Minimal example using defaults from your stylix.conf
home-manager.users.${username}.home.sessionVariables = lib.mkForce (
let
# Default cursor values if stylix.conf parsing not implemented
cursorName = "phinger-cursors-light";
cursorSize = 24;
in {
XCURSOR_THEME = cursorName;
XCURSOR_SIZE = toString cursorSize;
HYPRCURSOR_THEME = cursorName;
HYPRCURSOR_SIZE = toString cursorSize;
}
);
};
}
@@ -0,0 +1,45 @@
{ lib, config, ... }:
let
# --- Module variables ---
moduleName = "waybar";
username = config.defaultUser or "henrov";
# Assets directory (self-contained)
assetPath = ../../../assets/system/conf/${moduleName};
# Read required config files
waybarConfig = "${assetPath}/waybar.conf";
waybarStyle = "${assetPath}/style.css";
# Top-level toggle
enableProgram = config.enableWaybar or false;
in
{
# --- Option ---
options.enableWaybar =
lib.mkEnableOption "Enable Waybar status bar";
# --- Config ---
config = lib.mkIf enableProgram {
# Install Waybar (symbolic reference expected to be resolved elsewhere)
environment.systemPackages = [
"waybar"
];
# Deploy only required files to ~/.config/waybar
home-manager.users.${username}.xdg.configFile = {
"waybar/config".source =
if builtins.pathExists waybarConfig
then waybarConfig
else null;
"waybar/style.css".source =
if builtins.pathExists waybarStyle
then waybarStyle
else null;
};
};
}
@@ -0,0 +1,44 @@
{ lib, config, ... }:
let
# --- Module variables ---
moduleName = "wayland";
username = config.defaultUser or "henrov";
# Top-level toggle
enableProgram = config.enableWayland or false;
in
{
# --- Option ---
options.enableWayland =
lib.mkEnableOption "Enable Wayland support";
# --- Config ---
config = lib.mkIf enableProgram {
# Enable XDG portals (required for Wayland apps)
xdg.portal.enable = true;
# Home Manager configuration
home-manager.users.${username} = {
xdg.portal = {
enable = true;
# Only unavoidable pkgs reference
extraPortals = [
config.pkgs.xdg-desktop-portal-hyprland
];
config.hyprland = {
"org.freedesktop.impl.portal.Screencast" = [ "hyprland" ];
};
};
# Wayland-related user package
home.packages = [
config.pkgs.uwsm
];
};
};
}
@@ -0,0 +1,7 @@
{ config, pkgs, ... }:
{
xdg.portal = {
enable = true;
config.system.default = [ "hyprland" "gtk" ];
};
}