mirror of
https://github.com/youwen5/liminalOS.git
synced 2025-06-20 05:59:51 -07:00
refactor: massively overhaul home manager module system
This commit is contained in:
parent
b2270408fc
commit
a506d2aed4
64 changed files with 5201 additions and 64 deletions
39
hm/modules/common/shellenv/fastfetch/default.nix
Normal file
39
hm/modules/common/shellenv/fastfetch/default.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
{ 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;
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue