Working on reshuffling

This commit is contained in:
2026-03-19 13:00:27 +00:00
parent 5d477e77df
commit fc09673be1
31 changed files with 1476 additions and 0 deletions
@@ -0,0 +1,2 @@
{ ... }
#work in progress
@@ -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,85 @@
{ lib, config, flakeRoot, ... }:
let
# --- Program definition ---
programName = "hyprland";
# --- Assets ---
programAssets = "${flakeRoot}/assets/hyprland/conf/hypr";
programFiles =
if builtins.pathExists programAssets
then builtins.readDir programAssets
else {};
fileNames = builtins.attrNames programFiles;
# Exclude main config (handled separately)
otherFiles = lib.filter (name: name != "hyprland.conf") fileNames;
# Generate file mappings
files = lib.genAttrs otherFiles (name: {
src = "${programAssets}/${name}";
});
# Main config (inline)
mainConfigPath = "${programAssets}/hyprland.conf";
# Enable toggle (must match option)
enableProgram = config.enableHyprland or true;
# Resolve user safely
user = config.defaultUser or "henrov";
in
{
# --- Option ---
options.enableHyprland =
lib.mkEnableOption "Enable Hyprland desktop";
# --- Config ---
config = lib.mkIf enableProgram {
# --- Dendritic app definition ---
myApps.${programName} = {
enable = true;
assetsDir = programAssets;
files = files;
inherit user;
compositor = "hyprland";
};
# --- System-level enable ---
programs.hyprland.enable = true;
# --- Home Manager wiring ---
home-manager.users.${user} = {
home.stateVersion = "26.05";
home.username = user;
home.homeDirectory = "/home/${user}";
wayland.windowManager.hyprland = {
enable = true;
settings.general."col.active_border" =
lib.mkForce "0xff97cbcd 0xff89b4fa";
};
# --- Config files ---
xdg.configFile =
(lib.mapAttrs' (name: value: {
name = "hypr/${name}";
value.source = value.src;
}) files)
// {
"hypr/hyprland.conf".text =
if builtins.pathExists mainConfigPath
then builtins.readFile mainConfigPath
else "";
"hypr/.keep".text = "";
};
};
};
}
@@ -0,0 +1,96 @@
{ lib, config, pkgs, flakeRoot, ... }:
let
# --- Program definition ---
programName = "stylix";
# Assets (theme + wallpaper)
programAssets = "${flakeRoot}/assets/system/theming/${programName}";
programFiles =
if builtins.pathExists programAssets
then builtins.readDir programAssets
else {};
files = lib.genAttrs (builtins.attrNames programFiles) (name: {
src = "${programAssets}/${name}";
});
# Enable toggle (must match option)
enableProgram = config.enableStylix or true;
# Resolve user safely (outside mkIf)
user = config.defaultUser or "henrov";
# --- Stylix configuration (self-contained) ---
stylixCfg = {
enable = true;
base16Scheme =
"${flakeRoot}/assets/system/theming/stylix/catppuccin-mocha.yaml";
image =
"${flakeRoot}/assets/hyprland/wallpaperstuff/pictures/wall1.jpg";
polarity = "dark";
cursor = {
package = pkgs.phinger-cursors;
name = "phinger-cursors-light";
size = 24;
};
fonts = {
monospace = {
package = pkgs.nerd-fonts.fira-code;
name = "Fira Code Nerd Font";
};
sansSerif = {
package = pkgs.lato;
name = "Lato";
};
};
icons = {
enable = true;
package = pkgs.papirus-icon-theme;
dark = "Papirus-Dark";
light = "Papirus-Light";
};
};
in
{
# --- Option ---
options.enableStylix =
lib.mkEnableOption "Enable Stylix system theming";
# --- Config ---
config = lib.mkIf enableProgram {
# --- Dendritic app definition ---
myApps.${programName} = {
enable = true;
assetsDir = programAssets;
files = files;
inherit user;
theme = "catppuccin-mocha";
polarity = "dark";
};
# --- Stylix theming ---
stylix = stylixCfg;
# --- Optional: wallpaper helper (kept dendritic) ---
myApps.wallpaper = {
enable = true;
packages = [ "feh" "st" ];
};
# --- Cursor environment variables ---
home-manager.users.${user}.home.sessionVariables = {
XCURSOR_THEME = stylixCfg.cursor.name;
XCURSOR_SIZE = toString stylixCfg.cursor.size;
HYPRCURSOR_THEME = stylixCfg.cursor.name;
HYPRCURSOR_SIZE = toString stylixCfg.cursor.size;
};
};
}
@@ -0,0 +1,34 @@
{ lib, ... }:
let
username = "henrov";
waybarAssets = ../../../assets/system/conf/waybar;
waybarFiles = builtins.readDir waybarAssets;
waybarConfs = lib.genAttrs (builtins.attrNames waybarFiles) (name: {
src = "${waybarAssets}/${name}";
});
enableWaybar = true;
in
{
# Declare a top-level option
options.myApps = lib.mkOption {
type = lib.types.attrsOf lib.types.any;
default = {};
description = "Top-level collection of custom apps";
};
options.enableWaybar = lib.mkEnableOption "Enable Waybar status bar";
# Everything goes under config safely
config = lib.mkIf enableWaybar {
myApps = {
waybar = {
enable = true;
user = username;
assetsDir = waybarAssets;
files = waybarConfs;
};
};
};
}
@@ -0,0 +1,63 @@
{ lib, config, ... }:
let
# --- Program definition ---
programName = "wayland";
# Assets (optional, kept for consistency with template)
programAssets = ../../../assets/system/conf/${programName};
programFiles =
if builtins.pathExists programAssets
then builtins.readDir programAssets
else {};
files = lib.genAttrs (builtins.attrNames programFiles) (name: {
src = "${programAssets}/${name}";
});
# Enable toggle (must match option name)
enableProgram = config.enableWayland or true;
# Resolve user safely (outside mkIf)
user = config.defaultUser or "henrov";
in
{
# --- Option ---
options.enableWayland =
lib.mkEnableOption "Enable Wayland + portals";
# --- Config ---
config = lib.mkIf enableProgram {
# --- Dendritic app definition ---
myApps.${programName} = {
enable = true;
assetsDir = programAssets;
files = files;
inherit user;
# Wayland-specific metadata
portals = [ "hyprland" ];
};
# --- Actual system wiring ---
home-manager.users.${user} = {
xdg.portal = {
enable = true;
# pkgs is unavoidable here (real package dependency)
extraPortals = [
config.pkgs.xdg-desktop-portal-hyprland
];
config.hyprland = {
"org.freedesktop.impl.portal.Screencast" = [ "hyprland" ];
};
};
home.packages = [
config.pkgs.uwsm
];
};
};
}