current
1{
2 inputs,
3 lib,
4 den,
5 ...
6}: {
7 flake-file.inputs.nixos-logo = {
8 url = "git+https://repo.hpcesia.com/HPCesia/nixos-logo?shallow=1";
9 flake = false;
10 };
11
12 den.default.includes = [den.aspects.core._.tools._.fastfetch];
13 den.default.homeManager = {
14 programs.fastfetch = {
15 enable = true;
16 settings = {
17 display.separator = " ";
18 modules = [
19 "title"
20 {
21 key = "╔══ Software ══╗";
22 type = "custom";
23 }
24 {
25 key = "║ {#31}{icon} Distro {#keys}║";
26 type = "os";
27 format = "{?pretty-name}{pretty-name}{?}{/pretty-name}{name}{/} {#2}[{arch}]";
28 }
29 {
30 key = "║ {#31} Kernel {#keys}║";
31 type = "kernel";
32 format = "{sysname} {#2}[v{release}]";
33 }
34 {
35 key = "║ {#31} Packages {#keys}║";
36 type = "packages";
37 format = "{all}";
38 }
39 {
40 key = "║ {#31} Uptime {#keys}║";
41 type = "uptime";
42 format = "{?days}{days} Days + {?}{hours}:{minutes}:{seconds}";
43 }
44 {
45 key = "║ {#32} WM {#keys}║";
46 type = "wm";
47 format = "{pretty-name} {#2}[v{version}] ({protocol-name})";
48 }
49 {
50 key = "║ {#32} Terminal {#keys}║";
51 type = "terminal";
52 format = "{pretty-name} {#2}[v{version}]";
53 }
54 {
55 key = "║ {#32} Shell {#keys}║";
56 type = "shell";
57 format = "{pretty-name} {#2}[v{version}]";
58 }
59 {
60 key = "╠══ Hardware ══╣";
61 type = "custom";
62 }
63 {
64 key = "║ {#33} Machine {#keys}║";
65 type = "host";
66 format = "{name} {#2}{version}";
67 }
68 {
69 key = "║ {#33} CPU {#keys}║";
70 type = "cpu";
71 format = "{name} {#2}[{freq-max}]";
72 }
73 {
74 key = "║ {#33} GPU {#keys}║";
75 type = "gpu";
76 detectionMethod = "auto";
77 format = "{name} {#2}[{type}]";
78 }
79 {
80 key = "║ {#33} Memory {#keys}║";
81 type = "memory";
82 format = "{used} / {total} ({percentage})";
83 }
84 {
85 key = "║ {#33} Swap {#keys}║";
86 type = "swap";
87 format = "{used} / {total} ({percentage})";
88 }
89 {
90 key = "║ {#33} Disk {#keys}║";
91 type = "disk";
92 format = "{size-used} / {size-total} ({size-percentage}) {#2}[{filesystem}]";
93 }
94 {
95 key = "╠══════════════╣";
96 type = "custom";
97 }
98 {
99 key = "║ {#34} Colors {#keys}║";
100 type = "colors";
101 symbol = "circle";
102 }
103 {
104 key = "╚══════════════╝";
105 type = "custom";
106 }
107 ];
108 };
109 };
110 };
111
112 den.aspects.core.provides.tools.provides.fastfetch = {
113 host,
114 user,
115 ...
116 }: let
117 listHas = l: e: (lib.lists.findFirstIndex (x: x == e) null l) != null;
118 isGraphic = listHas ["desktop" "laptop"] host.usage;
119 isHm = listHas user.classes "homeManager";
120 in {
121 homeManager.programs.fastfetch.settings.logo = lib.mkIf isHm (
122 if isGraphic
123 then {
124 type = "kitty-direct";
125 source = "${inputs.nixos-logo}/nixos-griseo.png";
126 width = 28;
127 height = 14;
128 }
129 else {type = "auto";}
130 );
131 };
132}