mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-11-05 01:53:15 -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);
|
||||
oizysPkg = forAllSystems (pkgs:
|
||||
rec {
|
||||
oizysPkg = forAllSystems (
|
||||
pkgs: rec {
|
||||
oizys = pkgs.callPackage ../oizys {};
|
||||
default = oizys;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
final: prev: let
|
||||
inherit (final) hasSuffix mkEnableOption mkIf;
|
||||
inherit (final) hasSuffix mkEnableOption mkIf mkOption types;
|
||||
runes = import ../modules/runes;
|
||||
in rec {
|
||||
enabled = {enable = true;};
|
||||
|
@ -33,4 +33,12 @@ in rec {
|
|||
options.oizys.${attr}.enable = mkEnableOption "enable ${attr} support";
|
||||
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,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkOption mkIf types;
|
||||
cfg = config.oizys.cli;
|
||||
in {
|
||||
options.oizys.cli.enable = mkOption {
|
||||
default = true;
|
||||
description = "Whether to enable cli.";
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
inherit (lib) mkDefaultOizysModule;
|
||||
in
|
||||
mkDefaultOizysModule config "cli" {
|
||||
programs.direnv.enable = true;
|
||||
environment.sessionVariables = {
|
||||
DIRENV_LOG_FORMAT = "[2mdirenv: %s[0m";
|
||||
|
@ -35,5 +28,4 @@ in {
|
|||
btop
|
||||
inputs.tsm.packages.${pkgs.system}.tsm
|
||||
];
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue