meta: add at least 24 commits into one
This commit is contained in:
parent
db2564d828
commit
6420ebef60
25 changed files with 363 additions and 579 deletions
|
@ -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 = [ ];
|
||||
})
|
||||
]);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue