omnixient/modules/fastfetch.nix
Padreug 78fb9b4b30 rebrand: fix upstream attribution in README + Omnixient wordmark
The mechanical omnixy->omni pass mangled README lines that refer to the
*upstream* OmniXY project (restored to OmniXY/omnixy), and replaced the
block-letter OMNIXY fastfetch logo with a clean Omnixient wordmark.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 11:23:49 +02:00

210 lines
6 KiB
Nix

{
config,
pkgs,
lib,
...
}:
# Fastfetch system information display for Omnixient
# Beautiful system information with Omnixient branding
let
inherit (lib) mkIf;
cfg = config.omni;
omni = config.omni.lib;
in
{
config = mkIf (cfg.enable or true) {
# Add fastfetch and convenience scripts to system packages
environment.systemPackages =
(with pkgs; [
fastfetch
])
++ [
# Convenience scripts
(omni.makeScript "omni-info" "Show Omnixient system information" ''
fastfetch --config /etc/omni/fastfetch/config.jsonc
'')
(omni.makeScript "omni-about" "Show Omnixient about screen" ''
clear
cat /etc/omni/branding/about.txt
echo
echo "Theme: ${cfg.theme}"
echo "Preset: ${if cfg.preset == null then "custom" else cfg.preset}"
echo "User: ${cfg.user}"
echo "NixOS Version: $(nixos-version)"
echo
echo "Visit: https://github.com/TheArctesian/omnixy"
'')
];
# Create Omnixient branding directory
environment.etc."omni/branding/logo.txt".text = ''
omnixient
Declarative NixOS Configuration
'';
environment.etc."omni/branding/about.txt".text = ''
omnixient
🚀 Declarative 🎨 Beautiful Fast
'';
# Create fastfetch configuration
environment.etc."omni/fastfetch/config.jsonc".text = ''
{
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
"logo": {
"type": "file",
"source": "/etc/omni/branding/about.txt",
"color": {
"1": "cyan",
"2": "blue"
},
"padding": {
"top": 1,
"right": 4,
"left": 2
}
},
"modules": [
"break",
{
"type": "custom",
"format": "\u001b[90m Hardware "
},
{
"type": "host",
"key": " 󰌢 Host",
"keyColor": "cyan"
},
{
"type": "cpu",
"key": " 󰻠 CPU",
"keyColor": "cyan"
},
{
"type": "gpu",
"key": " 󰍛 GPU",
"keyColor": "cyan"
},
{
"type": "memory",
"key": " 󰍛 Memory",
"keyColor": "cyan"
},
{
"type": "disk",
"key": " 󰋊 Disk (/)",
"keyColor": "cyan"
},
{
"type": "custom",
"format": "\u001b[90m Software "
},
{
"type": "os",
"key": " 󰣇 OS",
"keyColor": "blue"
},
{
"type": "kernel",
"key": " 󰌽 Kernel",
"keyColor": "blue"
},
{
"type": "de",
"key": " 󰧨 DE",
"keyColor": "blue"
},
{
"type": "wm",
"key": " 󰖸 WM",
"keyColor": "blue"
},
{
"type": "wmtheme",
"key": " 󰏘 Theme",
"keyColor": "blue"
},
{
"type": "shell",
"key": " 󰆍 Shell",
"keyColor": "blue"
},
{
"type": "terminal",
"key": " 󰆍 Terminal",
"keyColor": "blue"
},
{
"type": "custom",
"format": "\u001b[90m Omnixient "
},
{
"type": "custom",
"format": " 󰣇 Theme: ${cfg.theme}",
"keyColor": "magenta"
},
{
"type": "custom",
"format": " 󰣇 Preset: ${if cfg.preset == null then "custom" else cfg.preset}",
"keyColor": "magenta"
},
{
"type": "custom",
"format": " 󰣇 User: ${cfg.user}",
"keyColor": "magenta"
},
{
"type": "packages",
"key": " 󰏖 Packages",
"keyColor": "magenta"
},
{
"type": "custom",
"format": "\u001b[90m"
},
"break"
]
}
'';
# Convenience scripts are now consolidated above
# Add to user environment
home-manager.users.${config.omni.user} = {
# Set XDG config dir for fastfetch
xdg.configFile."fastfetch/config.jsonc".source =
config.environment.etc."omni/fastfetch/config.jsonc".source;
# Add shell aliases
programs.bash.shellAliases = {
neofetch = "omni-info";
screenfetch = "omni-info";
sysinfo = "omni-info";
about = "omni-about";
};
programs.zsh.shellAliases = {
neofetch = "omni-info";
screenfetch = "omni-info";
sysinfo = "omni-info";
about = "omni-about";
};
programs.fish.shellAliases = {
neofetch = "omni-info";
screenfetch = "omni-info";
sysinfo = "omni-info";
about = "omni-about";
};
};
};
}