Nyx-Tools/nyx/default.nix
Peritia 7e5f29cf9f Version 1.1.0
Added:
- TUI
- A few comments
2025-08-11 14:12:14 +02:00

56 lines
1.4 KiB
Nix

# nyx.nix
{ config, lib, ... }:
with lib;
{
################################################################
# Global Nyx Options
################################################################
options.nyx = {
enable = mkEnableOption "Enable all Nyx tools";
username = mkOption {
type = types.str;
description = "Username for Nyx tools";
};
nixDirectory = mkOption {
type = types.path;
description = "Path to NixOS flake directory";
};
logDir = mkOption {
type = types.path;
default = "/home/${config.nyx.username}/.nyx/logs";
description = "Directory for Nyx logs";
};
autoPush = mkOption {
type = types.bool;
default = false;
description = "Automatically push changes after rebuild/cleanup";
};
};
################################################################
# Import submodules
################################################################
imports = [
./nyx-rebuild.nix
./nyx-cleanup.nix
./nyx-tool.nix
./nyx-tui.nix
];
################################################################
# Global disable logic
################################################################
config = mkIf (!config.nyx.enable) {
nyx.nyx-rebuild.enable = false;
nyx.nyx-cleanup.enable = false;
nyx.nyx-tui.enable = false;
nyx.nyx-tool.enable = false;
};
}