Working on reshuffling
This commit is contained in:
+39
-29
@@ -723,46 +723,56 @@ Finally, it creates a systemd user service (wpaperd.service) that automatically
|
|||||||
** =generated/modules/desktop/hyprland.nix=
|
** =generated/modules/desktop/hyprland.nix=
|
||||||
Setting up Hyprland
|
Setting up Hyprland
|
||||||
#+BEGIN_SRC nix :tangle generated/modules/desktop/hyprland.nix :noweb tangle :mkdirp yes :eval never-html
|
#+BEGIN_SRC nix :tangle generated/modules/desktop/hyprland.nix :noweb tangle :mkdirp yes :eval never-html
|
||||||
{
|
{ lib, pkgs, flakeRoot, ... }:
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
user,
|
|
||||||
flakeRoot,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
let
|
let
|
||||||
hyprlandFiles = builtins.attrNames (builtins.readDir "${flakeRoot}/assets/hyprland/conf/hypr");
|
# --- Define user locally ---
|
||||||
# Filter out hyprland.conf from the list of files to symlink
|
username = "henrov";
|
||||||
|
|
||||||
|
# --- Hyprland conf directory ---
|
||||||
|
hyprConfDir = "${flakeRoot}/assets/hyprland/conf/hypr";
|
||||||
|
|
||||||
|
# --- Read files ---
|
||||||
|
hyprlandFiles = builtins.attrNames (builtins.readDir hyprConfDir);
|
||||||
|
|
||||||
|
# --- Exclude main hyprland.conf from automatic symlinks ---
|
||||||
otherHyprlandFiles = lib.filter (name: name != "hyprland.conf") hyprlandFiles;
|
otherHyprlandFiles = lib.filter (name: name != "hyprland.conf") hyprlandFiles;
|
||||||
# Generate xdg.configFile entries for all files except hyprland.conf
|
|
||||||
|
# --- Generate xdg.configFile entries for the other files ---
|
||||||
otherConfigs = lib.genAttrs otherHyprlandFiles (name: {
|
otherConfigs = lib.genAttrs otherHyprlandFiles (name: {
|
||||||
target = "hypr/${name}";
|
target = "hypr/${name}";
|
||||||
source = "${flakeRoot}/assets/hyprland/conf/hypr/${name}";
|
source = "${hyprConfDir}/${name}";
|
||||||
});
|
});
|
||||||
|
|
||||||
|
# --- Add main hyprland.conf separately ---
|
||||||
|
hyprlandConf = {
|
||||||
|
"hypr/hyprland.conf".text = builtins.readFile "${hyprConfDir}/hyprland.conf";
|
||||||
|
"hypr/.keep".text = "";
|
||||||
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
programs.hyprland = {
|
flake.nixosModules.hyprland = { config, pkgs, lib, ... }:
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
home-manager.users.${user.username} = {
|
{
|
||||||
home.stateVersion = "25.11";
|
options.mySystem.desktop.hyprland.enable =
|
||||||
home.username = user.username;
|
lib.mkEnableOption "Enable Hyprland Desktop";
|
||||||
home.homeDirectory =
|
|
||||||
config.home-manager.users.${user.username}.homeDirectory or "/home/${user.username}";
|
|
||||||
|
|
||||||
wayland.windowManager.hyprland = {
|
config = lib.mkIf (config.mySystem.desktop.hyprland.enable or false) {
|
||||||
enable = true;
|
|
||||||
settings.general."col.active_border" = lib.mkForce "0xff97cbcd 0xff89b4fa";
|
|
||||||
};
|
|
||||||
|
|
||||||
xdg.configFile = otherConfigs // {
|
programs.hyprland.enable = true;
|
||||||
"hypr/hyprland.conf".text = ''
|
|
||||||
${builtins.readFile "${flakeRoot}/assets/hyprland/conf/hypr/hyprland.conf"}
|
home-manager.users.${username} = {
|
||||||
'';
|
home.stateVersion = "25.11";
|
||||||
"hypr/.keep".text = "";
|
home.username = username;
|
||||||
|
home.homeDirectory = "/home/${username}";
|
||||||
|
|
||||||
|
wayland.windowManager.hyprland = {
|
||||||
|
enable = true;
|
||||||
|
settings.general."col.active_border" = lib.mkForce "0xff97cbcd 0xff89b4fa";
|
||||||
|
};
|
||||||
|
|
||||||
|
xdg.configFile = otherConfigs // hyprlandConf;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,43 +1,53 @@
|
|||||||
{
|
{ lib, pkgs, flakeRoot, ... }:
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
user,
|
|
||||||
flakeRoot,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
let
|
let
|
||||||
hyprlandFiles = builtins.attrNames (builtins.readDir "${flakeRoot}/assets/hyprland/conf/hypr");
|
# --- Define user locally ---
|
||||||
# Filter out hyprland.conf from the list of files to symlink
|
username = "henrov";
|
||||||
|
|
||||||
|
# --- Hyprland conf directory ---
|
||||||
|
hyprConfDir = "${flakeRoot}/assets/hyprland/conf/hypr";
|
||||||
|
|
||||||
|
# --- Read files ---
|
||||||
|
hyprlandFiles = builtins.attrNames (builtins.readDir hyprConfDir);
|
||||||
|
|
||||||
|
# --- Exclude main hyprland.conf from automatic symlinks ---
|
||||||
otherHyprlandFiles = lib.filter (name: name != "hyprland.conf") hyprlandFiles;
|
otherHyprlandFiles = lib.filter (name: name != "hyprland.conf") hyprlandFiles;
|
||||||
# Generate xdg.configFile entries for all files except hyprland.conf
|
|
||||||
|
# --- Generate xdg.configFile entries for the other files ---
|
||||||
otherConfigs = lib.genAttrs otherHyprlandFiles (name: {
|
otherConfigs = lib.genAttrs otherHyprlandFiles (name: {
|
||||||
target = "hypr/${name}";
|
target = "hypr/${name}";
|
||||||
source = "${flakeRoot}/assets/hyprland/conf/hypr/${name}";
|
source = "${hyprConfDir}/${name}";
|
||||||
});
|
});
|
||||||
|
|
||||||
|
# --- Add main hyprland.conf separately ---
|
||||||
|
hyprlandConf = {
|
||||||
|
"hypr/hyprland.conf".text = builtins.readFile "${hyprConfDir}/hyprland.conf";
|
||||||
|
"hypr/.keep".text = "";
|
||||||
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
programs.hyprland = {
|
flake.nixosModules.hyprland = { config, pkgs, lib, ... }:
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
home-manager.users.${user.username} = {
|
{
|
||||||
home.stateVersion = "25.11";
|
options.mySystem.desktop.hyprland.enable =
|
||||||
home.username = user.username;
|
lib.mkEnableOption "Enable Hyprland Desktop";
|
||||||
home.homeDirectory =
|
|
||||||
config.home-manager.users.${user.username}.homeDirectory or "/home/${user.username}";
|
|
||||||
|
|
||||||
wayland.windowManager.hyprland = {
|
config = lib.mkIf (config.mySystem.desktop.hyprland.enable or false) {
|
||||||
enable = true;
|
|
||||||
settings.general."col.active_border" = lib.mkForce "0xff97cbcd 0xff89b4fa";
|
|
||||||
};
|
|
||||||
|
|
||||||
xdg.configFile = otherConfigs // {
|
programs.hyprland.enable = true;
|
||||||
"hypr/hyprland.conf".text = ''
|
|
||||||
${builtins.readFile "${flakeRoot}/assets/hyprland/conf/hypr/hyprland.conf"}
|
home-manager.users.${username} = {
|
||||||
'';
|
home.stateVersion = "25.11";
|
||||||
"hypr/.keep".text = "";
|
home.username = username;
|
||||||
|
home.homeDirectory = "/home/${username}";
|
||||||
|
|
||||||
|
wayland.windowManager.hyprland = {
|
||||||
|
enable = true;
|
||||||
|
settings.general."col.active_border" = lib.mkForce "0xff97cbcd 0xff89b4fa";
|
||||||
|
};
|
||||||
|
|
||||||
|
xdg.configFile = otherConfigs // hyprlandConf;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user