mirror of
https://github.com/youwen5/liminalOS.git
synced 2025-06-19 21:49:52 -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
88
hm/modules/linux/programs/bulk-programs.nix
Normal file
88
hm/modules/linux/programs/bulk-programs.nix
Normal file
|
@ -0,0 +1,88 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.liminalOS.programs.bulk;
|
||||
mkEnableOption' =
|
||||
desc:
|
||||
lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = cfg.enable;
|
||||
description = ''
|
||||
Whether to enable ${desc}.
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
options.liminalOS.programs.bulk = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = config.liminalOS.programs.enable;
|
||||
description = ''
|
||||
Whether to enable installation of various useful programs in the system.
|
||||
'';
|
||||
};
|
||||
archiveTools.enable = mkEnableOption' "archive tools";
|
||||
instantMessaging.enable = mkEnableOption' "instant messengers";
|
||||
nixCliTools.enable = mkEnableOption' "Nix CLI helper tools and utilities";
|
||||
desktopApps.enable = mkEnableOption' "desktop applications like mail and file explorer";
|
||||
misc.enable = mkEnableOption' "assorted uncategorized utilities";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages =
|
||||
lib.optionals cfg.archiveTools.enable (
|
||||
with pkgs;
|
||||
[
|
||||
zip
|
||||
xz
|
||||
unzip
|
||||
p7zip
|
||||
]
|
||||
)
|
||||
++ lib.optionals cfg.nixCliTools.enable (
|
||||
with pkgs;
|
||||
[
|
||||
nurl
|
||||
nix-output-monitor
|
||||
]
|
||||
)
|
||||
++ lib.optionals cfg.misc.enable (
|
||||
with pkgs;
|
||||
[
|
||||
ffmpeg
|
||||
|
||||
pciutils # lspci
|
||||
usbutils # lsusb
|
||||
|
||||
ani-cli
|
||||
manga-tui
|
||||
|
||||
hledger
|
||||
]
|
||||
)
|
||||
++ lib.optionals cfg.instantMessaging.enable (
|
||||
with pkgs;
|
||||
[
|
||||
vesktop
|
||||
signal-desktop
|
||||
iamb
|
||||
]
|
||||
++ lib.optionals cfg.desktopApps.enable (
|
||||
with pkgs;
|
||||
[
|
||||
thunderbird
|
||||
xfce.thunar
|
||||
]
|
||||
++ lib.optionals pkgs.stdenv.targetPlatform.isx86_64 [
|
||||
bitwarden-desktop
|
||||
sbctl
|
||||
]
|
||||
++ lib.optionals pkgs.stdenv.targetPlatform.isAarch64 [ ]
|
||||
)
|
||||
);
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue