mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-12-22 14:20:44 -06:00
make another function to propagate
This commit is contained in:
parent
49b9b107a4
commit
60a6311a0d
3 changed files with 15 additions and 15 deletions
|
@ -33,8 +33,8 @@ in rec {
|
||||||
};
|
};
|
||||||
|
|
||||||
oizysHosts = mapAttrs (name: _: mkSystem name) (readDir ../hosts);
|
oizysHosts = mapAttrs (name: _: mkSystem name) (readDir ../hosts);
|
||||||
oizysPkg = forAllSystems (pkgs:
|
oizysPkg = forAllSystems (
|
||||||
rec {
|
pkgs: rec {
|
||||||
oizys = pkgs.callPackage ../oizys {};
|
oizys = pkgs.callPackage ../oizys {};
|
||||||
default = oizys;
|
default = oizys;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
final: prev: let
|
final: prev: let
|
||||||
inherit (final) hasSuffix mkEnableOption mkIf;
|
inherit (final) hasSuffix mkEnableOption mkIf mkOption types;
|
||||||
runes = import ../modules/runes;
|
runes = import ../modules/runes;
|
||||||
in rec {
|
in rec {
|
||||||
enabled = {enable = true;};
|
enabled = {enable = true;};
|
||||||
|
@ -33,4 +33,12 @@ in rec {
|
||||||
options.oizys.${attr}.enable = mkEnableOption "enable ${attr} support";
|
options.oizys.${attr}.enable = mkEnableOption "enable ${attr} support";
|
||||||
config = mkIf config.oizys.${attr}.enable content;
|
config = mkIf config.oizys.${attr}.enable content;
|
||||||
};
|
};
|
||||||
|
mkDefaultOizysModule = config: attr: content: {
|
||||||
|
options.oizys.${attr}.enable = mkOption {
|
||||||
|
default = true;
|
||||||
|
description = "enable ${attr} support";
|
||||||
|
type = types.bool;
|
||||||
|
};
|
||||||
|
config = mkIf config.oizys.${attr}.enable content;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,16 +5,9 @@
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) mkOption mkIf types;
|
inherit (lib) mkDefaultOizysModule;
|
||||||
cfg = config.oizys.cli;
|
in
|
||||||
in {
|
mkDefaultOizysModule config "cli" {
|
||||||
options.oizys.cli.enable = mkOption {
|
|
||||||
default = true;
|
|
||||||
description = "Whether to enable cli.";
|
|
||||||
type = types.bool;
|
|
||||||
};
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
programs.direnv.enable = true;
|
programs.direnv.enable = true;
|
||||||
environment.sessionVariables = {
|
environment.sessionVariables = {
|
||||||
DIRENV_LOG_FORMAT = "[2mdirenv: %s[0m";
|
DIRENV_LOG_FORMAT = "[2mdirenv: %s[0m";
|
||||||
|
@ -35,5 +28,4 @@ in {
|
||||||
btop
|
btop
|
||||||
inputs.tsm.packages.${pkgs.system}.tsm
|
inputs.tsm.packages.${pkgs.system}.tsm
|
||||||
];
|
];
|
||||||
};
|
}
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue