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:
@@ -306,6 +306,10 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
|
||||
- Theme configurations adapted from community themes and color schemes
|
||||
- [Nix Flakes](https://nixos.wiki/wiki/Flakes) - for reproducible and composable configurations
|
||||
|
||||
## 🔗 Similar Projects
|
||||
|
||||
- [Omarchy Nix](https://github.com/henrysipp/omarchy-nix) - Another NixOS implementation of DHH's Omarchy with automatic theme generation from wallpapers
|
||||
|
||||
## 🔗 Links
|
||||
|
||||
- [NixOS Manual](https://nixos.org/manual/nixos/stable/) - Official NixOS documentation
|
||||
|
||||
@@ -16,8 +16,10 @@ in
|
||||
# Include the results of the hardware scan
|
||||
./hardware-configuration.nix
|
||||
|
||||
# Omarchy modules
|
||||
# OmniXY modules (lib must be first to provide helpers)
|
||||
./modules/lib.nix
|
||||
./modules/core.nix
|
||||
./modules/colors.nix
|
||||
./modules/desktop/hyprland.nix
|
||||
./modules/packages.nix
|
||||
./modules/development.nix
|
||||
@@ -27,6 +29,9 @@ in
|
||||
./modules/hardware
|
||||
];
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# Enable flakes
|
||||
nix = {
|
||||
settings = {
|
||||
@@ -67,8 +72,8 @@ in
|
||||
# Plymouth for boot splash
|
||||
plymouth = {
|
||||
enable = true;
|
||||
theme = "omnixy";
|
||||
themePackages = [ (pkgs.callPackage ./packages/plymouth-theme.nix {}) ];
|
||||
theme = "bgrt"; # Use default theme for now
|
||||
# themePackages = [ (pkgs.callPackage ./packages/plymouth-theme.nix {}) ];
|
||||
};
|
||||
|
||||
# Kernel
|
||||
@@ -104,8 +109,7 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
# Sound
|
||||
sound.enable = true;
|
||||
# Sound (deprecated option removed)
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
@@ -121,13 +125,8 @@ in
|
||||
enable = true;
|
||||
excludePackages = [ pkgs.xterm ];
|
||||
|
||||
# Display manager
|
||||
displayManager = {
|
||||
gdm = {
|
||||
enable = true;
|
||||
wayland = true;
|
||||
};
|
||||
};
|
||||
# Display manager disabled - using tuigreet in services.nix
|
||||
displayManager.gdm.enable = false;
|
||||
};
|
||||
|
||||
# Console configuration
|
||||
@@ -146,14 +145,37 @@ in
|
||||
# Custom OmniXY settings
|
||||
omnixy = {
|
||||
enable = true;
|
||||
user = "user"; # Change this to your username
|
||||
theme = currentTheme;
|
||||
displayManager = "tuigreet";
|
||||
|
||||
# Feature flags
|
||||
features = {
|
||||
docker = true;
|
||||
development = true;
|
||||
gaming = false;
|
||||
multimedia = true;
|
||||
# Quick Setup - Choose a preset that matches your use case
|
||||
preset = "developer"; # Options: minimal, developer, creator, gamer, office, everything
|
||||
|
||||
# Color scheme configuration (optional)
|
||||
# Uncomment and customize these options for automatic color generation:
|
||||
# colorScheme = inputs.nix-colors.colorSchemes.tokyo-night-dark;
|
||||
# wallpaper = /path/to/your/wallpaper.jpg;
|
||||
|
||||
# Fine-grained feature control (overrides preset settings)
|
||||
# Uncomment and customize as needed:
|
||||
# features = {
|
||||
# coding = true; # Development tools, editors, programming languages
|
||||
# containers = true; # Docker and container support
|
||||
# gaming = false; # Steam, Wine, gaming performance tools
|
||||
# media = true; # Video players, image viewers, media editing
|
||||
# office = false; # Office suite, PDF viewers, productivity apps
|
||||
# communication = false; # Chat apps, email, video conferencing
|
||||
# virtualization = false; # VirtualBox, QEMU, VM tools
|
||||
# backup = false; # Backup tools, cloud sync
|
||||
# customThemes = true; # Advanced theming with nix-colors
|
||||
# wallpaperEffects = true; # Dynamic wallpapers and color generation
|
||||
# };
|
||||
|
||||
# Package management
|
||||
packages = {
|
||||
# Example: Exclude specific packages you don't want
|
||||
# exclude = [ "discord" "spotify" "steam" "teams" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
1096
flake.lock
generated
Normal file
1096
flake.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
19
flake.nix
19
flake.nix
@@ -24,15 +24,17 @@
|
||||
inputs.hyprland.follows = "hyprland";
|
||||
};
|
||||
|
||||
# Nix colors for automatic color scheme generation
|
||||
nix-colors = {
|
||||
url = "github:misterio77/nix-colors";
|
||||
};
|
||||
|
||||
# Stylix for theming
|
||||
stylix = {
|
||||
url = "github:danth/stylix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# Nix colors
|
||||
nix-colors.url = "github:misterio77/nix-colors";
|
||||
|
||||
# Neovim nightly
|
||||
neovim-nightly-overlay = {
|
||||
url = "github:nix-community/neovim-nightly-overlay";
|
||||
@@ -53,8 +55,8 @@
|
||||
allowUnfree = true;
|
||||
};
|
||||
overlays = [
|
||||
inputs.nur.overlay
|
||||
inputs.neovim-nightly-overlay.overlay
|
||||
inputs.nur.overlays.default
|
||||
inputs.neovim-nightly-overlay.overlays.default
|
||||
];
|
||||
};
|
||||
in
|
||||
@@ -76,6 +78,9 @@
|
||||
# Replace with your username
|
||||
user = import ./home.nix;
|
||||
};
|
||||
sharedModules = [
|
||||
inputs.nix-colors.homeManagerModules.default
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
@@ -178,8 +183,8 @@
|
||||
# OmniXY scripts as packages
|
||||
omnixy-scripts = pkgs.callPackage ./packages/scripts.nix {};
|
||||
|
||||
# Plymouth theme
|
||||
plymouth-theme-omnixy = pkgs.callPackage ./packages/plymouth-theme.nix {};
|
||||
# Plymouth theme (disabled until package exists)
|
||||
# plymouth-theme-omnixy = pkgs.callPackage ./packages/plymouth-theme.nix {};
|
||||
};
|
||||
|
||||
# Apps that can be run
|
||||
|
||||
25
home.nix
25
home.nix
@@ -16,6 +16,7 @@
|
||||
# Packages to install
|
||||
home.packages = with pkgs; [
|
||||
# Terminal utilities
|
||||
ghostty
|
||||
alacritty
|
||||
kitty
|
||||
wezterm
|
||||
@@ -37,7 +38,7 @@
|
||||
# System monitoring
|
||||
btop
|
||||
htop
|
||||
nvtop
|
||||
nvtopPackages.full
|
||||
|
||||
# Media
|
||||
mpv
|
||||
@@ -84,7 +85,9 @@
|
||||
wev
|
||||
|
||||
# Fonts
|
||||
(nerdfonts.override { fonts = [ "JetBrainsMono" "FiraCode" "Hack" ]; })
|
||||
nerd-fonts.jetbrains-mono
|
||||
nerd-fonts.fira-code
|
||||
nerd-fonts.hack
|
||||
noto-fonts
|
||||
noto-fonts-emoji
|
||||
liberation_ttf
|
||||
@@ -182,23 +185,23 @@
|
||||
'';
|
||||
|
||||
character = {
|
||||
success_symbol = "[➜](bold green)";
|
||||
error_symbol = "[➜](bold red)";
|
||||
success_symbol = lib.mkDefault "[➜](bold green)";
|
||||
error_symbol = lib.mkDefault "[➜](bold red)";
|
||||
};
|
||||
|
||||
directory = {
|
||||
truncation_length = 3;
|
||||
truncate_to_repo = true;
|
||||
style = "bold cyan";
|
||||
style = lib.mkDefault "bold cyan";
|
||||
};
|
||||
|
||||
git_branch = {
|
||||
style = "bold purple";
|
||||
style = lib.mkDefault "bold purple";
|
||||
symbol = " ";
|
||||
};
|
||||
|
||||
git_status = {
|
||||
style = "bold red";
|
||||
style = lib.mkDefault "bold red";
|
||||
ahead = "⇡\${count}";
|
||||
diverged = "⇕⇡\${ahead_count}⇣\${behind_count}";
|
||||
behind = "⇣\${count}";
|
||||
@@ -298,7 +301,7 @@
|
||||
];
|
||||
|
||||
userSettings = {
|
||||
"workbench.colorTheme" = "One Dark Pro";
|
||||
"workbench.colorTheme" = lib.mkDefault "One Dark Pro";
|
||||
"workbench.iconTheme" = "material-icon-theme";
|
||||
"editor.fontFamily" = "'JetBrainsMono Nerd Font', monospace";
|
||||
"editor.fontSize" = 14;
|
||||
@@ -377,10 +380,10 @@
|
||||
gtk = {
|
||||
enable = true;
|
||||
theme = {
|
||||
name = "Catppuccin-Mocha-Standard-Blue-dark";
|
||||
package = pkgs.catppuccin-gtk.override {
|
||||
name = lib.mkDefault "Catppuccin-Mocha-Standard-Blue-dark";
|
||||
package = lib.mkDefault (pkgs.catppuccin-gtk.override {
|
||||
variant = "mocha";
|
||||
};
|
||||
});
|
||||
};
|
||||
iconTheme = {
|
||||
name = "Papirus-Dark";
|
||||
|
||||
146
modules/colors.nix
Normal file
146
modules/colors.nix
Normal file
@@ -0,0 +1,146 @@
|
||||
{ config, pkgs, lib, inputs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.omnixy;
|
||||
omnixy = import ./helpers.nix { inherit config pkgs lib; };
|
||||
|
||||
# Function to generate colors from wallpaper using imagemagick
|
||||
generateColorsFromWallpaper = wallpaperPath: pkgs.writeShellScriptBin "generate-colors" ''
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Extract dominant colors from wallpaper using imagemagick
|
||||
colors=$(${pkgs.imagemagick}/bin/convert "${wallpaperPath}" -resize 1x1 -format "%[pixel:u]" info:)
|
||||
|
||||
# Generate a simple color scheme based on the dominant color
|
||||
# This is a simplified approach - ideally would use a more sophisticated algorithm
|
||||
echo "# Generated color scheme from wallpaper: ${wallpaperPath}"
|
||||
echo "# Dominant color: $colors"
|
||||
|
||||
# For now, we'll use predefined schemes that match common wallpaper types
|
||||
# In a real implementation, this would analyze the image and generate appropriate colors
|
||||
'';
|
||||
|
||||
# Default color schemes for common wallpaper types
|
||||
fallbackColorSchemes = {
|
||||
dark = inputs.nix-colors.colorSchemes.tokyo-night-dark or null;
|
||||
light = inputs.nix-colors.colorSchemes.tokyo-night-light or null;
|
||||
blue = inputs.nix-colors.colorSchemes.nord or null;
|
||||
purple = inputs.nix-colors.colorSchemes.catppuccin-mocha or null;
|
||||
green = inputs.nix-colors.colorSchemes.gruvbox-dark-medium or null;
|
||||
};
|
||||
|
||||
# Select color scheme based on wallpaper or user preference
|
||||
selectedColorScheme =
|
||||
if cfg.colorScheme != null then
|
||||
cfg.colorScheme
|
||||
else if cfg.wallpaper != null && cfg.features.autoColors then
|
||||
# TODO: Implement actual color analysis
|
||||
# For now, use a sensible default based on theme
|
||||
fallbackColorSchemes.${cfg.theme} or fallbackColorSchemes.dark
|
||||
else
|
||||
# Use theme-based color scheme
|
||||
fallbackColorSchemes.${cfg.theme} or fallbackColorSchemes.dark;
|
||||
|
||||
in
|
||||
{
|
||||
config = mkIf (cfg.enable or true) (mkMerge [
|
||||
# User-specific configuration using shared helpers
|
||||
(omnixy.forUser (mkIf (selectedColorScheme != null) {
|
||||
colorScheme = selectedColorScheme;
|
||||
|
||||
# Add packages for color management
|
||||
home.packages = omnixy.filterPackages (with pkgs; [
|
||||
imagemagick # For color extraction from images
|
||||
] ++ optionals (omnixy.isEnabled "customThemes" || omnixy.isEnabled "wallpaperEffects") [
|
||||
# Additional packages for advanced color analysis
|
||||
python3Packages.pillow # For more sophisticated image analysis
|
||||
python3Packages.colorthief # For extracting color palettes
|
||||
] ++ optionals (cfg.wallpaper != null) [
|
||||
# Generate wallpaper setter script that respects colors
|
||||
(omnixy.makeScript "set-omnixy-wallpaper" "Set wallpaper with automatic color generation" ''
|
||||
WALLPAPER_PATH="${cfg.wallpaper}"
|
||||
|
||||
echo "Setting wallpaper: $WALLPAPER_PATH"
|
||||
|
||||
# Set wallpaper with swww
|
||||
if command -v swww &> /dev/null; then
|
||||
swww img "$WALLPAPER_PATH" --transition-type wipe --transition-angle 30 --transition-step 90
|
||||
else
|
||||
echo "swww not found, please install swww for wallpaper support"
|
||||
fi
|
||||
|
||||
# Optionally generate new colors from wallpaper
|
||||
${optionalString (omnixy.isEnabled "wallpaperEffects") ''
|
||||
echo "Generating colors from wallpaper..."
|
||||
# This would trigger a system rebuild with new colors
|
||||
# For now, just notify the user
|
||||
echo "Note: Automatic color generation requires system rebuild"
|
||||
echo "Consider adding this wallpaper to your configuration and rebuilding"
|
||||
''}
|
||||
'')
|
||||
]);
|
||||
}))
|
||||
|
||||
# System-level configuration
|
||||
{
|
||||
|
||||
# System-level packages for color management
|
||||
environment.systemPackages = with pkgs; [
|
||||
# Color utilities
|
||||
imagemagick
|
||||
|
||||
# Wallpaper utilities
|
||||
swww # Wayland wallpaper daemon
|
||||
|
||||
# Script to help users set up automatic colors
|
||||
(writeShellScriptBin "omnixy-setup-colors" ''
|
||||
#!/usr/bin/env bash
|
||||
|
||||
echo "OmniXY Color Setup"
|
||||
echo "=================="
|
||||
echo ""
|
||||
echo "Current configuration:"
|
||||
echo " Theme: ${cfg.theme}"
|
||||
echo " Preset: ${if cfg.preset != null then cfg.preset else "none"}"
|
||||
echo " Custom Themes: ${if cfg.features.customThemes or false then "enabled" else "disabled"}"
|
||||
echo " Wallpaper Effects: ${if cfg.features.wallpaperEffects or false then "enabled" else "disabled"}"
|
||||
echo " Wallpaper: ${if cfg.wallpaper != null then toString cfg.wallpaper else "not set"}"
|
||||
echo " Color Scheme: ${if cfg.colorScheme != null then "custom" else "theme-based"}"
|
||||
echo ""
|
||||
|
||||
${optionalString (!(cfg.features.wallpaperEffects or false)) ''
|
||||
echo "To enable automatic color generation:"
|
||||
echo " 1. Set omnixy.features.wallpaperEffects = true; in your configuration"
|
||||
echo " 2. Set omnixy.wallpaper = /path/to/your/wallpaper.jpg;"
|
||||
echo " 3. Rebuild your system with: omnixy-rebuild"
|
||||
echo ""
|
||||
''}
|
||||
|
||||
${optionalString ((cfg.features.wallpaperEffects or false) && cfg.wallpaper == null) ''
|
||||
echo "Wallpaper effects are enabled but no wallpaper is set."
|
||||
echo "Set omnixy.wallpaper = /path/to/your/wallpaper.jpg; in your configuration."
|
||||
echo ""
|
||||
''}
|
||||
|
||||
echo "Available nix-colors schemes:"
|
||||
echo " - tokyo-night-dark, tokyo-night-light"
|
||||
echo " - catppuccin-mocha, catppuccin-latte"
|
||||
echo " - gruvbox-dark-medium, gruvbox-light-medium"
|
||||
echo " - nord"
|
||||
echo " - everforest-dark-medium"
|
||||
echo " - rose-pine, rose-pine-dawn"
|
||||
echo ""
|
||||
echo "To use a specific scheme:"
|
||||
echo ' omnixy.colorScheme = inputs.nix-colors.colorSchemes.SCHEME_NAME;'
|
||||
'')
|
||||
];
|
||||
|
||||
# Export color information for other modules to use
|
||||
environment.variables = mkIf (selectedColorScheme != null) {
|
||||
OMNIXY_COLOR_SCHEME = selectedColorScheme.slug or "unknown";
|
||||
};
|
||||
}
|
||||
]);
|
||||
}
|
||||
180
modules/core.nix
180
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,22 +248,25 @@ 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 {
|
||||
steam = mkIf (cfg.features.gaming or false) {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true;
|
||||
dedicatedServer.openFirewall = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Environment variables
|
||||
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)"
|
||||
'')
|
||||
];
|
||||
};
|
||||
|
||||
@@ -18,7 +18,7 @@ in
|
||||
|
||||
defaultTerminal = mkOption {
|
||||
type = types.str;
|
||||
default = "alacritty";
|
||||
default = "ghostty";
|
||||
description = "Default terminal emulator";
|
||||
};
|
||||
|
||||
@@ -29,9 +29,9 @@ in
|
||||
};
|
||||
|
||||
wallpaper = mkOption {
|
||||
type = types.path;
|
||||
default = ./wallpapers/default.jpg;
|
||||
description = "Path to wallpaper image";
|
||||
type = types.nullOr types.path;
|
||||
default = null;
|
||||
description = "Path to wallpaper image (optional)";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -262,11 +262,11 @@ in
|
||||
mouse_move_enables_dpms = true
|
||||
key_press_enables_dpms = true
|
||||
enable_swallow = true
|
||||
swallow_regex = ^(alacritty|kitty|footclient)$
|
||||
swallow_regex = ^(ghostty|alacritty|kitty|footclient)$
|
||||
}
|
||||
|
||||
# Window rules
|
||||
windowrulev2 = opacity 0.9 override 0.9 override, class:^(Alacritty|kitty)$
|
||||
windowrulev2 = opacity 0.9 override 0.9 override, class:^(ghostty|Alacritty|kitty)$
|
||||
windowrulev2 = opacity 0.9 override 0.9 override, class:^(Code|code-oss)$
|
||||
windowrulev2 = float, class:^(pavucontrol|nm-connection-editor|blueman-manager)$
|
||||
windowrulev2 = float, class:^(org.gnome.Calculator|gnome-calculator)$
|
||||
|
||||
@@ -3,10 +3,11 @@
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.omnixy.features.development;
|
||||
cfg = config.omnixy;
|
||||
omnixy = import ./helpers.nix { inherit config pkgs lib; };
|
||||
in
|
||||
{
|
||||
config = mkIf cfg {
|
||||
config = omnixy.withFeature "coding" {
|
||||
# Development tools
|
||||
environment.systemPackages = with pkgs; [
|
||||
# Version control
|
||||
@@ -102,7 +103,7 @@ in
|
||||
sqlite
|
||||
redis
|
||||
mongodb
|
||||
dbeaver
|
||||
dbeaver-bin
|
||||
|
||||
# Container tools
|
||||
docker
|
||||
@@ -179,100 +180,10 @@ in
|
||||
tmuxinator
|
||||
asciinema
|
||||
tokei
|
||||
loc
|
||||
cloc
|
||||
tree-sitter
|
||||
];
|
||||
|
||||
# Docker daemon
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
enableOnBoot = true;
|
||||
daemon.settings = {
|
||||
features = { buildkit = true; };
|
||||
registry-mirrors = [ "https://mirror.gcr.io" ];
|
||||
};
|
||||
|
||||
autoPrune = {
|
||||
enable = true;
|
||||
dates = "weekly";
|
||||
flags = [ "--all" ];
|
||||
};
|
||||
};
|
||||
|
||||
# Podman as Docker alternative
|
||||
virtualisation.podman = {
|
||||
enable = true;
|
||||
dockerCompat = true;
|
||||
defaultNetwork.settings.dns_enabled = true;
|
||||
};
|
||||
|
||||
# Development services
|
||||
services = {
|
||||
# PostgreSQL
|
||||
postgresql = {
|
||||
enable = false; # Set to true to enable
|
||||
package = pkgs.postgresql_15;
|
||||
dataDir = "/var/lib/postgresql/15";
|
||||
authentication = ''
|
||||
local all all trust
|
||||
host all all 127.0.0.1/32 trust
|
||||
host all all ::1/128 trust
|
||||
'';
|
||||
};
|
||||
|
||||
# Redis
|
||||
redis.servers."" = {
|
||||
enable = false; # Set to true to enable
|
||||
port = 6379;
|
||||
bind = "127.0.0.1";
|
||||
};
|
||||
|
||||
# MySQL/MariaDB
|
||||
mysql = {
|
||||
enable = false; # Set to true to enable
|
||||
package = pkgs.mariadb;
|
||||
settings = {
|
||||
mysqld = {
|
||||
bind-address = "127.0.0.1";
|
||||
port = 3306;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# VSCode settings
|
||||
environment.variables = {
|
||||
# Enable VSCode to use Wayland
|
||||
NIXOS_OZONE_WL = "1";
|
||||
};
|
||||
|
||||
# Development shell environments
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
|
||||
# Git configuration
|
||||
programs.git = {
|
||||
enable = true;
|
||||
lfs.enable = true;
|
||||
config = {
|
||||
init.defaultBranch = "main";
|
||||
core = {
|
||||
editor = "nvim";
|
||||
autocrlf = "input";
|
||||
};
|
||||
pull.rebase = false;
|
||||
push.autoSetupRemote = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Enable lorri for automatic nix-shell
|
||||
services.lorri.enable = true;
|
||||
|
||||
# Add custom development scripts
|
||||
environment.systemPackages = with pkgs; [
|
||||
# Custom development scripts
|
||||
(writeShellScriptBin "dev-postgres" ''
|
||||
#!/usr/bin/env bash
|
||||
echo "Starting PostgreSQL development container..."
|
||||
@@ -471,5 +382,93 @@ in
|
||||
echo "Run 'direnv allow' to activate the development environment"
|
||||
'')
|
||||
];
|
||||
|
||||
# Docker daemon (only if containers feature is enabled)
|
||||
virtualisation.docker = mkIf (omnixy.isEnabled "containers") {
|
||||
enable = true;
|
||||
enableOnBoot = true;
|
||||
daemon.settings = {
|
||||
features = { buildkit = true; };
|
||||
registry-mirrors = [ "https://mirror.gcr.io" ];
|
||||
};
|
||||
|
||||
autoPrune = {
|
||||
enable = true;
|
||||
dates = "weekly";
|
||||
flags = [ "--all" ];
|
||||
};
|
||||
};
|
||||
|
||||
# Podman as Docker alternative (disabled dockerCompat to avoid conflict)
|
||||
virtualisation.podman = {
|
||||
enable = true;
|
||||
dockerCompat = false;
|
||||
defaultNetwork.settings.dns_enabled = true;
|
||||
};
|
||||
|
||||
# Development services
|
||||
services = {
|
||||
# PostgreSQL
|
||||
postgresql = {
|
||||
enable = false; # Set to true to enable
|
||||
package = pkgs.postgresql_15;
|
||||
dataDir = "/var/lib/postgresql/15";
|
||||
authentication = ''
|
||||
local all all trust
|
||||
host all all 127.0.0.1/32 trust
|
||||
host all all ::1/128 trust
|
||||
'';
|
||||
};
|
||||
|
||||
# Redis
|
||||
redis.servers."" = {
|
||||
enable = false; # Set to true to enable
|
||||
port = 6379;
|
||||
bind = "127.0.0.1";
|
||||
};
|
||||
|
||||
# MySQL/MariaDB
|
||||
mysql = {
|
||||
enable = false; # Set to true to enable
|
||||
package = pkgs.mariadb;
|
||||
settings = {
|
||||
mysqld = {
|
||||
bind-address = "127.0.0.1";
|
||||
port = 3306;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# VSCode settings
|
||||
environment.variables = {
|
||||
# Enable VSCode to use Wayland
|
||||
NIXOS_OZONE_WL = "1";
|
||||
};
|
||||
|
||||
# Development shell environments
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
|
||||
# Git configuration
|
||||
programs.git = {
|
||||
enable = true;
|
||||
lfs.enable = true;
|
||||
config = {
|
||||
init.defaultBranch = "main";
|
||||
core = {
|
||||
editor = "nvim";
|
||||
autocrlf = "input";
|
||||
};
|
||||
pull.rebase = false;
|
||||
push.autoSetupRemote = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Enable lorri for automatic nix-shell
|
||||
services.lorri.enable = true;
|
||||
|
||||
};
|
||||
}
|
||||
35
modules/hardware/amd.nix
Normal file
35
modules/hardware/amd.nix
Normal file
@@ -0,0 +1,35 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
options.hardware.amd.enable = mkEnableOption "AMD graphics support";
|
||||
|
||||
config = mkIf config.hardware.amd.enable {
|
||||
# AMD driver configuration
|
||||
services.xserver.videoDrivers = [ "amdgpu" ];
|
||||
|
||||
# Enable AMD GPU support
|
||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||
|
||||
# AMD specific packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
radeontop
|
||||
nvtopPackages.amd
|
||||
];
|
||||
|
||||
# OpenGL packages for AMD
|
||||
hardware.opengl.extraPackages = with pkgs; [
|
||||
amdvlk
|
||||
rocm-opencl-icd
|
||||
rocm-opencl-runtime
|
||||
];
|
||||
|
||||
hardware.opengl.extraPackages32 = with pkgs.pkgsi686Linux; [
|
||||
driversi686Linux.amdvlk
|
||||
];
|
||||
|
||||
# AMD GPU firmware
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
};
|
||||
}
|
||||
42
modules/hardware/audio.nix
Normal file
42
modules/hardware/audio.nix
Normal file
@@ -0,0 +1,42 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
options.hardware.audio.pipewire.enable = mkEnableOption "PipeWire audio system";
|
||||
|
||||
config = mkIf config.hardware.audio.pipewire.enable {
|
||||
# PipeWire configuration
|
||||
security.rtkit.enable = true;
|
||||
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
|
||||
# Audio packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
# Audio control
|
||||
pavucontrol
|
||||
pulsemixer
|
||||
alsamixer
|
||||
|
||||
# Audio tools
|
||||
audacity
|
||||
pulseaudio
|
||||
|
||||
# Bluetooth audio
|
||||
bluez
|
||||
bluez-tools
|
||||
];
|
||||
|
||||
# Disable PulseAudio (conflicts with PipeWire)
|
||||
hardware.pulseaudio.enable = false;
|
||||
|
||||
# Audio group for user
|
||||
users.groups.audio = {};
|
||||
};
|
||||
}
|
||||
45
modules/hardware/bluetooth.nix
Normal file
45
modules/hardware/bluetooth.nix
Normal file
@@ -0,0 +1,45 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
options.hardware.bluetooth.enhanced.enable = mkEnableOption "Enhanced Bluetooth support";
|
||||
|
||||
config = mkIf config.hardware.bluetooth.enhanced.enable {
|
||||
# Enable Bluetooth
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
settings = {
|
||||
General = {
|
||||
Enable = "Source,Sink,Media,Socket";
|
||||
Experimental = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Bluetooth services
|
||||
services.blueman.enable = true;
|
||||
|
||||
# Bluetooth packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
bluez
|
||||
bluez-tools
|
||||
blueman
|
||||
bluetuith
|
||||
];
|
||||
|
||||
# Auto-connect trusted devices
|
||||
systemd.user.services.bluetooth-auto-connect = {
|
||||
description = "Auto-connect Bluetooth devices";
|
||||
after = [ "bluetooth.service" ];
|
||||
partOf = [ "bluetooth.service" ];
|
||||
serviceConfig = {
|
||||
Type = "forking";
|
||||
ExecStart = "${pkgs.bluez}/bin/bluetoothctl connect-all";
|
||||
RemainAfterExit = true;
|
||||
};
|
||||
wantedBy = [ "default.target" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -14,8 +14,7 @@ with lib;
|
||||
|
||||
# Common hardware support
|
||||
hardware = {
|
||||
# Enable all firmware
|
||||
enableAllFirmware = true;
|
||||
# Enable redistributable firmware only
|
||||
enableRedistributableFirmware = true;
|
||||
|
||||
# CPU microcode updates
|
||||
@@ -25,8 +24,6 @@ with lib;
|
||||
# OpenGL/Graphics
|
||||
opengl = {
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
|
||||
# Common OpenGL packages
|
||||
extraPackages = with pkgs; [
|
||||
@@ -50,8 +47,16 @@ with lib;
|
||||
# Sensor support (for laptops)
|
||||
sensor.iio.enable = true;
|
||||
|
||||
# Firmware updater
|
||||
fwupd.enable = true;
|
||||
# Scanner support
|
||||
sane = {
|
||||
enable = true;
|
||||
extraBackends = with pkgs; [
|
||||
sane-airscan
|
||||
epkowa
|
||||
];
|
||||
};
|
||||
|
||||
# Firmware updater (moved to services section)
|
||||
};
|
||||
|
||||
# Kernel modules
|
||||
@@ -80,8 +85,6 @@ with lib;
|
||||
# Power profiles daemon (modern power management)
|
||||
power-profiles-daemon.enable = true;
|
||||
|
||||
# Firmware update service
|
||||
fwupd.enable = true;
|
||||
|
||||
# Hardware monitoring
|
||||
smartd = {
|
||||
@@ -112,11 +115,9 @@ with lib;
|
||||
hwinfo
|
||||
inxi
|
||||
dmidecode
|
||||
lscpu
|
||||
lsusb
|
||||
lspci
|
||||
pciutils
|
||||
usbutils
|
||||
util-linux # provides lscpu
|
||||
pciutils # provides lspci
|
||||
usbutils # provides lsusb
|
||||
|
||||
# Disk tools
|
||||
smartmontools
|
||||
@@ -164,7 +165,7 @@ with lib;
|
||||
# Virtual console configuration
|
||||
console = {
|
||||
earlySetup = true;
|
||||
font = "${pkgs.terminus_font}/share/consolefonts/ter-132n.psf.gz";
|
||||
font = lib.mkDefault "${pkgs.terminus_font}/share/consolefonts/ter-132n.psf.gz";
|
||||
packages = [ pkgs.terminus_font ];
|
||||
};
|
||||
}
|
||||
39
modules/hardware/intel.nix
Normal file
39
modules/hardware/intel.nix
Normal file
@@ -0,0 +1,39 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
options.hardware.intel.enable = mkEnableOption "Intel graphics support";
|
||||
|
||||
config = mkIf config.hardware.intel.enable {
|
||||
# Intel driver configuration
|
||||
services.xserver.videoDrivers = [ "modesetting" ];
|
||||
|
||||
# Enable Intel GPU support
|
||||
boot.initrd.kernelModules = [ "i915" ];
|
||||
|
||||
# Intel GPU early loading
|
||||
boot.kernelParams = [ "i915.enable_guc=2" ];
|
||||
|
||||
# Intel specific packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
intel-gpu-tools
|
||||
nvtopPackages.intel
|
||||
];
|
||||
|
||||
# OpenGL packages for Intel (already configured in default.nix)
|
||||
hardware.opengl.extraPackages = with pkgs; [
|
||||
intel-media-driver
|
||||
vaapiIntel
|
||||
intel-compute-runtime
|
||||
intel-ocl
|
||||
];
|
||||
|
||||
hardware.opengl.extraPackages32 = with pkgs.pkgsi686Linux; [
|
||||
vaapiIntel
|
||||
];
|
||||
|
||||
# Intel GPU power management
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||
};
|
||||
}
|
||||
35
modules/hardware/nvidia.nix
Normal file
35
modules/hardware/nvidia.nix
Normal file
@@ -0,0 +1,35 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
options.hardware.nvidia.enable = mkEnableOption "NVIDIA graphics support";
|
||||
|
||||
config = mkIf config.hardware.nvidia.enable {
|
||||
# NVIDIA driver configuration
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
powerManagement.enable = false;
|
||||
powerManagement.finegrained = false;
|
||||
open = false;
|
||||
nvidiaSettings = true;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
};
|
||||
|
||||
# NVIDIA specific packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
nvidia-vaapi-driver
|
||||
libva-utils
|
||||
nvtopPackages.nvidia
|
||||
];
|
||||
|
||||
# OpenGL packages for NVIDIA
|
||||
hardware.opengl.extraPackages = with pkgs; [
|
||||
nvidia-vaapi-driver
|
||||
vaapiVdpau
|
||||
libvdpau-va-gl
|
||||
];
|
||||
};
|
||||
}
|
||||
45
modules/hardware/touchpad.nix
Normal file
45
modules/hardware/touchpad.nix
Normal file
@@ -0,0 +1,45 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
options.hardware.touchpad.enable = mkEnableOption "Enhanced touchpad support";
|
||||
|
||||
config = mkIf config.hardware.touchpad.enable {
|
||||
# Touchpad support via libinput
|
||||
services.xserver.libinput = {
|
||||
enable = true;
|
||||
touchpad = {
|
||||
tapping = true;
|
||||
tappingDragLock = true;
|
||||
naturalScrolling = true;
|
||||
scrollMethod = "twofinger";
|
||||
disableWhileTyping = true;
|
||||
middleEmulation = true;
|
||||
accelProfile = "adaptive";
|
||||
};
|
||||
};
|
||||
|
||||
# Synaptics touchpad (alternative, disabled by default)
|
||||
services.xserver.synaptics = {
|
||||
enable = false;
|
||||
twoFingerScroll = true;
|
||||
palmDetect = true;
|
||||
tapButtons = true;
|
||||
buttonsMap = [ 1 3 2 ];
|
||||
fingersMap = [ 0 0 0 ];
|
||||
};
|
||||
|
||||
# Touchpad packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
libinput
|
||||
xinput
|
||||
xorg.xf86inputlibinput
|
||||
];
|
||||
|
||||
# Touchpad gesture support
|
||||
services.touchegg = {
|
||||
enable = false; # Disabled by default, enable if needed
|
||||
};
|
||||
};
|
||||
}
|
||||
125
modules/helpers.nix
Normal file
125
modules/helpers.nix
Normal file
@@ -0,0 +1,125 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
# OmniXY Shared Helper Functions
|
||||
# Import this in other modules to access common patterns
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.omnixy;
|
||||
in
|
||||
{
|
||||
# Check if a feature is enabled, with fallback support
|
||||
isEnabled = feature: cfg.features.${feature} or false;
|
||||
|
||||
# Get user-specific paths
|
||||
userPath = path: "/home/${cfg.user}/${path}";
|
||||
configPath = path: "/home/${cfg.user}/.config/${path}";
|
||||
cachePath = path: "/home/${cfg.user}/.cache/${path}";
|
||||
|
||||
# Common color helper that works with both nix-colors and fallbacks
|
||||
getColor = colorName: fallback:
|
||||
if cfg.colorScheme != null && cfg.colorScheme ? colors && cfg.colorScheme.colors ? ${colorName}
|
||||
then "#${cfg.colorScheme.colors.${colorName}}"
|
||||
else fallback;
|
||||
|
||||
# Feature-based conditional inclusion
|
||||
withFeature = feature: content: mkIf (cfg.features.${feature} or false) content;
|
||||
withoutFeature = feature: content: mkIf (!(cfg.features.${feature} or false)) content;
|
||||
|
||||
# User-specific home-manager configuration
|
||||
forUser = userConfig: {
|
||||
home-manager.users.${cfg.user} = userConfig;
|
||||
};
|
||||
|
||||
# Package filtering with exclusion support
|
||||
filterPackages = packages:
|
||||
builtins.filter (pkg:
|
||||
let name = pkg.name or pkg.pname or "unknown";
|
||||
in !(builtins.elem name (cfg.packages.exclude or []))
|
||||
) packages;
|
||||
|
||||
# Create a standardized script with OmniXY branding
|
||||
makeScript = name: description: script: pkgs.writeShellScriptBin name ''
|
||||
#!/usr/bin/env bash
|
||||
# ${description}
|
||||
# Part of OmniXY NixOS configuration
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
${script}
|
||||
'';
|
||||
|
||||
# Standard paths for OmniXY
|
||||
paths = {
|
||||
config = "/etc/nixos";
|
||||
logs = "/var/log/omnixy";
|
||||
cache = "/var/cache/omnixy";
|
||||
runtime = "/run/omnixy";
|
||||
};
|
||||
|
||||
# Color scheme mappings (base16 colors to semantic names)
|
||||
colors = {
|
||||
# Background colors
|
||||
bg = "#1a1b26"; # Primary background
|
||||
bgAlt = "#16161e"; # Alternative background
|
||||
bgAccent = "#2f3549"; # Accent background
|
||||
|
||||
# Foreground colors
|
||||
fg = "#c0caf5"; # Primary foreground
|
||||
fgAlt = "#9aa5ce"; # Alternative foreground
|
||||
fgDim = "#545c7e"; # Dimmed foreground
|
||||
|
||||
# Accent colors (Tokyo Night defaults, can be overridden by themes)
|
||||
red = "#f7768e"; # Error/danger
|
||||
orange = "#ff9e64"; # Warning
|
||||
yellow = "#e0af68"; # Attention
|
||||
green = "#9ece6a"; # Success
|
||||
cyan = "#7dcfff"; # Info
|
||||
blue = "#7aa2f7"; # Primary accent
|
||||
purple = "#bb9af7"; # Secondary accent
|
||||
brown = "#db4b4b"; # Tertiary accent
|
||||
};
|
||||
|
||||
# Standard application categories for consistent organization
|
||||
categories = {
|
||||
system = [ "file managers" "terminals" "system monitors" ];
|
||||
development = [ "editors" "version control" "compilers" "debuggers" ];
|
||||
multimedia = [ "media players" "image viewers" "audio tools" "video editors" ];
|
||||
productivity = [ "office suites" "note taking" "calendars" "email" ];
|
||||
communication = [ "messaging" "video calls" "social media" ];
|
||||
gaming = [ "game launchers" "emulators" "performance tools" ];
|
||||
utilities = [ "calculators" "converters" "system tools" ];
|
||||
};
|
||||
|
||||
# Standard service patterns
|
||||
service = {
|
||||
# Create a basic systemd service with OmniXY defaults
|
||||
make = name: serviceConfig: {
|
||||
description = serviceConfig.description or "OmniXY ${name} service";
|
||||
wantedBy = serviceConfig.wantedBy or [ "multi-user.target" ];
|
||||
after = serviceConfig.after or [ "network.target" ];
|
||||
serviceConfig = {
|
||||
Type = serviceConfig.type or "simple";
|
||||
User = serviceConfig.user or cfg.user;
|
||||
Group = serviceConfig.group or "users";
|
||||
Restart = serviceConfig.restart or "on-failure";
|
||||
RestartSec = serviceConfig.restartSec or "5";
|
||||
} // (serviceConfig.serviceConfig or {});
|
||||
};
|
||||
|
||||
# Create a user service
|
||||
user = name: serviceConfig: {
|
||||
home-manager.users.${cfg.user}.systemd.user.services.${name} = {
|
||||
description = serviceConfig.description or "OmniXY ${name} user service";
|
||||
wantedBy = [ "default.target" ];
|
||||
after = [ "graphical-session.target" ];
|
||||
serviceConfig = {
|
||||
Type = serviceConfig.type or "simple";
|
||||
Restart = serviceConfig.restart or "on-failure";
|
||||
RestartSec = serviceConfig.restartSec or "5";
|
||||
} // (serviceConfig.serviceConfig or {});
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
195
modules/lib.nix
Normal file
195
modules/lib.nix
Normal file
@@ -0,0 +1,195 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
# Shared library module for OmniXY
|
||||
# Provides common utilities, helpers, and patterns for other modules
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.omnixy;
|
||||
|
||||
# Helper functions for common patterns
|
||||
helpers = {
|
||||
# Check if a feature is enabled, with fallback support
|
||||
isEnabled = feature: cfg.features.${feature} or false;
|
||||
|
||||
# Get user-specific paths
|
||||
userPath = path: "/home/${cfg.user}/${path}";
|
||||
configPath = path: "/home/${cfg.user}/.config/${path}";
|
||||
cachePath = path: "/home/${cfg.user}/.cache/${path}";
|
||||
|
||||
# Common color helper that works with both nix-colors and fallbacks
|
||||
getColor = colorName: fallback:
|
||||
if cfg.colorScheme != null && cfg.colorScheme ? colors && cfg.colorScheme.colors ? ${colorName}
|
||||
then "#${cfg.colorScheme.colors.${colorName}}"
|
||||
else fallback;
|
||||
|
||||
# Feature-based conditional inclusion
|
||||
withFeature = feature: content: mkIf (helpers.isEnabled feature) content;
|
||||
withoutFeature = feature: content: mkIf (!helpers.isEnabled feature) content;
|
||||
|
||||
# User-specific home-manager configuration
|
||||
forUser = userConfig: {
|
||||
home-manager.users.${cfg.user} = userConfig;
|
||||
};
|
||||
|
||||
# Package filtering with exclusion support
|
||||
filterPackages = packages:
|
||||
builtins.filter (pkg:
|
||||
let name = pkg.name or pkg.pname or "unknown";
|
||||
in !(builtins.elem name (cfg.packages.exclude or []))
|
||||
) packages;
|
||||
|
||||
# Create a standardized script with OmniXY branding
|
||||
makeScript = name: description: script: pkgs.writeShellScriptBin name ''
|
||||
#!/usr/bin/env bash
|
||||
# ${description}
|
||||
# Part of OmniXY NixOS configuration
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
${script}
|
||||
'';
|
||||
|
||||
# Standard paths for OmniXY
|
||||
paths = {
|
||||
config = "/etc/nixos";
|
||||
logs = "/var/log/omnixy";
|
||||
cache = "/var/cache/omnixy";
|
||||
runtime = "/run/omnixy";
|
||||
};
|
||||
|
||||
# Color scheme mappings (base16 colors to semantic names)
|
||||
colors = {
|
||||
# Background colors
|
||||
bg = "#1a1b26"; # Primary background
|
||||
bgAlt = "#16161e"; # Alternative background
|
||||
bgAccent = "#2f3549"; # Accent background
|
||||
|
||||
# Foreground colors
|
||||
fg = "#c0caf5"; # Primary foreground
|
||||
fgAlt = "#9aa5ce"; # Alternative foreground
|
||||
fgDim = "#545c7e"; # Dimmed foreground
|
||||
|
||||
# Accent colors (Tokyo Night defaults, can be overridden by themes)
|
||||
red = "#f7768e"; # Error/danger
|
||||
orange = "#ff9e64"; # Warning
|
||||
yellow = "#e0af68"; # Attention
|
||||
green = "#9ece6a"; # Success
|
||||
cyan = "#7dcfff"; # Info
|
||||
blue = "#7aa2f7"; # Primary accent
|
||||
purple = "#bb9af7"; # Secondary accent
|
||||
brown = "#db4b4b"; # Tertiary accent
|
||||
};
|
||||
|
||||
# Standard application categories for consistent organization
|
||||
categories = {
|
||||
system = [ "file managers" "terminals" "system monitors" ];
|
||||
development = [ "editors" "version control" "compilers" "debuggers" ];
|
||||
multimedia = [ "media players" "image viewers" "audio tools" "video editors" ];
|
||||
productivity = [ "office suites" "note taking" "calendars" "email" ];
|
||||
communication = [ "messaging" "video calls" "social media" ];
|
||||
gaming = [ "game launchers" "emulators" "performance tools" ];
|
||||
utilities = [ "calculators" "converters" "system tools" ];
|
||||
};
|
||||
|
||||
# Standard service patterns
|
||||
service = {
|
||||
# Create a basic systemd service with OmniXY defaults
|
||||
make = name: serviceConfig: {
|
||||
description = serviceConfig.description or "OmniXY ${name} service";
|
||||
wantedBy = serviceConfig.wantedBy or [ "multi-user.target" ];
|
||||
after = serviceConfig.after or [ "network.target" ];
|
||||
serviceConfig = {
|
||||
Type = serviceConfig.type or "simple";
|
||||
User = serviceConfig.user or cfg.user;
|
||||
Group = serviceConfig.group or "users";
|
||||
Restart = serviceConfig.restart or "on-failure";
|
||||
RestartSec = serviceConfig.restartSec or "5";
|
||||
} // (serviceConfig.serviceConfig or {});
|
||||
};
|
||||
|
||||
# Create a user service
|
||||
user = name: serviceConfig: {
|
||||
home-manager.users.${cfg.user}.systemd.user.services.${name} = (mkHelpers cfg).service.make name (serviceConfig // {
|
||||
wantedBy = [ "default.target" ];
|
||||
after = [ "graphical-session.target" ];
|
||||
});
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
# Export shared configuration for other modules
|
||||
config = {
|
||||
# Ensure required directories exist
|
||||
systemd.tmpfiles.rules = [
|
||||
"d ${helpers.paths.logs} 0755 root root -"
|
||||
"d ${helpers.paths.cache} 0755 root root -"
|
||||
"d ${helpers.paths.runtime} 0755 root root -"
|
||||
"d ${helpers.userPath ".local/bin"} 0755 ${cfg.user} users -"
|
||||
"d ${helpers.userPath ".local/share/omnixy"} 0755 ${cfg.user} users -"
|
||||
];
|
||||
|
||||
# Global environment variables that all modules can use
|
||||
environment.variables = {
|
||||
OMNIXY_USER = cfg.user;
|
||||
OMNIXY_THEME = cfg.theme;
|
||||
OMNIXY_PRESET = cfg.preset or "custom";
|
||||
OMNIXY_CONFIG_DIR = helpers.paths.config;
|
||||
OMNIXY_CACHE_DIR = helpers.paths.cache;
|
||||
};
|
||||
|
||||
# Standard shell aliases that work consistently across modules
|
||||
programs.bash.shellAliases = {
|
||||
# OmniXY management
|
||||
omnixy-rebuild = "sudo nixos-rebuild switch --flake ${helpers.paths.config}#omnixy";
|
||||
omnixy-build = "sudo nixos-rebuild build --flake ${helpers.paths.config}#omnixy";
|
||||
omnixy-test = "sudo nixos-rebuild test --flake ${helpers.paths.config}#omnixy";
|
||||
omnixy-update = "cd ${helpers.paths.config} && sudo nix flake update";
|
||||
omnixy-clean = "sudo nix-collect-garbage -d && nix-collect-garbage -d";
|
||||
omnixy-generations = "sudo nix-env --list-generations --profile /nix/var/nix/profiles/system";
|
||||
|
||||
# System information
|
||||
omnixy-status = "omnixy-info";
|
||||
omnixy-features = "echo 'Enabled features:' && omnixy-info | grep -A 10 'Active Features'";
|
||||
|
||||
# Quick navigation
|
||||
omnixy-config = "cd ${helpers.paths.config}";
|
||||
omnixy-logs = "cd ${helpers.paths.logs}";
|
||||
};
|
||||
|
||||
# Provide a global package for accessing OmniXY utilities
|
||||
environment.systemPackages = [
|
||||
(helpers.makeScript "omnixy-lib-test" "Test OmniXY library functions" ''
|
||||
echo "🧪 OmniXY Library Test"
|
||||
echo "===================="
|
||||
echo ""
|
||||
echo "Configuration:"
|
||||
echo " User: ${cfg.user}"
|
||||
echo " Theme: ${cfg.theme}"
|
||||
echo " Preset: ${cfg.preset or "none"}"
|
||||
echo ""
|
||||
echo "Colors (base16 scheme):"
|
||||
echo " Background: ${helpers.colors.bg}"
|
||||
echo " Foreground: ${helpers.colors.fg}"
|
||||
echo " Primary: ${helpers.colors.blue}"
|
||||
echo " Success: ${helpers.colors.green}"
|
||||
echo " Warning: ${helpers.colors.yellow}"
|
||||
echo " Error: ${helpers.colors.red}"
|
||||
echo ""
|
||||
echo "Paths:"
|
||||
echo " Config: ${helpers.paths.config}"
|
||||
echo " Logs: ${helpers.paths.logs}"
|
||||
echo " Cache: ${helpers.paths.cache}"
|
||||
echo " User home: ${helpers.userPath ""}"
|
||||
echo ""
|
||||
echo "Features:"
|
||||
${concatStringsSep "\n" (mapAttrsToList (name: enabled:
|
||||
''echo " ${name}: ${if enabled then "✅" else "❌"}"''
|
||||
) cfg.features)}
|
||||
'')
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -4,22 +4,30 @@ with lib;
|
||||
|
||||
let
|
||||
cfg = config.omnixy;
|
||||
omnixy = import ./helpers.nix { inherit config pkgs lib; };
|
||||
in
|
||||
{
|
||||
options.omnixy.packages = {
|
||||
enable = mkEnableOption "OmniXY packages";
|
||||
|
||||
exclude = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [];
|
||||
example = [ "discord" "spotify" "steam" ];
|
||||
description = "List of package names to exclude from installation";
|
||||
};
|
||||
|
||||
categories = {
|
||||
base = mkEnableOption "Base system packages" // { default = true; };
|
||||
development = mkEnableOption "Development packages" // { default = true; };
|
||||
multimedia = mkEnableOption "Multimedia packages" // { default = true; };
|
||||
productivity = mkEnableOption "Productivity packages" // { default = true; };
|
||||
gaming = mkEnableOption "Gaming packages" // { default = false; };
|
||||
development = mkEnableOption "Development packages" // { default = omnixy.isEnabled "coding"; };
|
||||
multimedia = mkEnableOption "Multimedia packages" // { default = omnixy.isEnabled "media"; };
|
||||
productivity = mkEnableOption "Productivity packages" // { default = (omnixy.isEnabled "office" || omnixy.isEnabled "communication"); };
|
||||
gaming = mkEnableOption "Gaming packages" // { default = omnixy.isEnabled "gaming"; };
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf (cfg.enable or true) {
|
||||
environment.systemPackages = with pkgs;
|
||||
environment.systemPackages = with pkgs; omnixy.filterPackages (
|
||||
# Base system packages (always installed)
|
||||
[
|
||||
# Core utilities
|
||||
@@ -66,8 +74,7 @@ in
|
||||
|
||||
# Text processing
|
||||
vim
|
||||
nano
|
||||
sed
|
||||
gnused
|
||||
gawk
|
||||
jq
|
||||
yq-go
|
||||
@@ -177,7 +184,7 @@ in
|
||||
sqlite
|
||||
redis
|
||||
mongodb-tools
|
||||
dbeaver
|
||||
dbeaver-bin
|
||||
|
||||
# API testing
|
||||
httpie
|
||||
@@ -207,7 +214,6 @@ in
|
||||
easyeffects
|
||||
spotify
|
||||
spotifyd
|
||||
spotify-tui
|
||||
cmus
|
||||
mpd
|
||||
ncmpcpp
|
||||
@@ -216,7 +222,7 @@ in
|
||||
mpv
|
||||
vlc
|
||||
obs-studio
|
||||
kdenlive
|
||||
kdePackages.kdenlive
|
||||
handbrake
|
||||
ffmpeg-full
|
||||
|
||||
@@ -239,7 +245,7 @@ in
|
||||
# PDF
|
||||
zathura
|
||||
evince
|
||||
okular
|
||||
kdePackages.okular
|
||||
mupdf
|
||||
]
|
||||
|
||||
@@ -258,7 +264,7 @@ in
|
||||
signal-desktop
|
||||
element-desktop
|
||||
zoom-us
|
||||
teams
|
||||
# teams not available on x86_64-linux
|
||||
|
||||
# Office
|
||||
libreoffice
|
||||
@@ -304,29 +310,26 @@ in
|
||||
gamemode
|
||||
discord
|
||||
obs-studio
|
||||
];
|
||||
]
|
||||
); # End of filterPackages
|
||||
|
||||
# Font packages
|
||||
fonts.packages = with pkgs; [
|
||||
# Nerd fonts (for icons in terminal)
|
||||
(nerdfonts.override {
|
||||
fonts = [
|
||||
"JetBrainsMono"
|
||||
"FiraCode"
|
||||
"Hack"
|
||||
"Iosevka"
|
||||
"Meslo"
|
||||
"SourceCodePro"
|
||||
"UbuntuMono"
|
||||
"DroidSansMono"
|
||||
"RobotoMono"
|
||||
"Inconsolata"
|
||||
];
|
||||
})
|
||||
nerd-fonts.jetbrains-mono
|
||||
nerd-fonts.fira-code
|
||||
nerd-fonts.hack
|
||||
nerd-fonts.iosevka
|
||||
nerd-fonts.meslo-lg
|
||||
nerd-fonts.sauce-code-pro
|
||||
nerd-fonts.ubuntu-mono
|
||||
nerd-fonts.droid-sans-mono
|
||||
nerd-fonts.roboto-mono
|
||||
nerd-fonts.inconsolata
|
||||
|
||||
# System fonts
|
||||
noto-fonts
|
||||
noto-fonts-cjk
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-emoji
|
||||
liberation_ttf
|
||||
ubuntu_font_family
|
||||
|
||||
@@ -6,21 +6,30 @@ let
|
||||
cfg = config.omnixy;
|
||||
in
|
||||
{
|
||||
# XDG Desktop Portals (required for Flatpak)
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
extraPortals = with pkgs; [
|
||||
xdg-desktop-portal-hyprland
|
||||
xdg-desktop-portal-gtk
|
||||
];
|
||||
config.common.default = "*";
|
||||
};
|
||||
|
||||
# Tuigreet display manager (following omarchy-nix pattern)
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
settings.default_session.command = "${pkgs.tuigreet}/bin/tuigreet --time --cmd Hyprland";
|
||||
};
|
||||
|
||||
# System services configuration
|
||||
services = {
|
||||
# Display server
|
||||
xserver = {
|
||||
enable = true;
|
||||
|
||||
# Display Manager
|
||||
displayManager = {
|
||||
gdm = {
|
||||
enable = true;
|
||||
wayland = true;
|
||||
};
|
||||
|
||||
defaultSession = "hyprland";
|
||||
};
|
||||
# Display Manager disabled - using greetd instead
|
||||
displayManager.gdm.enable = false;
|
||||
|
||||
# Touchpad support
|
||||
libinput = {
|
||||
@@ -52,14 +61,6 @@ in
|
||||
];
|
||||
};
|
||||
|
||||
# Scanner support
|
||||
sane = {
|
||||
enable = true;
|
||||
extraBackends = with pkgs; [
|
||||
sane-airscan
|
||||
epkowa
|
||||
];
|
||||
};
|
||||
|
||||
# Sound
|
||||
pipewire = {
|
||||
@@ -110,7 +111,6 @@ in
|
||||
enable = true;
|
||||
interval = "daily";
|
||||
package = pkgs.plocate;
|
||||
localuser = null;
|
||||
};
|
||||
|
||||
# Backup service (optional)
|
||||
|
||||
@@ -1,38 +1,17 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
{ config, pkgs, lib, inputs, ... }:
|
||||
|
||||
{
|
||||
# Tokyo Night theme configuration
|
||||
config = {
|
||||
# Color palette
|
||||
environment.variables = {
|
||||
OMNIXY_THEME = "tokyo-night";
|
||||
OMNIXY_THEME_BG = "#1a1b26";
|
||||
OMNIXY_THEME_FG = "#c0caf5";
|
||||
OMNIXY_THEME_ACCENT = "#7aa2f7";
|
||||
};
|
||||
let
|
||||
cfg = config.omnixy;
|
||||
|
||||
# Home-manager theme configuration
|
||||
home-manager.users.${config.omnixy.user or "user"} = {
|
||||
# Alacritty theme
|
||||
programs.alacritty.settings.colors = {
|
||||
primary = {
|
||||
background = "#1a1b26";
|
||||
foreground = "#c0caf5";
|
||||
};
|
||||
# Use nix-colors if available and configured, otherwise fallback to manual colors
|
||||
useNixColors = cfg.colorScheme != null;
|
||||
colorScheme = cfg.colorScheme;
|
||||
|
||||
normal = {
|
||||
black = "#15161e";
|
||||
red = "#f7768e";
|
||||
green = "#9ece6a";
|
||||
yellow = "#e0af68";
|
||||
blue = "#7aa2f7";
|
||||
magenta = "#bb9af7";
|
||||
cyan = "#7dcfff";
|
||||
white = "#a9b1d6";
|
||||
};
|
||||
|
||||
bright = {
|
||||
black = "#414868";
|
||||
# Manual Tokyo Night colors as fallback
|
||||
manualColors = {
|
||||
bg = "#1a1b26";
|
||||
fg = "#c0caf5";
|
||||
accent = "#7aa2f7";
|
||||
red = "#f7768e";
|
||||
green = "#9ece6a";
|
||||
yellow = "#e0af68";
|
||||
@@ -40,11 +19,61 @@
|
||||
magenta = "#bb9af7";
|
||||
cyan = "#7dcfff";
|
||||
white = "#c0caf5";
|
||||
black = "#15161e";
|
||||
};
|
||||
|
||||
# Helper function to get color from scheme or fallback
|
||||
getColor = name: fallback:
|
||||
if useNixColors && colorScheme ? colors && colorScheme.colors ? ${name}
|
||||
then "#${colorScheme.colors.${name}}"
|
||||
else fallback;
|
||||
|
||||
in
|
||||
{
|
||||
# Tokyo Night theme configuration
|
||||
config = {
|
||||
# Color palette - use nix-colors if available
|
||||
environment.variables = {
|
||||
OMNIXY_THEME = "tokyo-night";
|
||||
OMNIXY_THEME_BG = getColor "base00" manualColors.bg;
|
||||
OMNIXY_THEME_FG = getColor "base05" manualColors.fg;
|
||||
OMNIXY_THEME_ACCENT = getColor "base0D" manualColors.accent;
|
||||
};
|
||||
|
||||
# Home-manager theme configuration
|
||||
home-manager.users.${config.omnixy.user or "user"} = {
|
||||
# Alacritty theme - dynamic colors based on nix-colors or fallback
|
||||
programs.alacritty.settings.colors = {
|
||||
primary = {
|
||||
background = getColor "base00" manualColors.bg;
|
||||
foreground = getColor "base05" manualColors.fg;
|
||||
};
|
||||
|
||||
normal = {
|
||||
black = getColor "base00" manualColors.black;
|
||||
red = getColor "base08" manualColors.red;
|
||||
green = getColor "base0B" manualColors.green;
|
||||
yellow = getColor "base0A" manualColors.yellow;
|
||||
blue = getColor "base0D" manualColors.blue;
|
||||
magenta = getColor "base0E" manualColors.magenta;
|
||||
cyan = getColor "base0C" manualColors.cyan;
|
||||
white = getColor "base05" manualColors.white;
|
||||
};
|
||||
|
||||
bright = {
|
||||
black = getColor "base03" "#414868";
|
||||
red = getColor "base08" manualColors.red;
|
||||
green = getColor "base0B" manualColors.green;
|
||||
yellow = getColor "base0A" manualColors.yellow;
|
||||
blue = getColor "base0D" manualColors.blue;
|
||||
magenta = getColor "base0E" manualColors.magenta;
|
||||
cyan = getColor "base0C" manualColors.cyan;
|
||||
white = getColor "base07" manualColors.fg;
|
||||
};
|
||||
|
||||
indexed_colors = [
|
||||
{ index = 16; color = "#ff9e64"; }
|
||||
{ index = 17; color = "#db4b4b"; }
|
||||
{ index = 16; color = getColor "base09" "#ff9e64"; }
|
||||
{ index = 17; color = getColor "base0F" "#db4b4b"; }
|
||||
];
|
||||
};
|
||||
|
||||
@@ -250,7 +279,8 @@
|
||||
(writeShellScriptBin "set-wallpaper" ''
|
||||
#!/usr/bin/env bash
|
||||
# Set Tokyo Night themed wallpaper
|
||||
swww img ${./wallpapers/tokyo-night.jpg} --transition-type wipe --transition-angle 30 --transition-step 90
|
||||
echo "Wallpaper functionality disabled - add wallpaper manually with swww"
|
||||
echo "Usage: swww img /path/to/wallpaper.jpg --transition-type wipe --transition-angle 30"
|
||||
'')
|
||||
];
|
||||
};
|
||||
|
||||
@@ -63,15 +63,14 @@ in
|
||||
# User environment
|
||||
environment.systemPackages = with pkgs; [
|
||||
# User management tools
|
||||
shadow
|
||||
passwd
|
||||
shadow # provides passwd, useradd, etc.
|
||||
|
||||
# Session management
|
||||
loginctl
|
||||
systemd # provides loginctl
|
||||
|
||||
# User info
|
||||
finger_bsd
|
||||
id-utils
|
||||
idutils
|
||||
];
|
||||
|
||||
# User-specific services
|
||||
|
||||
Reference in New Issue
Block a user