62 lines
1.7 KiB
Nix
62 lines
1.7 KiB
Nix
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
|
|
{ lib, config, pkgs, flakeRoot, ... }:
|
|
|
|
let
|
|
# Use the config option defaultUser directly, fallback to "henrov"
|
|
username = config.defaultUser or "henrov";
|
|
|
|
# Portal backends
|
|
basePortal = pkgs.xdg-desktop-portal-gtk; # full portal implementation
|
|
hyprlandPortal = pkgs.xdg-desktop-portal-hyprland; # Hyprland screencast
|
|
in
|
|
{
|
|
#################################
|
|
# Enable XDG desktop portals system-wide
|
|
#################################
|
|
xdg.portal.enable = true;
|
|
|
|
# Base + Hyprland portals
|
|
xdg.portal.extraPortals = [ basePortal hyprlandPortal ];
|
|
|
|
# Map screencast interface explicitly to Hyprland
|
|
xdg.portal.config = {
|
|
"org.freedesktop.impl.portal.Screencast".backend = "hyprland";
|
|
};
|
|
|
|
#################################
|
|
# Install portal packages system-wide
|
|
#################################
|
|
environment.systemPackages = [
|
|
basePortal
|
|
hyprlandPortal
|
|
];
|
|
|
|
#################################
|
|
# Home Manager user configuration
|
|
#################################
|
|
home-manager.users = {
|
|
${username} = {
|
|
home.packages = [
|
|
basePortal
|
|
hyprlandPortal
|
|
];
|
|
xdg.userDirs = {
|
|
enable = true;
|
|
createDirectories = true;
|
|
desktop = null;
|
|
download = "${home}/Downloads";
|
|
documents = "${home}/Documents";
|
|
pictures = "${home}/Pictures";
|
|
music = null;
|
|
publicShare = null;
|
|
templates = "${home}/Experiments";
|
|
videos = "${home}/Videos";
|
|
extraConfig = {
|
|
XDG_PROJECTS_DIR = "${home}/Projects";
|
|
XDG_WORK_DIR = "${home}/Work";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|