mirror of
https://github.com/youwen5/nixos.git
synced 2025-01-18 21:22:10 -08:00
40 lines
954 B
Nix
40 lines
954 B
Nix
|
{ config, lib, ... }:
|
||
|
let
|
||
|
fastfetchConfig = builtins.fromJSON (builtins.readFile ./config.json);
|
||
|
cfg = config.liminalOS.shellEnv.fastfetch;
|
||
|
in
|
||
|
{
|
||
|
options.liminalOS.shellEnv.fastfetch = {
|
||
|
enable = lib.mkOption {
|
||
|
type = lib.types.bool;
|
||
|
default = config.liminalOS.shellEnv.enable;
|
||
|
description = ''
|
||
|
Whether to set up and configure fastfetch.
|
||
|
'';
|
||
|
};
|
||
|
useKittyImage = lib.mkOption {
|
||
|
type = lib.types.bool;
|
||
|
default = cfg.enable;
|
||
|
description = ''
|
||
|
Whether to use the kitty image protocol.
|
||
|
'';
|
||
|
};
|
||
|
};
|
||
|
config.programs.fastfetch = lib.mkIf cfg.enable {
|
||
|
enable = true;
|
||
|
settings = (
|
||
|
fastfetchConfig
|
||
|
// {
|
||
|
logo = {
|
||
|
height = 18;
|
||
|
padding = {
|
||
|
top = 2;
|
||
|
};
|
||
|
type = if cfg.useKittyImage then "kitty" else "auto";
|
||
|
source = lib.mkIf cfg.useKittyImage ./nixos-logo.png;
|
||
|
};
|
||
|
}
|
||
|
);
|
||
|
};
|
||
|
}
|