meta: add at least 24 commits into one

This commit is contained in:
Artur Manuel 2025-03-22 17:36:40 +00:00
commit 6420ebef60
Signed by: amadaluzia
SSH key fingerprint: SHA256:Zwg7gBuZyaG48ucAZneJwltiXu0+tJb7c3lYt9AYlLg
25 changed files with 363 additions and 579 deletions

View file

@ -5,21 +5,34 @@
...
}:
let
inherit (lib.options) mkOption mkPackageOption mkEnableOption;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.types) nullOr str;
cfg = config.alqueva.shells.nushell;
in
{
options.alqueva.shells.nushell = {
enable = lib.mkEnableOption "Nushell";
package = lib.mkPackageOption pkgs "nushell" { };
};
config = lib.mkIf cfg.enable {
environment = {
systemPackages = [ cfg.package ];
shells = [
(lib.getExe' cfg.package "nu")
"/run/current-system/sw/bin/nu"
];
enable = mkEnableOption "Nushell";
package = mkPackageOption pkgs "nushell" { };
config = mkOption {
type = nullOr str;
default = null;
description = "Nushell code to load by default with Nushell.";
};
};
config = mkIf cfg.enable (mkMerge [
{
environment = {
systemPackages = [ cfg.package ];
shells = [
(lib.getExe' cfg.package "nu")
"/run/current-system/sw/bin/nu"
];
};
}
(mkIf (cfg.config != null) {
environment.systemPackages = [ ];
})
]);
}