diff --git a/hosts/adrastea/default.nix b/hosts/adrastea/default.nix index b1f2133..f4b2cc3 100644 --- a/hosts/adrastea/default.nix +++ b/hosts/adrastea/default.nix @@ -34,7 +34,7 @@ ../../users/youwen/linux/programs ../../users/youwen/common ../../users/youwen/linux/spicetify - ../../users/youwen/common/fastfetch + (import ../../users/youwen/common/fastfetch { }) ] ++ (with inputs; [ nix-index-database.hmModules.nix-index diff --git a/hosts/callisto/default.nix b/hosts/callisto/default.nix index 8dde8f4..50d9d12 100644 --- a/hosts/callisto/default.nix +++ b/hosts/callisto/default.nix @@ -30,7 +30,7 @@ ../../users/youwen/common ../../users/youwen/linux/laptop ../../users/youwen/linux/packages/aarch-64 - ../../users/youwen/common/fastfetch + (import ../../users/youwen/common/fastfetch { }) ./home-manager-extras ] ++ (with inputs; [ diff --git a/hosts/cassini/default.nix b/hosts/cassini/default.nix index 7630b1f..a359f9a 100644 --- a/hosts/cassini/default.nix +++ b/hosts/cassini/default.nix @@ -24,7 +24,7 @@ ../../users/youwen/common ../../users/youwen/linux/theming ../../users/youwen/linux/home.nix - ../../users/youwen/common/fastfetch + (import ../../users/youwen/common/fastfetch { kitty = false; }) ] ++ (with inputs; [ nix-index-database.hmModules.nix-index diff --git a/hosts/demeter/default.nix b/hosts/demeter/default.nix index 4c6c95f..83743eb 100644 --- a/hosts/demeter/default.nix +++ b/hosts/demeter/default.nix @@ -31,7 +31,7 @@ ../../users/youwen/linux/laptop ../../users/youwen/linux/packages/x86_64 ../../users/youwen/linux/programs - ../../users/youwen/common/fastfetch + (import ../../users/youwen/common/fastfetch { }) ../../users/youwen/common ../../users/youwen/linux/spicetify ./home-manager-extras diff --git a/users/youwen/common/fastfetch/config.jsonc b/users/youwen/common/fastfetch/config.json similarity index 65% rename from users/youwen/common/fastfetch/config.jsonc rename to users/youwen/common/fastfetch/config.json index 37b18eb..d0161da 100644 --- a/users/youwen/common/fastfetch/config.jsonc +++ b/users/youwen/common/fastfetch/config.json @@ -1,10 +1,3 @@ -// _____ _____ _____ _____ _____ _____ _____ _____ _____ -// | __| _ | __|_ _| __| __|_ _| | | | -// | __| |__ | | | | __| __| | | | --| | -// |__| |__|__|_____| |_| |__| |_____| |_| |_____|__|__| HYPRLAND -// -// by Bina - { "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", "logo": { @@ -12,11 +5,11 @@ "type": "kitty", "height": 18, "padding": { - "top": 2, - }, + "top": 2 + } }, "display": { - "separator": " ", + "separator": " " }, "modules": [ "break", @@ -26,71 +19,71 @@ "break", { "type": "title", - "keyWidth": 10, + "keyWidth": 10 }, "break", { "type": "os", "key": " ", - "keyColor": "34", // = color4 - "format": "{3} on {12}", + "keyColor": "34", + "format": "{3} on {12}" }, { "type": "kernel", "key": " ", - "keyColor": "34", + "keyColor": "34" }, { "type": "packages", "key": " ", - "keyColor": "34", + "keyColor": "34" }, { "type": "shell", "key": " ", - "keyColor": "34", + "keyColor": "34" }, { "type": "terminal", "key": " ", - "keyColor": "34", + "keyColor": "34" }, { "type": "wm", "key": " ", - "keyColor": "34", + "keyColor": "34" }, { "type": "CPU", "key": " ", - "keyColor": "34", + "keyColor": "34" }, { "type": "GPU", "key": "󰍹 ", - "keyColor": "34", + "keyColor": "34" }, { "type": "uptime", "key": " ", - "keyColor": "34", + "keyColor": "34" }, { "type": "media", "key": "󰝚 ", - "keyColor": "34", + "keyColor": "34" }, { "type": "player", "key": " ", - "keyColor": "34", + "keyColor": "34" }, "break", { "type": "custom", - "format": "\u001b[90m \u001b[31m \u001b[32m \u001b[33m \u001b[34m \u001b[35m \u001b[36m \u001b[37m ", + "format": "\u001b[90m \u001b[31m \u001b[32m \u001b[33m \u001b[34m \u001b[35m \u001b[36m \u001b[37m " }, "break", - "break", - ], + "break" + ] } diff --git a/users/youwen/common/fastfetch/default.nix b/users/youwen/common/fastfetch/default.nix index 1fa86b2..f23e519 100644 --- a/users/youwen/common/fastfetch/default.nix +++ b/users/youwen/common/fastfetch/default.nix @@ -1,8 +1,20 @@ -{ pkgs, ... }: { - home.file.".config/fastfetch/config.jsonc".source = ./config.jsonc; - home.file.".local/share/fastfetch/images/nixos-logo.png".source = ./nixos-logo.png; + kitty ? true, +}: +{ config, ... }: +let + fastfetchConfig = builtins.fromJSON (builtins.readFile ./config.json); +in +{ + # home.file.".config/fastfetch/config.jsonc".source = ./config.jsonc; programs.fastfetch = { enable = true; + settings = ( + fastfetchConfig + // { + logo.type = if kitty == "cassini" then "auto" else "kitty"; + logo.source = ./nixos-logo.png; + } + ); }; }