This commit is contained in:
Peritia 2025-09-10 12:17:16 +02:00
parent fc0abdd4bb
commit aca73cdd0f
73 changed files with 3873 additions and 381 deletions

View file

@ -1,3 +1,13 @@
# Flatpak (System Module)
#
# Provides:
# - Flatpak package manager
# - Flatpak service integration
# - XDG portals for sandboxed apps
#
# Options:
# - enable → Enable Flatpak system module
#
{ config, lib, pkgs, ... }:
let
@ -5,16 +15,22 @@ let
in
{
options.nyx-module.system.flatpak = {
enable = lib.mkEnableOption "Enable flatpak (system) module";
package = lib.mkOption {
type = lib.types.package;
default = pkgs.flatpak;
description = "Package to install for flatpak.";
};
enable = lib.mkEnableOption "Enable Flatpak (system module)";
};
config = lib.mkIf cfg.enable {
environment.systemPackages = [ cfg.package ];
services.flatpak.enable = true;
# Flatpak apps need XDG portals for proper desktop integration
xdg.portal = {
enable = true;
extraPortals = with pkgs; [
xdg-desktop-portal-gtk # For GTK desktops
# xdg-desktop-portal-kde # Uncomment for KDE Plasma
];
};
# Optional explicit installation (not strictly needed)
environment.systemPackages = [ pkgs.flatpak ];
};
}

View file

@ -1,3 +1,15 @@
# Wireshark (System Module)
#
# Provides:
# - Wireshark installation
# - Proper dumpcap permissions
# - Adds user to `wireshark` group
#
# Options:
# - enable → Enable Wireshark system module
# - username → User to add to the wireshark group (required)
#
{ config, lib, pkgs, ... }:
let
@ -5,16 +17,31 @@ let
in
{
options.nyx-module.system.wireshark = {
enable = lib.mkEnableOption "Enable wireshark (system) module";
enable = lib.mkEnableOption "Enable Wireshark (system module)";
package = lib.mkOption {
type = lib.types.package;
default = pkgs.wireshark;
description = "Package to install for wireshark.";
username = lib.mkOption {
type = lib.types.str;
example = "alice";
description = "User to add to the wireshark group.";
};
};
config = lib.mkIf cfg.enable {
environment.systemPackages = [ cfg.package ];
environment.systemPackages = [ pkgs.wireshark ];
programs.wireshark = {
enable = true; # Installs wireshark + sets dumpcap caps
package = pkgs.wireshark;
};
# Add user to wireshark group
users.users.${cfg.username}.extraGroups = [ "wireshark" ];
assertions = [
{
assertion = cfg.username != "";
message = "nyx-module.system.wireshark.username must be set to a valid user.";
}
];
};
}