Regenerated
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
{ lib, config, pkgs, inputs, ... }:
|
||||
|
||||
let
|
||||
username = config.defaultUser or "henrov";
|
||||
|
||||
# Paths
|
||||
assetPath = ../../../assets/hyprland/conf/hypr;
|
||||
mainConfig = "${assetPath}/hyprland.conf";
|
||||
|
||||
# Determine Hyprland package with fallbacks
|
||||
hyprlandPkg =
|
||||
pkgs.hyprland or
|
||||
pkgs.hyprland-git or
|
||||
inputs.hyprland.packages.${pkgs.system}.default;
|
||||
|
||||
# Map all files in the asset folder
|
||||
hyprFiles =
|
||||
builtins.listToAttrs (
|
||||
map (f: {
|
||||
name = ".config/hypr/${f}";
|
||||
value = { source = "${assetPath}/${f}"; };
|
||||
}) (builtins.attrNames (builtins.readDir assetPath))
|
||||
);
|
||||
in
|
||||
{
|
||||
# System-wide package
|
||||
environment.systemPackages = [ hyprlandPkg ];
|
||||
|
||||
# Home Manager user settings
|
||||
_module.args.hmUsers = {
|
||||
${username} = {
|
||||
home.packages = [ hyprlandPkg ];
|
||||
|
||||
# Merge main config + all other files
|
||||
home.file = lib.mkMerge [
|
||||
hyprFiles
|
||||
{
|
||||
".config/hypr/hyprland.conf" = { source = mainConfig; };
|
||||
}
|
||||
];
|
||||
|
||||
# Optional module-specific settings
|
||||
settings.general."col.active_border" = "0xff97cbcd 0xff89b4fa";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
{ lib, config, pkgs, ... }:
|
||||
|
||||
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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
{ lib, config, pkgs, ... }:
|
||||
|
||||
let
|
||||
moduleName = "waybar";
|
||||
username = config.defaultUser or "henrov";
|
||||
assetPath = ../../../assets/system/conf/${moduleName};
|
||||
|
||||
waybarConfig = "${assetPath}/waybar.conf";
|
||||
waybarStyle = "${assetPath}/style.css";
|
||||
in
|
||||
{
|
||||
# Install Waybar system-wide
|
||||
environment.systemPackages = [
|
||||
pkgs.waybar
|
||||
];
|
||||
|
||||
# Deploy config files via Home Manager
|
||||
home-manager.users.${username}.home.file = lib.genAttrs [
|
||||
"waybar/config"
|
||||
"waybar/style.css"
|
||||
] (file: let
|
||||
src = if file == "waybar/config" then waybarConfig else waybarStyle;
|
||||
in {
|
||||
source = if builtins.pathExists src then src else null;
|
||||
target = ".config/${file}";
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
{ lib, config, pkgs, inputs, ... }:
|
||||
|
||||
let
|
||||
username = config.defaultUser or "henrov";
|
||||
|
||||
# Wayland-specific packages: uwsm
|
||||
uwsmPkg =
|
||||
if builtins.hasAttr "uwsm" pkgs then
|
||||
pkgs.uwsm
|
||||
else
|
||||
(inputs.uwsm.packages.${pkgs.system}.default or pkgs.uwsm);
|
||||
in
|
||||
{
|
||||
# System packages
|
||||
environment.systemPackages = [ uwsmPkg ];
|
||||
|
||||
# Enable Hyprland via Home Manager / programs
|
||||
programs.hyprland.enable = true;
|
||||
|
||||
# Home Manager user settings
|
||||
_module.args.hmUsers = {
|
||||
${username} = {
|
||||
home.packages = [ uwsmPkg ];
|
||||
|
||||
# Optional Hyprland-specific user configs
|
||||
# programs.hyprland.enable = true; # not needed if set at global level
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
{ lib, config, pkgs, inputs, ... }:
|
||||
|
||||
let
|
||||
# Default user fallback
|
||||
username = config.defaultUser or "henrov";
|
||||
|
||||
# Safe package reference with flake input fallback
|
||||
xdgPortalHyprlandPkg = pkgs.xdg-desktop-portal-hyprland or
|
||||
inputs.xdgPortalHyprland.packages.${pkgs.system}.default;
|
||||
in
|
||||
{
|
||||
# System-wide installation of XDG portal package
|
||||
environment.systemPackages = [
|
||||
xdgPortalHyprlandPkg
|
||||
];
|
||||
|
||||
# Home Manager user configuration
|
||||
_module.args.hmUsers = {
|
||||
${username} = {
|
||||
home.packages = [
|
||||
xdgPortalHyprlandPkg
|
||||
];
|
||||
|
||||
# Enable XDG portal for Hyprland
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
extraPortals = [ xdgPortalHyprlandPkg ];
|
||||
config.hyprland = {
|
||||
"org.freedesktop.impl.portal.Screencast" = [ "hyprland" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user