From d8a08d42a3373400ae8864d0b09572fceb1fae01 Mon Sep 17 00:00:00 2001 From: Tomas Rivera <137088692+Totorile1@users.noreply.github.com> Date: Wed, 25 Feb 2026 20:37:35 +0100 Subject: [PATCH] finished fastfetch module --- hosts/laptop/configuration.nix | 4 - hosts/laptop/home.nix | 1 + modules/home-manager/fastfetch.nix | 265 +++++++++++++++++------------ 3 files changed, 157 insertions(+), 113 deletions(-) diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index cec3905..29179e0 100755 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -111,10 +111,6 @@ environment.systemPackages = with pkgs; [ neovim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. wget - warpinator # used to send files via Lan between Linux systems - #zoxide # better cd moved into home-manager - fastfetch - #git #enabled in home-manager tree # shows dir in tree zsh # better bash ]; diff --git a/hosts/laptop/home.nix b/hosts/laptop/home.nix index b318463..c584619 100755 --- a/hosts/laptop/home.nix +++ b/hosts/laptop/home.nix @@ -9,6 +9,7 @@ imports = [ ../../modules/home-manager/zsh.nix # better bash ../../modules/home-manager/git.nix ../../modules/home-manager/ssh.nix +../../modules/home-manager/fastfetch.nix ]; diff --git a/modules/home-manager/fastfetch.nix b/modules/home-manager/fastfetch.nix index c7fe96b..4909566 100644 --- a/modules/home-manager/fastfetch.nix +++ b/modules/home-manager/fastfetch.nix @@ -1,130 +1,177 @@ { config, pkgs, ... }: -# Adapted from https://github.com/dacrab/fastfetch-config/blob/main/config.jsonc + { +# Adapted from https://github.com/dacrab/fastfetch-config/blob/main/config.jsonc programs.fastfetch = { enable = true; - settings = {"logo": {"type":"nixos_small"}, - "modules": [ + + settings = { + logo = { + type = "none"; + #source = "nixos"; + }; + + modules = [ + + # ───────────── Hardware ───────────── + { - "type": "custom", - "format": "╭───────────────────────── Hardware ──────────────────────────╮", - "outputColor": "blue" - }, + type = "custom"; + format = "╭───────────────────────── Hardware ──────────────────────────╮"; + outputColor = "blue"; + } + { - "type": "title", - "key": " PC", - "keyColor": "green" - }, -{ - "key": "│ ├󰇅 Laptop", - "keyColor": "green", - "type": "host" - }, -{ - "key": "│ ├󰍹 Display", - "keyColor": "green", - "type": "display" - }, + type = "title"; + key = " PC"; + keyColor = "green"; + } + { - "type": "cpu", - "key": "│ ├󰍛 CPU", - "showPeCoreCount": true, - "format": "{1}", - "keyColor": "green" - }, + type = "host"; + key = "│ ├󰇅 Laptop"; + keyColor = "green"; + } + { - "type": "gpu", - "key": "│ ├󰍛 GPU", - "keyColor": "green" - }, + type = "display"; + key = "│ ├󰍹 Display"; + keyColor = "green"; + } + { - "type": "memory", - "key": "└ └󰍛 Memory", - "keyColor": "green" - }, + type = "cpu"; + key = "│ ├󰍛 CPU"; + showPeCoreCount = true; + format = "{1}"; + keyColor = "green"; + } + { - "type": "custom", - "format": "╰─────────────────────────────────────────────────────────────╯", - "outputColor": "blue" - }, + type = "gpu"; + key = "│ ├󰍛 GPU"; + keyColor = "green"; + } + { - "type": "custom", - "format": "╭───────────────────────── Software ──────────────────────────╮", - "outputColor": "blue" - }, + type = "memory"; + key = "└ └󰍛 Memory"; + keyColor = "green"; + } + { - "type": "os", - "key": " OS ", - "keyColor": "cyan" - }, + type = "custom"; + format = "╰─────────────────────────────────────────────────────────────╯"; + outputColor = "blue"; + } + + # ───────────── Software ───────────── + { - "type": "kernel", - "key": "│ ├ Kernel", - "keyColor": "cyan" - }, + type = "custom"; + format = "╭───────────────────────── Software ──────────────────────────╮"; + outputColor = "blue"; + } + { - "type": "packages", - "key": "│ ├󰏖 Packages", - "keyColor": "cyan" - }, + type = "os"; + key = " OS"; + keyColor = "cyan"; + } + { - "type": "shell", - "key": "│ ├ Shell", - "keyColor": "cyan" - }, -{ - "key": "│ ├ Terminal", - "keyColor": "cyan", - "type": "terminal" - }, + type = "kernel"; + key = "│ ├ Kernel"; + keyColor = "cyan"; + } + { - "type": "command", - "key": "│ ├ OS Age", - "keyColor": "cyan", - "text": "birth_install=$(stat -c %W /); current=$(date +%s); time_progression=$((current - birth_install)); days_difference=$((time_progression / 86400)); echo $days_difference days" - }, + type = "packages"; + key = "│ ├󰏖 Packages"; + keyColor = "cyan"; + } + { - "type": "uptime", - "key": "└ └ Uptime", - "keyColor": "cyan" - }, + type = "shell"; + key = "│ ├ Shell"; + keyColor = "cyan"; + } + { - "type": "de", - "key": " DE", - "keyColor": "blue" - }, + type = "terminal"; + key = "│ ├ Terminal"; + keyColor = "cyan"; + } + + { + type = "command"; + key = "│ ├ OS Age"; + keyColor = "cyan"; + text = '' + birth_install=$(stat -c %W /) + current=$(date +%s) + time_progression=$((current - birth_install)) + days_difference=$((time_progression / 86400)) + echo $days_difference days + ''; + } + + { + type = "uptime"; + key = "└ └ Uptime"; + keyColor = "cyan"; + } + + { + type = "de"; + key = " DE"; + keyColor = "blue"; + } + + { + type = "wm"; + key = " WM"; + keyColor = "magenta"; + } + + { + type = "gpu"; + key = "│ ├󰍛 GPU Driver"; + format = "{3}"; + keyColor = "magenta"; + } + + { + type = "brightness"; + key = "│ ├󰃟 Brightness"; + keyColor = "magenta"; + } + + { + type = "version"; + key = "└ └ FastFetch"; + keyColor = "magenta"; + } + + { + type = "custom"; + format = "╰────────────────────────────────────────────────────────────╯"; + outputColor = "blue"; + } + + #{ + # type = "custom"; + # format = '' + # {#0} {#1} {#2} {#3} {#4} {#5} {#6} {#7} + # ''; + #} #for some reason dont work { - "type": "wm", - "key": " WM", - "keyColor": "magenta" - }, - { - "type": "gpu", - "key": "│ ├󰍛 GPU Driver", - "format": "{3}", - "keyColor": "magenta" - }, -{ - "key": "│ ├󰃟 Brightness ", - "keyColor": "magenta", - "type": "brightness" - }, - { - "type": "version", - "key": "└ └ FastFetch", - "keyColor": "magenta" - }, - { - "type": "custom", - "format": "╰────────────────────────────────────────────────────────────╯", - "outputColor": "blue" - }, - { - "type": "custom", - "format": " \u001b[90m \u001b[31m \u001b[32m \u001b[33m \u001b[34m \u001b[35m \u001b[36m \u001b[37m " - }, + type = "colors"; + symbol = "diamond"; + } + "break" - ] -} -}; + ]; + }; + }; }