letting it auto run pretty much, god i don't know how to program anymore. This is kinda a joke
This commit is contained in:
190
modules/core.nix
190
modules/core.nix
@@ -9,27 +9,130 @@ in
|
||||
options.omnixy = {
|
||||
enable = mkEnableOption "OmniXY system configuration";
|
||||
|
||||
# User Configuration
|
||||
user = mkOption {
|
||||
type = types.str;
|
||||
default = "user";
|
||||
description = "Primary user for the system";
|
||||
example = "john";
|
||||
};
|
||||
|
||||
# Theme Configuration
|
||||
theme = mkOption {
|
||||
type = types.enum [ "tokyo-night" "catppuccin" "gruvbox" "nord" "everforest" "rose-pine" "kanagawa" ];
|
||||
default = "tokyo-night";
|
||||
description = "System theme";
|
||||
description = "System theme - changes colors, wallpaper, and overall look";
|
||||
example = "catppuccin";
|
||||
};
|
||||
|
||||
# User-friendly theme aliases
|
||||
darkMode = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Use dark theme variant when available";
|
||||
};
|
||||
|
||||
displayManager = mkOption {
|
||||
type = types.enum [ "gdm" "tuigreet" ];
|
||||
default = "tuigreet";
|
||||
description = "Display manager to use for login";
|
||||
};
|
||||
|
||||
colorScheme = mkOption {
|
||||
type = types.nullOr types.attrs;
|
||||
default = null;
|
||||
description = "Color scheme from nix-colors. If null, uses theme-specific colors.";
|
||||
example = "inputs.nix-colors.colorSchemes.tokyo-night-dark";
|
||||
};
|
||||
|
||||
wallpaper = mkOption {
|
||||
type = types.nullOr types.path;
|
||||
default = null;
|
||||
description = "Path to wallpaper for automatic color generation";
|
||||
};
|
||||
|
||||
# Feature Categories - Simple on/off switches for major functionality
|
||||
features = {
|
||||
docker = mkEnableOption "Docker container support";
|
||||
development = mkEnableOption "Development tools and environments";
|
||||
gaming = mkEnableOption "Gaming support (Steam, Wine, etc.)";
|
||||
multimedia = mkEnableOption "Multimedia applications";
|
||||
# Development
|
||||
coding = mkEnableOption "Development tools, editors, and programming languages";
|
||||
containers = mkEnableOption "Docker and container support";
|
||||
|
||||
# Entertainment
|
||||
gaming = mkEnableOption "Gaming support with Steam, Wine, and performance tools";
|
||||
media = mkEnableOption "Video players, image viewers, and media editing tools";
|
||||
|
||||
# Productivity
|
||||
office = mkEnableOption "Office suite, PDF viewers, and productivity apps";
|
||||
communication = mkEnableOption "Chat apps, email clients, and video conferencing";
|
||||
|
||||
# System
|
||||
virtualization = mkEnableOption "VM support (VirtualBox, QEMU, etc.)";
|
||||
backup = mkEnableOption "Backup tools and cloud sync applications";
|
||||
|
||||
# Appearance
|
||||
customThemes = mkEnableOption "Advanced theming with nix-colors integration";
|
||||
wallpaperEffects = mkEnableOption "Dynamic wallpapers and color generation";
|
||||
};
|
||||
|
||||
# Simple Presets - Predefined feature combinations
|
||||
preset = mkOption {
|
||||
type = types.nullOr (types.enum [ "minimal" "developer" "creator" "gamer" "office" "everything" ]);
|
||||
default = null;
|
||||
description = ''
|
||||
Quick setup preset that automatically enables related features:
|
||||
- minimal: Just the basics (browser, terminal, file manager)
|
||||
- developer: Coding tools, containers, git, IDEs
|
||||
- creator: Media editing, design tools, content creation
|
||||
- gamer: Gaming support, performance tools, Discord
|
||||
- office: Productivity apps, office suite, communication
|
||||
- everything: All features enabled
|
||||
'';
|
||||
example = "developer";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# Apply preset configurations automatically
|
||||
omnixy.features = mkMerge [
|
||||
# Default features based on preset
|
||||
(mkIf (cfg.preset == "minimal") {
|
||||
# Only basic features
|
||||
})
|
||||
(mkIf (cfg.preset == "developer") {
|
||||
coding = mkDefault true;
|
||||
containers = mkDefault true;
|
||||
customThemes = mkDefault true;
|
||||
})
|
||||
(mkIf (cfg.preset == "creator") {
|
||||
media = mkDefault true;
|
||||
office = mkDefault true;
|
||||
customThemes = mkDefault true;
|
||||
wallpaperEffects = mkDefault true;
|
||||
})
|
||||
(mkIf (cfg.preset == "gamer") {
|
||||
gaming = mkDefault true;
|
||||
media = mkDefault true;
|
||||
communication = mkDefault true;
|
||||
})
|
||||
(mkIf (cfg.preset == "office") {
|
||||
office = mkDefault true;
|
||||
communication = mkDefault true;
|
||||
backup = mkDefault true;
|
||||
})
|
||||
(mkIf (cfg.preset == "everything") {
|
||||
coding = mkDefault true;
|
||||
containers = mkDefault true;
|
||||
gaming = mkDefault true;
|
||||
media = mkDefault true;
|
||||
office = mkDefault true;
|
||||
communication = mkDefault true;
|
||||
virtualization = mkDefault true;
|
||||
backup = mkDefault true;
|
||||
customThemes = mkDefault true;
|
||||
wallpaperEffects = mkDefault true;
|
||||
})
|
||||
];
|
||||
|
||||
# Basic system configuration
|
||||
system.autoUpgrade = {
|
||||
enable = true;
|
||||
@@ -42,7 +145,7 @@ in
|
||||
documentation = {
|
||||
enable = true;
|
||||
man.enable = true;
|
||||
dev.enable = cfg.features.development;
|
||||
dev.enable = cfg.features.coding or false;
|
||||
};
|
||||
|
||||
# Security settings
|
||||
@@ -106,8 +209,6 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
# Enable flatpak support
|
||||
flatpak.enable = true;
|
||||
|
||||
# System monitoring
|
||||
smartd = {
|
||||
@@ -126,8 +227,6 @@ in
|
||||
# OpenGL support
|
||||
opengl = {
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
extraPackages = with pkgs; [
|
||||
intel-media-driver
|
||||
vaapiIntel
|
||||
@@ -138,7 +237,7 @@ in
|
||||
};
|
||||
|
||||
# Docker configuration
|
||||
virtualisation = mkIf cfg.features.docker {
|
||||
virtualisation = mkIf (cfg.features.containers or false) {
|
||||
docker = {
|
||||
enable = true;
|
||||
enableOnBoot = true;
|
||||
@@ -149,21 +248,24 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
# Development configuration
|
||||
programs = mkIf cfg.features.development {
|
||||
git = {
|
||||
# Programs configuration
|
||||
programs = {
|
||||
# Development programs
|
||||
git = mkIf (cfg.features.coding or false) {
|
||||
enable = true;
|
||||
lfs.enable = true;
|
||||
};
|
||||
|
||||
npm.enable = true;
|
||||
};
|
||||
npm = mkIf (cfg.features.coding or false) {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
# Gaming configuration
|
||||
programs.steam = mkIf cfg.features.gaming {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true;
|
||||
dedicatedServer.openFirewall = true;
|
||||
# Gaming configuration
|
||||
steam = mkIf (cfg.features.gaming or false) {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true;
|
||||
dedicatedServer.openFirewall = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Environment variables
|
||||
@@ -279,7 +381,7 @@ in
|
||||
|
||||
# Development basics
|
||||
git
|
||||
make
|
||||
gnumake
|
||||
gcc
|
||||
|
||||
# Nix tools
|
||||
@@ -290,20 +392,40 @@ in
|
||||
# Custom OmniXY scripts
|
||||
(writeShellScriptBin "omnixy-info" ''
|
||||
#!/usr/bin/env bash
|
||||
echo "OmniXY NixOS"
|
||||
echo "============"
|
||||
echo "Version: ${config.omnixy.version or "1.0.0"}"
|
||||
echo "Theme: ${cfg.theme}"
|
||||
echo "User: ${cfg.user}"
|
||||
echo "🌟 OmniXY NixOS Configuration"
|
||||
echo "============================="
|
||||
echo ""
|
||||
echo "Features:"
|
||||
echo " Docker: ${if cfg.features.docker then "✓" else "✗"}"
|
||||
echo " Development: ${if cfg.features.development then "✓" else "✗"}"
|
||||
echo " Gaming: ${if cfg.features.gaming then "✓" else "✗"}"
|
||||
echo " Multimedia: ${if cfg.features.multimedia then "✓" else "✗"}"
|
||||
echo "📋 Basic Settings:"
|
||||
echo " User: ${cfg.user}"
|
||||
echo " Theme: ${cfg.theme}"
|
||||
echo " Preset: ${if cfg.preset != null then cfg.preset else "custom"}"
|
||||
echo " Display Manager: ${cfg.displayManager}"
|
||||
echo ""
|
||||
echo "System Info:"
|
||||
nixos-version
|
||||
echo "🎯 Active Features:"
|
||||
echo " Development: ${if cfg.features.coding or false then "✅" else "❌"}"
|
||||
echo " Containers: ${if cfg.features.containers or false then "✅" else "❌"}"
|
||||
echo " Gaming: ${if cfg.features.gaming or false then "✅" else "❌"}"
|
||||
echo " Media: ${if cfg.features.media or false then "✅" else "❌"}"
|
||||
echo " Office: ${if cfg.features.office or false then "✅" else "❌"}"
|
||||
echo " Communication: ${if cfg.features.communication or false then "✅" else "❌"}"
|
||||
echo " Virtualization: ${if cfg.features.virtualization or false then "✅" else "❌"}"
|
||||
echo " Backup: ${if cfg.features.backup or false then "✅" else "❌"}"
|
||||
echo ""
|
||||
echo "🎨 Theming:"
|
||||
echo " Custom Themes: ${if cfg.features.customThemes or false then "✅" else "❌"}"
|
||||
echo " Wallpaper Effects: ${if cfg.features.wallpaperEffects or false then "✅" else "❌"}"
|
||||
echo " Color Scheme: ${if cfg.colorScheme != null then "Custom" else "Theme-based"}"
|
||||
echo " Wallpaper: ${if cfg.wallpaper != null then toString cfg.wallpaper else "Not set"}"
|
||||
echo ""
|
||||
echo "💡 Quick Commands:"
|
||||
echo " omnixy-setup-colors - Configure colors and themes"
|
||||
echo " omnixy-rebuild - Rebuild system configuration"
|
||||
echo " omnixy-help - Show keyboard shortcuts and help"
|
||||
echo ""
|
||||
echo "📊 System Information:"
|
||||
nixos-version --json | ${pkgs.jq}/bin/jq -r '" NixOS: " + .nixosVersion'
|
||||
echo " Kernel: $(uname -r)"
|
||||
echo " Uptime: $(uptime -p)"
|
||||
'')
|
||||
];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user