Compare commits

...

2 Commits

Author SHA1 Message Date
henrov c3b2799155 Working on reshuffling 2026-03-19 11:55:02 +00:00
henrov b848963be6 deleted generated files 2026-03-19 11:55:02 +00:00
2 changed files with 98 additions and 44 deletions
+41 -14
View File
@@ -1071,27 +1071,56 @@ settings = {
** =generated/modules/desktop/wayland.nix= ** =generated/modules/desktop/wayland.nix=
This file sets up wayland This file sets up wayland
#+BEGIN_SRC nix :tangle generated/modules/desktop/wayland.nix :noweb tangle :mkdirp yes :eval never-html #+BEGIN_SRC nix :tangle generated/modules/desktop/wayland.nix :noweb tangle :mkdirp yes :eval never-html
{ lib, ... }: { lib, config, ... }:
{
flake.nixosModules.wayland = { config, pkgs, lib, ... }:
let let
username = "henrov"; # <-- simpel en stabiel # --- 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 in
{ {
options.mySystem.desktop.wayland.enable = # --- Option ---
options.enableWayland =
lib.mkEnableOption "Enable Wayland + portals"; lib.mkEnableOption "Enable Wayland + portals";
config = lib.mkIf (config.mySystem.desktop.wayland.enable or false) { # --- Config ---
config = lib.mkIf enableProgram {
home-manager.users.${username} = { # --- Dendritic app definition ---
myApps.${programName} = {
enable = true;
assetsDir = programAssets;
files = files;
inherit user;
# Wayland-specific metadata
portals = [ "hyprland" ];
};
# --- Actual system wiring ---
home-manager.users.${user} = {
xdg.portal = { xdg.portal = {
enable = true; enable = true;
extraPortals = with pkgs; [ # pkgs is unavoidable here (real package dependency)
xdg-desktop-portal-hyprland extraPortals = [
config.pkgs.xdg-desktop-portal-hyprland
]; ];
config.hyprland = { config.hyprland = {
@@ -1099,11 +1128,9 @@ This file sets up wayland
}; };
}; };
home.packages = with pkgs; [ home.packages = [
uwsm config.pkgs.uwsm
]; ];
};
}; };
}; };
} }
+41 -14
View File
@@ -1,24 +1,53 @@
{ lib, ... }: { lib, config, ... }:
{
flake.nixosModules.wayland = { config, pkgs, lib, ... }:
let let
username = "henrov"; # <-- simpel en stabiel # --- 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 in
{ {
options.mySystem.desktop.wayland.enable = # --- Option ---
options.enableWayland =
lib.mkEnableOption "Enable Wayland + portals"; lib.mkEnableOption "Enable Wayland + portals";
config = lib.mkIf (config.mySystem.desktop.wayland.enable or false) { # --- Config ---
config = lib.mkIf enableProgram {
home-manager.users.${username} = { # --- Dendritic app definition ---
myApps.${programName} = {
enable = true;
assetsDir = programAssets;
files = files;
inherit user;
# Wayland-specific metadata
portals = [ "hyprland" ];
};
# --- Actual system wiring ---
home-manager.users.${user} = {
xdg.portal = { xdg.portal = {
enable = true; enable = true;
extraPortals = with pkgs; [ # pkgs is unavoidable here (real package dependency)
xdg-desktop-portal-hyprland extraPortals = [
config.pkgs.xdg-desktop-portal-hyprland
]; ];
config.hyprland = { config.hyprland = {
@@ -26,11 +55,9 @@
}; };
}; };
home.packages = with pkgs; [ home.packages = [
uwsm config.pkgs.uwsm
]; ];
};
}; };
}; };
} }