added global shedrc option configuration to the nixos module
extracted options and rc file renderer into their own files
This commit is contained in:
@@ -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;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user