Regenerated
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
{ 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
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,93 +0,0 @@
|
||||
{ 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 = [];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,117 +0,0 @@
|
||||
{ lib, config, ... }:
|
||||
|
||||
let
|
||||
# --- Module variables ---
|
||||
moduleName = "stylix";
|
||||
username = config.defaultUser or "henrov";
|
||||
|
||||
# Assets directory
|
||||
assetPath =
|
||||
if builtins.pathExists ../../../assets/system/theming/${moduleName}
|
||||
then ../../../assets/system/theming/${moduleName}
|
||||
else null;
|
||||
|
||||
# Read all files if assets exist
|
||||
programFiles =
|
||||
if assetPath != null
|
||||
then builtins.readDir assetPath
|
||||
else {};
|
||||
|
||||
files = lib.genAttrs (builtins.attrNames programFiles) (name: {
|
||||
src = "${assetPath}/${name}";
|
||||
});
|
||||
|
||||
# Top-level toggle for this module
|
||||
enableProgram = config.enableStylix or false;
|
||||
|
||||
# Stylix self-contained configuration
|
||||
stylixCfg = {
|
||||
enable = true;
|
||||
|
||||
base16Scheme = ../../../assets/system/theming/stylix/catppuccin-mocha.yaml;
|
||||
image = ../../../assets/hyprland/wallpaperstuff/pictures/wall1.jpg;
|
||||
polarity = "dark";
|
||||
|
||||
cursor = {
|
||||
package = "phinger-cursors"; # symbolic reference
|
||||
name = "phinger-cursors-light";
|
||||
size = 24;
|
||||
};
|
||||
|
||||
fonts = {
|
||||
monospace = {
|
||||
package = "nerd-fonts-fira-code";
|
||||
name = "Fira Code Nerd Font";
|
||||
};
|
||||
sansSerif = {
|
||||
package = "lato";
|
||||
name = "Lato";
|
||||
};
|
||||
};
|
||||
|
||||
icons = {
|
||||
enable = true;
|
||||
package = "papirus-icon-theme";
|
||||
dark = "Papirus-Dark";
|
||||
light = "Papirus-Light";
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
# --- Top-level toggle option ---
|
||||
options.enableStylix = lib.mkEnableOption "Enable Stylix system theming";
|
||||
|
||||
# --- Only apply configuration if enabled ---
|
||||
config = lib.mkIf enableProgram {
|
||||
|
||||
# --- Stylix dendritic app definition ---
|
||||
stylixModule = {
|
||||
enable = true;
|
||||
assetsDir = assetPath;
|
||||
files = files;
|
||||
user = username;
|
||||
theme = "catppuccin-mocha";
|
||||
polarity = "dark";
|
||||
};
|
||||
|
||||
# --- Stylix theming config ---
|
||||
stylix = stylixCfg;
|
||||
|
||||
# --- Optional wallpaper helper (dendritic) ---
|
||||
wallpaperHelper = {
|
||||
enable = true;
|
||||
packages = [ "feh" "st" ]; # symbolic package names
|
||||
};
|
||||
|
||||
# --- Cursor environment variables ---
|
||||
home-manager.users.${username}.home.sessionVariables = {
|
||||
XCURSOR_THEME = stylixCfg.cursor.name;
|
||||
XCURSOR_SIZE = toString stylixCfg.cursor.size;
|
||||
HYPRCURSOR_THEME = stylixCfg.cursor.name;
|
||||
HYPRCURSOR_SIZE = toString stylixCfg.cursor.size;
|
||||
};
|
||||
|
||||
# --- Optional systemd service to sync assets ---
|
||||
systemd.services."${moduleName}-sync" = {
|
||||
description = "Sync ${moduleName} configuration assets";
|
||||
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
|
||||
'';
|
||||
};
|
||||
|
||||
restartTriggers = [ assetPath ];
|
||||
path = [];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,74 +0,0 @@
|
||||
{ lib, config, ... }:
|
||||
|
||||
let
|
||||
# --- Module variables ---
|
||||
moduleName = "waybar";
|
||||
username = config.defaultUser or "henrov";
|
||||
|
||||
# Assets directory
|
||||
assetPath =
|
||||
if builtins.pathExists ../../../assets/system/conf/${moduleName}
|
||||
then ../../../assets/system/conf/${moduleName}
|
||||
else null;
|
||||
|
||||
# Read all files if assets exist
|
||||
programFiles =
|
||||
if assetPath != null
|
||||
then builtins.readDir assetPath
|
||||
else {};
|
||||
|
||||
files = lib.genAttrs (builtins.attrNames programFiles) (name: {
|
||||
src = "${assetPath}/${name}";
|
||||
});
|
||||
|
||||
# Top-level toggle for this module
|
||||
enableProgram = config.enableWaybar or false;
|
||||
in
|
||||
{
|
||||
# --- Top-level toggle option ---
|
||||
options.enableWaybar = lib.mkEnableOption "Enable Waybar status bar";
|
||||
|
||||
# --- Only apply configuration if enabled ---
|
||||
config = lib.mkIf enableProgram {
|
||||
|
||||
# --- Dendritic container ---
|
||||
waybar = {
|
||||
enable = true;
|
||||
user = username;
|
||||
assetsDir = assetPath;
|
||||
files = files;
|
||||
};
|
||||
|
||||
# --- Deploy configuration to ~/.config/waybar ---
|
||||
home-manager.users.${username} = lib.mkIf assetPath != null {
|
||||
xdg.configFile =
|
||||
lib.mapAttrs' (name: value: {
|
||||
name = "${moduleName}/${name}";
|
||||
value.source = value.src;
|
||||
}) files;
|
||||
};
|
||||
|
||||
# --- Optional systemd service to sync configs ---
|
||||
systemd.services."${moduleName}-sync" = {
|
||||
description = "Sync ${moduleName} configuration";
|
||||
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
|
||||
'';
|
||||
};
|
||||
|
||||
restartTriggers = [ assetPath ];
|
||||
path = [];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,96 +0,0 @@
|
||||
{ lib, config, ... }:
|
||||
|
||||
let
|
||||
# --- Module variables ---
|
||||
moduleName = "wayland";
|
||||
username = config.defaultUser or "henrov";
|
||||
|
||||
# Assets directory (optional)
|
||||
assetPath =
|
||||
if builtins.pathExists ../../../assets/system/conf/${moduleName}
|
||||
then ../../../assets/system/conf/${moduleName}
|
||||
else null;
|
||||
|
||||
programFiles =
|
||||
if assetPath != null
|
||||
then builtins.readDir assetPath
|
||||
else {};
|
||||
|
||||
files = lib.genAttrs (builtins.attrNames programFiles) (name: {
|
||||
src = "${assetPath}/${name}";
|
||||
});
|
||||
|
||||
# Top-level toggle for this module
|
||||
enableProgram = config.enableWayland or true;
|
||||
in
|
||||
{
|
||||
# --- Declare the top-level toggle ---
|
||||
options.enableWayland = lib.mkEnableOption "Enable Wayland + portals";
|
||||
|
||||
# --- Only apply configuration if enabled ---
|
||||
config = lib.mkIf enableProgram {
|
||||
|
||||
# Example dendritic container (flat, self-contained)
|
||||
wayland = {
|
||||
enable = true;
|
||||
user = username;
|
||||
assetsDir = assetPath;
|
||||
files = files;
|
||||
|
||||
# Wayland-specific metadata
|
||||
portals = [ "hyprland" ];
|
||||
};
|
||||
|
||||
# Deploy assets to user's XDG config if they exist
|
||||
home-manager.users.${username} = lib.mkIf assetPath != null {
|
||||
xdg.configFile =
|
||||
lib.mapAttrs' (name: value: {
|
||||
name = "${moduleName}/${name}";
|
||||
value.source = value.src;
|
||||
}) files;
|
||||
};
|
||||
|
||||
# Example portal + packages configuration
|
||||
home-manager.users.${username} = {
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
|
||||
# Only reference pkgs if unavoidable
|
||||
extraPortals = [
|
||||
config.pkgs.xdg-desktop-portal-hyprland
|
||||
];
|
||||
|
||||
config.hyprland = {
|
||||
"org.freedesktop.impl.portal.Screencast" = [ "hyprland" ];
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = [
|
||||
config.pkgs.uwsm
|
||||
];
|
||||
};
|
||||
|
||||
# Optional systemd service to sync configs (if needed)
|
||||
systemd.services."${moduleName}-sync" = {
|
||||
description = "Sync ${moduleName} configuration";
|
||||
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
|
||||
'';
|
||||
};
|
||||
|
||||
restartTriggers = [ assetPath ];
|
||||
path = [];
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user