refactor *started*
This commit is contained in:
parent
d0413cb830
commit
db2103a37d
103 changed files with 1008 additions and 786 deletions
31
modules/apps/terminal/base-packages.nix
Normal file
31
modules/apps/terminal/base-packages.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
options = {
|
||||
apps.terminal.toys = lib.mkEnableOption "enable terminal toys";
|
||||
};
|
||||
config = {
|
||||
environment.systemPackages =
|
||||
with pkgs;
|
||||
[
|
||||
unzip
|
||||
btop
|
||||
]
|
||||
++ lib.mkIf config.apps.terminal.toys [
|
||||
|
||||
asciiquarium-transparent
|
||||
cava
|
||||
bunnyfetch
|
||||
nerdfetch
|
||||
fastfetch
|
||||
cmatrix
|
||||
astroterm
|
||||
];
|
||||
};
|
||||
}
|
||||
30
modules/apps/terminal/default.nix
Normal file
30
modules/apps/terminal/default.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
options = {
|
||||
apps.terminal = {
|
||||
package = lib.mkOption {
|
||||
default = "";
|
||||
description = "terminal package";
|
||||
};
|
||||
binary = lib.mkOption {
|
||||
default = "";
|
||||
description = "terminal binary";
|
||||
};
|
||||
default = lib.mkOption {
|
||||
default = "";
|
||||
description = "default terminal";
|
||||
};
|
||||
};
|
||||
};
|
||||
imports = [
|
||||
./base-packages.nix
|
||||
./kitty.nix
|
||||
./tui.nix
|
||||
];
|
||||
}
|
||||
25
modules/apps/terminal/kitty.nix
Normal file
25
modules/apps/terminal/kitty.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
options = {
|
||||
apps.terminal = {
|
||||
kitty.enable = lib.mkEnableOption "enable kitty";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.apps.terminal.kitty.enable {
|
||||
terminal = lib.mkIf (config.apps.terminal.default == "kitty") {
|
||||
package = pkgs.kitty;
|
||||
binary = "${pkgs.kitty}/bin/kitty";
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
kitty
|
||||
];
|
||||
};
|
||||
}
|
||||
25
modules/apps/terminal/tui.nix
Normal file
25
modules/apps/terminal/tui.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
tt = config.apps.terminal.tui;
|
||||
in
|
||||
|
||||
{
|
||||
options = {
|
||||
apps.terminal.tui = {
|
||||
ranger.enable = lib.mkEnableOption "enable ranger";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
environment.systemPackages = with pkgs; [
|
||||
(lib.mkIf (tt.ranger.enable) ranger)
|
||||
];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue