Skip to content

Commit

Permalink
draft reusable user preferences
Browse files Browse the repository at this point in the history
this was my first time writing module options
  • Loading branch information
Octelly committed Mar 22, 2024
1 parent 5559c34 commit c573bdb
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions modules/home/octelly/shell/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{ lib, config, ... }:
let
cfg = config.octelly.shell;
in
with lib; {
options.octelly.shell =
{
enable = mkEnableOption "Evaluate Octelly's shell settings";
shell = mkOption { default = cfg.enable; };
cli = {
enable = mkOption {
default = cfg.enable;
description = "Enable default CLI apps";
};
ranger = {
enable = mkOption {
default = cfg.cli.enable;
description = "Enable ranger";
};
};
};
};

config = mkIf cfg.enable {
programs.zsh = {
enable = mkDefault cfg.shell;
};
programs.ranger = mkIf cfg.cli.ranger.enable {
enable = true;
};
};
}

0 comments on commit c573bdb

Please sign in to comment.