Skip to content

Commit

Permalink
fix(home): added missing github and lazydocker options
Browse files Browse the repository at this point in the history
  • Loading branch information
luisnquin committed Mar 2, 2024
1 parent 9dc493a commit 856c103
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 0 deletions.
2 changes: 2 additions & 0 deletions home/options/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
imports = [
./lazydocker.nix
./nest-cli.nix
./github.nix
];
}
50 changes: 50 additions & 0 deletions home/options/github.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
config,
pkgsx,
pkgs,
lib,
...
}:
with lib; let
cfg = config.programs.github-tools;
in {
options = {
programs.github-tools = {
enable = mkEnableOption "github";

act = mkOption {
type = types.bool;
default = true;
};

cli = mkOption {
type = types.bool;
default = true;
};

tui = mkOption {
type = types.bool;
default = true;
};
};
};

config = mkIf cfg.enable {
home.packages =
(
if cfg.act
then [pkgs.act]
else []
)
++ (
if cfg.tui
then [pkgsx.ght]
else []
)
++ (
if cfg.cli
then [pkgs.gh]
else []
);
};
}
29 changes: 29 additions & 0 deletions home/options/lazydocker.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
config,
pkgs,
lib,
...
}:
with lib; let
cfg = config.programs.lazydocker;
in {
options = {
programs.lazydocker = {
enable = mkEnableOption "lazydocker";
config = mkOption {
default = {};
type = types.attrs;
};
};
};

config = mkIf cfg.enable {
home.packages = [
pkgs.lazydocker
];

xdg.configFile = {
"lazydocker/config.yml".source = (pkgs.formats.yaml {}).generate "lazydocker-config" cfg.config;
};
};
}

0 comments on commit 856c103

Please sign in to comment.