Files
nix/hosts/common/user/configs/console/xdg/default.nix
2024-08-08 22:03:15 +03:00

43 lines
926 B
Nix

{
user ? throw "user argument is required",
home ? throw "home argument is required",
}:
{ config, pkgs, ... }:
{
environment.persistence."/persist" = {
"${home}/Desktop" = { };
"${home}/Documents" = { };
"${home}/Downloads" = { };
"${home}/Music" = { };
"${home}/Pictures" = { };
"${home}/Templates" = { };
"${home}/Videos" = { };
"${home}/VMs" = { };
"${home}/git" = { };
};
home-manager.users.${user} = {
imports = [ (import ./options.nix { inherit home; }) ];
xdg = {
enable = true;
mimeApps.enable = true;
portal = {
xdgOpenUsePortal = true;
extraPortals = with pkgs; [ xdg-desktop-portal-gtk ];
};
userDirs = {
enable = true;
extraConfig = {
XDG_VM_DIR = "${home}/VMs";
XDG_GIT_DIR = "${home}/git";
};
};
};
home.packages = with pkgs; [ xdg-utils ];
};
}