huge refactor
This commit is contained in:
parent
03e5a47910
commit
1d4c8455ee
30 changed files with 972 additions and 697 deletions
78
moduler/services/system/default.nix
Normal file
78
moduler/services/system/default.nix
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
{
|
||||
options.features.system = {
|
||||
enable = mkEnableOption "enable shared system utilities";
|
||||
preset = mkOption {
|
||||
type = types.enum [
|
||||
"minimal"
|
||||
"desktop"
|
||||
"ops"
|
||||
];
|
||||
default = "desktop";
|
||||
description = "Package profile for shared system tooling.";
|
||||
};
|
||||
corePackages = mkOption {
|
||||
type = types.listOf types.package;
|
||||
default = with pkgs; [
|
||||
sops
|
||||
unzip
|
||||
zip
|
||||
wget
|
||||
htop
|
||||
procps
|
||||
fastfetch
|
||||
bc
|
||||
fzf
|
||||
eza
|
||||
rsync
|
||||
ripgrep
|
||||
fd
|
||||
];
|
||||
description = "Always-installed core system packages.";
|
||||
};
|
||||
desktopPackages = mkOption {
|
||||
type = types.listOf types.package;
|
||||
default = with pkgs; [
|
||||
bluez
|
||||
bluez-tools
|
||||
poppler-utils
|
||||
alsa-utils
|
||||
libnotify
|
||||
hyprpicker
|
||||
];
|
||||
description = "Additional packages for desktop-oriented hosts.";
|
||||
};
|
||||
opsPackages = mkOption {
|
||||
type = types.listOf types.package;
|
||||
default = with pkgs; [
|
||||
grc
|
||||
lazygit
|
||||
];
|
||||
description = "Additional packages for operations-heavy hosts.";
|
||||
};
|
||||
extras = mkOption {
|
||||
type = types.listOf types.package;
|
||||
default = with pkgs; [
|
||||
lolcat
|
||||
fortune
|
||||
cowsay
|
||||
typst
|
||||
];
|
||||
description = "Additional optional packages for all presets except minimal.";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf config.features.system.enable {
|
||||
environment.systemPackages =
|
||||
config.features.system.corePackages
|
||||
++ optionals (config.features.system.preset != "minimal") config.features.system.extras
|
||||
++ optionals (config.features.system.preset == "desktop") config.features.system.desktopPackages
|
||||
++ optionals (config.features.system.preset == "ops") config.features.system.opsPackages;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue