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

@ -0,0 +1,85 @@
# CAVA (Home Module)
#
# Provides:
# - CAVA audio visualizer
# - Declarative configuration via Nix
# - Support for structured settings or raw config override
#
# Options:
# - enable → Enable CAVA (home module)
# - settings → Declarative structured configuration (default: ALSA, 60 FPS, basic colors)
# - configText → Raw configuration text (overrides settings if set)
#
# Notes:
# - Writes config to ~/.config/cava/config
# - If configText is set, settings are ignored
#
# Example:
# nyx-module.home.cava = {
# enable = true;
# settings.general.framerate = 120;
# settings.input.method = "pulse";
# };
{ config, lib, pkgs, ... }:
let
cfg = config.nyx-module.home.cava;
in
{
options.nyx-module.home.cava = {
enable = lib.mkEnableOption "Enable CAVA (home) module";
settings = lib.mkOption {
type = lib.types.attrs;
default = {
general.framerate = 60;
input.method = "alsa";
smoothing.noise_reduction = 88;
color = {
background = "#000000";
foreground = "#FFFFFF";
};
};
description = ''
Declarative CAVA settings, written to `~/.config/cava/config`.
Ignored if `configText` is set.
'';
example = {
general.framerate = 30;
input.method = "pulseaudio";
color.foreground = "#00FF00";
};
};
configText = lib.mkOption {
type = lib.types.nullOr lib.types.lines;
default = null;
description = ''
Raw CAVA configuration file contents.
If set, overrides `settings` and is written directly to `~/.config/cava/config`.
'';
example = ''
[general]
framerate = 120
[input]
method = pulse
'';
};
};
config = lib.mkIf cfg.enable {
programs.cava = {
enable = true;
package = pkgs.cava;
settings = lib.mkIf (cfg.configText == null) cfg.settings;
};
xdg.configFile."cava/config" = lib.mkIf (cfg.configText != null) {
text = cfg.configText;
};
};
}

View file

@ -2,6 +2,7 @@
{
imports = [
./cava.nix
./spotify.nix
];
}

View file

@ -1,3 +1,13 @@
# Spotify (music streaming client)
#
# Provides:
# - Spotify package (default)
# - Optional override to install a different package
#
# Notes:
# - Installs into home.packages
#
{ config, lib, pkgs, ... }:
let
@ -5,12 +15,17 @@ let
in
{
options.nyx-module.home.spotify = {
enable = lib.mkEnableOption "Enable spotify (home) module";
enable = lib.mkEnableOption "Enable Spotify (home) module";
package = lib.mkOption {
type = lib.types.package;
default = pkgs.spotify;
description = "Package to install for spotify.";
example = pkgs.ncspot;
description = ''
Package to install for Spotify support.
Defaults to the official `pkgs.spotify`, but you can override with
`pkgs.ncspot`, `pkgs.spotifyd`, or similar alternatives.
'';
};
};

View file

@ -1,3 +1,13 @@
# Camera GUI module
#
# Provides:
# - Camera GUI package (default: snapshot)
# - libcamera (always installed, required backend)
#
# Notes:
# - You can override the GUI package with another (e.g., cheese, kamoso)
#
{ config, lib, pkgs, ... }:
let
@ -9,12 +19,16 @@ in
package = lib.mkOption {
type = lib.types.package;
default = pkgs.camera;
description = "Package to install for camera.";
default = pkgs.snapshot;
example = pkgs.cheese;
description = "Camera GUI package to install.";
};
};
config = lib.mkIf cfg.enable {
home.packages = [ cfg.package ];
home.packages = [
cfg.package
pkgs.libcamera
];
};
}

View file

@ -2,6 +2,7 @@
{
imports = [
./image-viewer.nix
./krita.nix
];
}

View file

@ -0,0 +1,30 @@
# Image Viewer
#
# Provides:
# - Installs a chosen image viewer application
#
# Notes:
# - Defaults to Gwenview
#
{ config, lib, pkgs, ... }:
let
cfg = config.nyx-module.home.image-viewer;
in
{
options.nyx-module.home.image-viewer = {
enable = lib.mkEnableOption "Enable image viewer (home module)";
package = lib.mkOption {
type = lib.types.package;
default = pkgs.gwenview;
example = pkgs.feh;
description = "Image viewer package to install (e.g. gwenview, feh, imv).";
};
};
config = lib.mkIf cfg.enable {
home.packages = [ cfg.package ];
};
}

View file

@ -1,3 +1,12 @@
# Krita (Digital Painting Software)
#
# Provides:
# - Krita package (open-source digital painting and illustration software)
#
# Notes:
# - Installed via home.packages
#
{ config, lib, pkgs, ... }:
let
@ -5,16 +14,12 @@ let
in
{
options.nyx-module.home.krita = {
enable = lib.mkEnableOption "Enable krita (home) module";
package = lib.mkOption {
type = lib.types.package;
default = pkgs.krita;
description = "Package to install for krita.";
};
enable = lib.mkEnableOption "Enable Krita (home) module";
};
config = lib.mkIf cfg.enable {
home.packages = [ cfg.package ];
home.packages = with pkgs; [
krita
];
};
}

View file

@ -3,6 +3,7 @@
{
imports = [
./kdenlive.nix
./video-player.nix
./zoom.nix
];
}

View file

@ -1,3 +1,15 @@
# Kdenlive (video editor)
#
# Provides:
# - Kdenlive video editor
# - Installed via home.packages
#
# Notes:
# - Package location depends on nixpkgs version:
# * pkgs.kdePackages.kdenlive (preferred, modern KDE split)
# * pkgs.libsForQt5.kdenlive (older releases, fallback)
#
{ config, lib, pkgs, ... }:
let
@ -5,16 +17,12 @@ let
in
{
options.nyx-module.home.kdenlive = {
enable = lib.mkEnableOption "Enable kdenlive (home) module";
package = lib.mkOption {
type = lib.types.package;
default = pkgs.kdenlive;
description = "Package to install for kdenlive.";
};
enable = lib.mkEnableOption "Enable Kdenlive (home) module";
};
config = lib.mkIf cfg.enable {
home.packages = [ cfg.package ];
home.packages = [
(pkgs.kdePackages.kdenlive or pkgs.libsForQt5.kdenlive)
];
};
}

View file

@ -0,0 +1,39 @@
# Video Player(s)
#
# Provides:
# - Installs one or more chosen video/media players
#
# Notes:
# - Defaults to [ vlc ]
#
{ config, lib, pkgs, ... }:
let
cfg = config.nyx-module.home.video-player;
in
{
options.nyx-module.home.video-player = {
enable = lib.mkEnableOption "Enable video players (home module)";
packages = lib.mkOption {
type = lib.types.listOf lib.types.package;
default = [ pkgs.vlc ];
example = [ pkgs.vlc pkgs.mpv pkgs.celluloid ];
description = "List of video/media players to install (e.g. vlc, mpv, celluloid).";
};
};
config = lib.mkIf cfg.enable {
home.packages = cfg.packages;
};
}
##########
# Example
##########
# nyx-module.home.video-player = {
# enable = true;
# packages = [ pkgs.vlc pkgs.mpv ];
# };

View file

@ -1,3 +1,15 @@
# Zoom (video conferencing client)
#
# Provides:
# - Zoom package (default: pkgs.zoom-us)
#
# Options:
# - `package`: override the package (e.g. pkgs.zoom)
#
# Notes:
# - Installed via home.packages
#
{ config, lib, pkgs, ... }:
let
@ -5,12 +17,12 @@ let
in
{
options.nyx-module.home.zoom = {
enable = lib.mkEnableOption "Enable zoom (home) module";
enable = lib.mkEnableOption "Enable Zoom (home) module";
package = lib.mkOption {
type = lib.types.package;
default = pkgs.zoom;
description = "Package to install for zoom.";
default = pkgs.zoom-us;
description = "Zoom package to install (e.g., pkgs.zoom-us).";
};
};