deleted generated files

This commit is contained in:
2026-03-19 11:55:02 +00:00
parent a0fe8baf72
commit b848963be6
32 changed files with 49 additions and 1480 deletions
+49 -22
View File
@@ -1071,39 +1071,66 @@ settings = {
** =generated/modules/desktop/wayland.nix=
This file sets up wayland
#+BEGIN_SRC nix :tangle generated/modules/desktop/wayland.nix :noweb tangle :mkdirp yes :eval never-html
{ lib, ... }:
{ lib, config, ... }:
let
# --- Program definition ---
programName = "wayland";
# Assets (optional, kept for consistency with template)
programAssets = ../../../assets/system/conf/${programName};
programFiles =
if builtins.pathExists programAssets
then builtins.readDir programAssets
else {};
files = lib.genAttrs (builtins.attrNames programFiles) (name: {
src = "${programAssets}/${name}";
});
# Enable toggle (must match option name)
enableProgram = config.enableWayland or true;
# Resolve user safely (outside mkIf)
user = config.defaultUser or "henrov";
in
{
flake.nixosModules.wayland = { config, pkgs, lib, ... }:
# --- Option ---
options.enableWayland =
lib.mkEnableOption "Enable Wayland + portals";
let
username = "henrov"; # <-- simpel en stabiel
in
{
options.mySystem.desktop.wayland.enable =
lib.mkEnableOption "Enable Wayland + portals";
# --- Config ---
config = lib.mkIf enableProgram {
config = lib.mkIf (config.mySystem.desktop.wayland.enable or false) {
# --- Dendritic app definition ---
myApps.${programName} = {
enable = true;
assetsDir = programAssets;
files = files;
inherit user;
home-manager.users.${username} = {
# Wayland-specific metadata
portals = [ "hyprland" ];
};
xdg.portal = {
enable = true;
# --- Actual system wiring ---
home-manager.users.${user} = {
extraPortals = with pkgs; [
xdg-desktop-portal-hyprland
];
xdg.portal = {
enable = true;
config.hyprland = {
"org.freedesktop.impl.portal.Screencast" = [ "hyprland" ];
};
};
home.packages = with pkgs; [
uwsm
# pkgs is unavoidable here (real package dependency)
extraPortals = [
config.pkgs.xdg-desktop-portal-hyprland
];
config.hyprland = {
"org.freedesktop.impl.portal.Screencast" = [ "hyprland" ];
};
};
home.packages = [
config.pkgs.uwsm
];
};
};
}