implementing home.file instead of xdg.config

This commit is contained in:
2026-03-01 18:30:28 +01:00
parent eb18a3628a
commit 15607aca9b
7 changed files with 568 additions and 555 deletions
+28 -26
View File
@@ -1,39 +1,41 @@
{ config, lib, pkgs, flakeRoot, ... }:
let
hyprConf = flakeRoot.outPath + "/assets/conf/desktop/hypr/hyprland.conf";
hyprConf = flakeRoot.outPath + "/assets/conf/desktop/hypr/hyprland.conf";
bindingsConf = flakeRoot.outPath + "/assets/conf/desktop/hypr/bindings.conf";
lidLockScript = flakeRoot.outPath + "/assets/conf/desktop/hypr/scripts/lid-lock.sh";
in
{
wayland.windowManager.hyprland = {
enable = true;
# Load base config + bindings from repo files
extraConfig =
(builtins.readFile hyprConf)
+ "\n\n# --- Repo keybindings ---\n"
+ (builtins.readFile bindingsConf)
+ "\n";
settings = {
windowrule = [
"match:class nm-connection-editor, float 1, center 1, size 900 700"
];
enable = true;
# Load base config + bindings from repo files
extraConfig = ''
${builtins.readFile hyprConf}
# --- Repo keybindings ---
${builtins.readFile bindingsConf}
'';
settings = {
windowrule = [
"match:class nm-connection-editor, float 1, center 1, size 900 700"
];
};
};
};
xdg.configFile."hypr/scripts/lid-lock.sh" = {
source = lib.mkForce (flakeRoot.outPath + "/assets/conf/desktop/hypr/scripts/lid-lock.sh");
# Gebruik home.file voor echte bestanden (geen symlinks)
home.file.".config/hypr/scripts/lid-lock.sh" = {
source = lidLockScript;
executable = true;
};
xdg.portal = {
enable = true;
extraPortals = with pkgs; [
xdg-desktop-portal-gtk
xdg-desktop-portal-hyprland
];
# GTK als algemene backend (OpenURI is daar betrouwbaar)
config.common.default = [ "gtk" ];
# Hyprland alleen voor screensharing / remote desktop
config.hyprland = {
"org.freedesktop.impl.portal.Screencast" = [ "hyprland" ];
"org.freedesktop.impl.portal.RemoteDesktop" = [ "hyprland" ];
enable = true;
extraPortals = with pkgs; [
xdg-desktop-portal-gtk
xdg-desktop-portal-hyprland
];
# GTK als algemene backend (OpenURI is daar betrouwbaar)
config.common.default = [ "gtk" ];
# Hyprland alleen voor screensharing / remote desktop
config.hyprland = {
"org.freedesktop.impl.portal.Screencast" = [ "hyprland" ];
"org.freedesktop.impl.portal.RemoteDesktop" = [ "hyprland" ];
};
};
}