mirror of
https://github.com/nix-community/home-manager
synced 2024-11-27 05:29:46 +01:00
script-directory: add module (#3995)
This commit is contained in:
parent
c10403a573
commit
b9a52ad20e
3 changed files with 38 additions and 0 deletions
|
@ -1033,6 +1033,12 @@ in
|
|||
defaults to 'pkgs.openssh'.
|
||||
'';
|
||||
}
|
||||
{
|
||||
time = "2023-05-18T21:03:30+00:00";
|
||||
message = ''
|
||||
A new module is available: 'programs.shell-directory'.
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -169,6 +169,7 @@ let
|
|||
./programs/sagemath.nix
|
||||
./programs/sbt.nix
|
||||
./programs/scmpuff.nix
|
||||
./programs/script-directory.nix
|
||||
./programs/senpai.nix
|
||||
./programs/sioyek.nix
|
||||
./programs/skim.nix
|
||||
|
|
31
modules/programs/script-directory.nix
Normal file
31
modules/programs/script-directory.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let cfg = config.programs.script-directory;
|
||||
in {
|
||||
meta.maintainers = [ lib.maintainers.janik ];
|
||||
|
||||
options.programs.script-directory = {
|
||||
enable = lib.mkEnableOption "script-directory";
|
||||
|
||||
package = lib.mkPackageOptionMD pkgs "script-directory" { };
|
||||
|
||||
settings = lib.mkOption {
|
||||
default = { };
|
||||
type = lib.types.attrsOf lib.types.str;
|
||||
example = lib.literalExpression ''
|
||||
{
|
||||
SD_ROOT = "''${config.home.homeDirectory}/.sd";
|
||||
SD_EDITOR = "nvim";
|
||||
SD_CAT = "lolcat";
|
||||
}
|
||||
'';
|
||||
description = lib.mdDoc
|
||||
"script-directory config, for options take a look at the [documentation](github.com/ianthehenry/sd#options)";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
home = {
|
||||
packages = [ cfg.package ];
|
||||
sessionVariables = cfg.settings;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue