Commit 1423cf2

HPCesia <me@hpcesia.com>
2025-10-01 17:17:03
refactor: migrate fastfech
1 parent de5be77
Changed files (6)
home
hosts
chaser-kevin
modules
core
hosts
os-modules
home/base/tui/fastfetch.nix
@@ -1,32 +0,0 @@
-{...}: {
-  programs.fastfetch = {
-    enable = true;
-    settings = {
-      modules = [
-        "title"
-        "separator"
-        "os"
-        "host"
-        "kernel"
-        "uptime"
-        "shell"
-        "display"
-        "de"
-        "wm"
-        "font"
-        "terminal"
-        "cpu"
-        "gpu"
-        "memory"
-        "swap"
-        "disk"
-        "localip"
-        "battery"
-        "poweradapter"
-        "locale"
-        "break"
-        "colors"
-      ];
-    };
-  };
-}
hosts/chaser-kevin/home.nix
@@ -60,11 +60,4 @@
       }
     ];
   };
-
-  programs.fastfetch.settings.logo = {
-    type = "kitty-direct";
-    source = "${nixos-logo}/nixos-griseo.png";
-    height = 15;
-    width = 32;
-  };
 }
modules/core/tools/fastfetch.nix
@@ -0,0 +1,37 @@
+{
+  flake.modules.nixos.core = {pkgs, ...}: {
+    environment.systemPackages = [pkgs.fastfetch];
+  };
+  flake.modules.homeManager.core = _: {
+    programs.fastfetch = {
+      enable = true;
+      settings = {
+        modules = [
+          "title"
+          "separator"
+          "os"
+          "host"
+          "kernel"
+          "uptime"
+          "shell"
+          "display"
+          "de"
+          "wm"
+          "font"
+          "terminal"
+          "cpu"
+          "gpu"
+          "memory"
+          "swap"
+          "disk"
+          "localip"
+          "battery"
+          "poweradapter"
+          "locale"
+          "break"
+          "colors"
+        ];
+      };
+    };
+  };
+}
modules/hosts/chaser-kevin/default.nix
@@ -32,6 +32,7 @@
                 dev
                 user-hpcesia
               ])
+              ++ [config.flake.modules.homeManager."hosts/kevin"]
               # TODO: remove below after migrated all config to Dendritic Pattern
               ++ (map (lib.path.append config.flake.meta.rootPath) [
                 "home/linux/gui.nix"
modules/hosts/chaser-kevin/home.nix
@@ -0,0 +1,14 @@
+{
+  inputs,
+  lib,
+  ...
+}: {
+  flake.modules.homeManager."hosts/kevin" = {config, ...}: {
+    programs.fastfetch.settings.logo = lib.mkIf config.programs.fastfetch.enable {
+      type = "kitty-direct";
+      source = "${inputs.nixos-logo}/nixos-griseo.png";
+      height = 15;
+      width = 32;
+    };
+  };
+}
os-modules/base/system-packages.nix
@@ -4,7 +4,6 @@
   ...
 }: {
   environment.systemPackages = with pkgs; [
-    fastfetch
     nushell
 
     tree