1{
2 pkgs,
3 config,
4 lib,
5 ...
6}:
7let
8 types = lib.types;
9 cfg = config.gensokyo.system-manager;
10in
11{
12 options.gensokyo.system-manager = {
13 enable = lib.mkEnableOption "a shortcut to manage the system no matter where you are (in the system)";
14 flakeLocation = lib.mkOption {
15 type = types.path;
16 description = "The location of your system flake to manage.";
17 };
18 };
19
20 config = lib.mkIf cfg.enable {
21 environment.systemPackages = [
22 (pkgs.callPackage ./package.nix { inherit (cfg) flakeLocation; })
23 ];
24 };
25}