working on hyor
This commit is contained in:
+350
-350
File diff suppressed because it is too large
Load Diff
@@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
hyprlandConfigDir = "${config.home-manager.users.${user.username}.xdg.configHome}/hypr";
|
hyprlandConfigDir = "${config.home-manager.users.${user.username}.xdg.configHome}/hypr";
|
||||||
|
# Dynamically read all files in assets/hyprland/conf/
|
||||||
hyprlandConfs =
|
hyprlandConfs =
|
||||||
lib.genAttrs (builtins.attrNames (builtins.readDir "${flakeRoot}/assets/hyprland/conf/hypr"))
|
lib.genAttrs (builtins.attrNames (builtins.readDir "${flakeRoot}/assets/hyprland/conf/hypr"))
|
||||||
(name: {
|
(name: {
|
||||||
@@ -22,28 +23,22 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Home Manager: Hyprland-specific configurations
|
# Home Manager: Hyprland-specific configurations
|
||||||
home-manager.users.${user.username} = rec {
|
home-manager.users.${user.username} = {
|
||||||
home.stateVersion = "25.11";
|
# Use config.home-manager.users.${user.username} instead of userConfig
|
||||||
home.username = user.username;
|
home.stateVersion = config.home-manager.users.${user.username}.stateVersion or "23.11"; # Default fallback
|
||||||
home.homeDirectory = user.homeDirectory;
|
home.username = user.username; # Use the 'user' argument
|
||||||
|
home.homeDirectory =
|
||||||
|
config.home-manager.users.${user.username}.homeDirectory or "/home/${user.username}";
|
||||||
|
|
||||||
wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Ensure the Hyprland config directory exists and has the correct permissions
|
# Ensure the Hyprland config directory exists
|
||||||
xdg.configFile = {
|
xdg.configFile = {
|
||||||
"hypr/.keep" = {
|
"hypr/.keep" = {
|
||||||
text = "";
|
text = "";
|
||||||
};
|
};
|
||||||
}
|
} // hyprlandConfs;
|
||||||
// hyprlandConfs;
|
|
||||||
|
|
||||||
# Ensure the home directory and .config directory have the correct permissions
|
|
||||||
home.file.".config".source = pkgs.writeDashScriptBin "mkdir-config" ''
|
|
||||||
mkdir -p $HOME/.config
|
|
||||||
chown -R ${user.username}:users $HOME/.config
|
|
||||||
chmod -R 755 $HOME/.config
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user