This commit is contained in:
2025-10-11 19:10:48 +05:00
commit d0401c8c07
27 changed files with 1240 additions and 0 deletions

44
home/xdg.nix Normal file
View File

@@ -0,0 +1,44 @@
{ config, pkgs, ... }: {
# Основные параметры xdg.
# Настройка порталов.
xdg = {
enable = true;
portal = {
enable = true;
extraPortals = [ pkgs.xdg-desktop-portal-hyprland ];
config = {
common.default = "gtk";
};
};
# Указания скрытых домашних каталогов.
cacheHome = builtins.toPath "${config.home.homeDirectory}/.cache";
configHome = builtins.toPath "${config.home.homeDirectory}/.config";
dataHome = builtins.toPath "${config.home.homeDirectory}/.local/share";
stateHome = builtins.toPath "${config.home.homeDirectory}/.local/state";
# Указания системных каталогов.
systemDirs = {
config = [ "/etc/xdg" ];
data = [ "/usr/share" "/usr/local/share" ];
};
# Указание пользовательских каталогов.
# null = не назначать каталог(т.е полностью убрать).
userDirs = {
enable = true;
createDirectories = true;
desktop = builtins.toPath "${config.home.homeDirectory}/Desktop";
documents = builtins.toPath "${config.home.homeDirectory}/Documents";
download = builtins.toPath "${config.home.homeDirectory}/Downloads";
pictures = builtins.toPath "${config.home.homeDirectory}/Pictures";
videos = null;
music = null;
publicShare = null;
templates = null;
};
};
}