feat(modules): users, scripts, menus, fastfetch, walker, cache, colors, bootstrap
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
2289f91048
commit
b16707b2ab
9 changed files with 2521 additions and 0 deletions
221
modules/fastfetch.nix
Normal file
221
modules/fastfetch.nix
Normal file
|
|
@ -0,0 +1,221 @@
|
|||
{
|
||||
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: ${cfg.preset or "custom"}"
|
||||
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 = ''
|
||||
|
||||
███████╗███╗ ███╗███╗ ██╗██╗██╗ ██╗██╗ ██╗
|
||||
██╔════╝████╗ ████║████╗ ██║██║╚██╗██╔╝╚██╗ ██╔╝
|
||||
██║ ██╔████╔██║██╔██╗ ██║██║ ╚███╔╝ ╚████╔╝
|
||||
██║ ██║╚██╔╝██║██║╚██╗██║██║ ██╔██╗ ╚██╔╝
|
||||
███████╗██║ ╚═╝ ██║██║ ╚████║██║██╔╝ ██╗ ██║
|
||||
╚══════╝╚═╝ ╚═╝╚═╝ ╚═══╝╚═╝╚═╝ ╚═╝ ╚═╝
|
||||
|
||||
Declarative NixOS Configuration
|
||||
'';
|
||||
|
||||
environment.etc."omni/branding/about.txt".text = ''
|
||||
╭─────────────────────────────────────────────────────╮
|
||||
│ │
|
||||
│ ██████╗ ███╗ ███╗███╗ ██╗██╗██╗ ██╗██╗ ██╗│
|
||||
│ ██╔═══██╗████╗ ████║████╗ ██║██║╚██╗██╔╝╚██╗ ██╔╝│
|
||||
│ ██║ ██║██╔████╔██║██╔██╗ ██║██║ ╚███╔╝ ╚████╔╝ │
|
||||
│ ██║ ██║██║╚██╔╝██║██║╚██╗██║██║ ██╔██╗ ╚██╔╝ │
|
||||
│ ╚██████╔╝██║ ╚═╝ ██║██║ ╚████║██║██╔╝ ██╗ ██║ │
|
||||
│ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═══╝╚═╝╚═╝ ╚═╝ ╚═╝ │
|
||||
│ │
|
||||
│ 🚀 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: ${cfg.preset or "custom"}",
|
||||
"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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue