Too many bugs to deal with unfortunately. Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
46 lines
959 B
Nix
46 lines
959 B
Nix
{
|
|
username ? throw "username argument is required",
|
|
}:
|
|
{ config, pkgs, ... }:
|
|
let
|
|
userConfig = config.users.users.${username};
|
|
hmConfig = config.home-manager.users.${username};
|
|
in
|
|
{
|
|
environment.persistence."/persist".users.${username}.directories = with hmConfig.xdg.userDirs; [
|
|
relativeDesktop
|
|
relativeDocuments
|
|
relativeDownload
|
|
relativeMusic
|
|
relativePictures
|
|
relativeTemplates
|
|
relativeVideos
|
|
"VMs"
|
|
"git"
|
|
];
|
|
|
|
home-manager.users.${username} = {
|
|
imports = [ ./options.nix ];
|
|
|
|
xdg = {
|
|
enable = true;
|
|
mimeApps.enable = true;
|
|
|
|
portal = {
|
|
xdgOpenUsePortal = true;
|
|
extraPortals = with pkgs; [ xdg-desktop-portal-gtk ];
|
|
};
|
|
|
|
userDirs = {
|
|
enable = true;
|
|
extraConfig = {
|
|
XDG_VM_DIR = "${userConfig.home}/VMs";
|
|
XDG_GIT_DIR = "${userConfig.home}/git";
|
|
};
|
|
};
|
|
};
|
|
|
|
home.packages = with pkgs; [ xdg-utils ];
|
|
};
|
|
}
|