Regenerated
This commit is contained in:
+308
-305
File diff suppressed because it is too large
Load Diff
+20
-17
@@ -1822,24 +1822,28 @@ Setting up Hyprland
|
|||||||
|
|
||||||
let
|
let
|
||||||
username = config.defaultUser or "henrov";
|
username = config.defaultUser or "henrov";
|
||||||
assetPath = "${flakeRoot}/generated/.config/hypr/";
|
assetPath = "${flakeRoot}/generated/.config/hypr";
|
||||||
|
|
||||||
# Read all files in the asset directory
|
# Recursively read directory and generate Home Manager file entries
|
||||||
assetFiles = builtins.attrNames (builtins.readDir assetPath);
|
rec readDirRecursive = dir:
|
||||||
|
let
|
||||||
|
entries = builtins.attrNames (builtins.readDir dir);
|
||||||
|
files = lib.concatMap (e:
|
||||||
|
let
|
||||||
|
path = "${dir}/${e}";
|
||||||
|
stat = builtins.pathInfo path;
|
||||||
|
in if stat.type == "directory"
|
||||||
|
then readDirRecursive path
|
||||||
|
else [{
|
||||||
|
# Destination path relative to home directory
|
||||||
|
name = builtins.replaceStrings [ "${flakeRoot}/generated/" ] [ "" ] path;
|
||||||
|
value = { source = path; };
|
||||||
|
}]
|
||||||
|
) entries;
|
||||||
|
in files;
|
||||||
|
|
||||||
# Convert files to Home Manager xdg config entries
|
hyprFiles = readDirRecursive assetPath;
|
||||||
hyprFiles = lib.genAttrs assetFiles (f: {
|
|
||||||
# Destination path in home directory
|
|
||||||
name = ".config/hypr/${f}";
|
|
||||||
# Source file path
|
|
||||||
value = { source = "${assetPath}/${f}"; };
|
|
||||||
});
|
|
||||||
|
|
||||||
# Determine Hyprland package
|
|
||||||
hyprlandPkg =
|
|
||||||
pkgs.hyprland or
|
|
||||||
pkgs.hyprland-git or
|
|
||||||
inputs.hyprland.packages.${pkgs.system}.default;
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
environment.systemPackages = [ hyprlandPkg ];
|
environment.systemPackages = [ hyprlandPkg ];
|
||||||
@@ -1847,9 +1851,8 @@ in
|
|||||||
# Home Manager users declaration
|
# Home Manager users declaration
|
||||||
home-manager.users = {
|
home-manager.users = {
|
||||||
${username} = {
|
${username} = {
|
||||||
home.packages = [ hyprlandPkg ];
|
|
||||||
|
|
||||||
# Merge all files in the asset folder into ~/.config/hypr/
|
# Merge all files (including subdirectories) into ~/.config/hypr/
|
||||||
home.file = lib.mkMerge hyprFiles;
|
home.file = lib.mkMerge hyprFiles;
|
||||||
|
|
||||||
# Optional: Hyprland settings
|
# Optional: Hyprland settings
|
||||||
|
|||||||
@@ -2,24 +2,28 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
username = config.defaultUser or "henrov";
|
username = config.defaultUser or "henrov";
|
||||||
assetPath = "${flakeRoot}/generated/.config/hypr/";
|
assetPath = "${flakeRoot}/generated/.config/hypr";
|
||||||
|
|
||||||
# Read all files in the asset directory
|
# Recursively read directory and generate Home Manager file entries
|
||||||
assetFiles = builtins.attrNames (builtins.readDir assetPath);
|
rec readDirRecursive = dir:
|
||||||
|
let
|
||||||
|
entries = builtins.attrNames (builtins.readDir dir);
|
||||||
|
files = lib.concatMap (e:
|
||||||
|
let
|
||||||
|
path = "${dir}/${e}";
|
||||||
|
stat = builtins.pathInfo path;
|
||||||
|
in if stat.type == "directory"
|
||||||
|
then readDirRecursive path
|
||||||
|
else [{
|
||||||
|
# Destination path relative to home directory
|
||||||
|
name = builtins.replaceStrings [ "${flakeRoot}/generated/" ] [ "" ] path;
|
||||||
|
value = { source = path; };
|
||||||
|
}]
|
||||||
|
) entries;
|
||||||
|
in files;
|
||||||
|
|
||||||
# Convert files to Home Manager xdg config entries
|
hyprFiles = readDirRecursive assetPath;
|
||||||
hyprFiles = lib.genAttrs assetFiles (f: {
|
|
||||||
# Destination path in home directory
|
|
||||||
name = ".config/hypr/${f}";
|
|
||||||
# Source file path
|
|
||||||
value = { source = "${assetPath}/${f}"; };
|
|
||||||
});
|
|
||||||
|
|
||||||
# Determine Hyprland package
|
|
||||||
hyprlandPkg =
|
|
||||||
pkgs.hyprland or
|
|
||||||
pkgs.hyprland-git or
|
|
||||||
inputs.hyprland.packages.${pkgs.system}.default;
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
environment.systemPackages = [ hyprlandPkg ];
|
environment.systemPackages = [ hyprlandPkg ];
|
||||||
@@ -27,9 +31,8 @@ in
|
|||||||
# Home Manager users declaration
|
# Home Manager users declaration
|
||||||
home-manager.users = {
|
home-manager.users = {
|
||||||
${username} = {
|
${username} = {
|
||||||
home.packages = [ hyprlandPkg ];
|
|
||||||
|
|
||||||
# Merge all files in the asset folder into ~/.config/hypr/
|
# Merge all files (including subdirectories) into ~/.config/hypr/
|
||||||
home.file = lib.mkMerge hyprFiles;
|
home.file = lib.mkMerge hyprFiles;
|
||||||
|
|
||||||
# Optional: Hyprland settings
|
# Optional: Hyprland settings
|
||||||
|
|||||||
Reference in New Issue
Block a user