added global shedrc option configuration to the nixos module

extracted options and rc file renderer into their own files
This commit is contained in:
2026-03-17 01:47:42 -04:00
parent b0325b6bbb
commit 782a3820da
4 changed files with 366 additions and 322 deletions

View File

@@ -4,18 +4,11 @@ let
cfg = config.programs.shed;
in
{
options.programs.shed = {
enable = lib.mkEnableOption "shed shell";
package = lib.mkOption {
type = lib.types.package;
default = pkgs.shed;
description = "The shed package to use";
};
};
options.programs.shed = import ./shed_opts.nix { inherit pkgs lib; };
config = lib.mkIf cfg.enable {
environment.systemPackages = [ cfg.package ];
environment.shells = [ cfg.package ];
environment.etc."shed/shedrc".text = import ./render_rc.nix lib cfg;
};
}