Skip to content

Commit

Permalink
📦 Added dua and nsearch
Browse files Browse the repository at this point in the history
Also fixed `age` and `eza` default.nix files content
  • Loading branch information
theobori committed Nov 24, 2024
1 parent 12ae7b6 commit 2cfa017
Show file tree
Hide file tree
Showing 8 changed files with 85 additions and 14 deletions.
21 changes: 21 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@
url = "github:Benex254/FastAnime";
inputs.nixpkgs.follows = "nixpkgs";
};

nsearch = {
url = "github:niksingh710/nsearch";
inputs.nixpkgs.follows = "nixpkgs";
};
};

outputs =
Expand Down
20 changes: 20 additions & 0 deletions modules/home/cli/programs/dua/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
pkgs,
config,
lib,
namespace,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkBoolOpt;

cfg = config.${namespace}.cli.programs.dua;
in
{
options.${namespace}.cli.programs.dua = {
enable = mkBoolOpt false "Whether or not to enable dua.";
};

config = mkIf cfg.enable { home.packages = with pkgs; [ dua ]; };
}
13 changes: 8 additions & 5 deletions modules/home/cli/programs/eza/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
pkgs,
config,
lib,
namespace,
Expand All @@ -9,12 +8,16 @@ let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkBoolOpt;

cfg = config.${namespace}.cli.programs.screen;
cfg = config.${namespace}.cli.programs.eza;
in
{
options.${namespace}.cli.programs.screen = {
enable = mkBoolOpt false "Whether or not to enable screen.";
options.${namespace}.cli.programs.eza = {
enable = mkBoolOpt false "Whether or not to enable eza.";
};

config = mkIf cfg.enable { home.packages = with pkgs; [ screen ]; };
config = mkIf cfg.enable {
programs.eza = {
enable = true;
};
};
}
21 changes: 21 additions & 0 deletions modules/home/cli/programs/nsearch/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
inputs,
pkgs,
config,
lib,
namespace,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkBoolOpt;

cfg = config.${namespace}.cli.programs.nsearch;
in
{
options.${namespace}.cli.programs.nsearch = {
enable = mkBoolOpt false "Whether or not to enable nsearch.";
};

config = mkIf cfg.enable { home.packages = [ inputs.nsearch.packages.${pkgs.system}.default ]; };
}
13 changes: 5 additions & 8 deletions modules/home/cli/programs/screen/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
pkgs,
config,
lib,
namespace,
Expand All @@ -8,16 +9,12 @@ let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkBoolOpt;

cfg = config.${namespace}.cli.programs.eza;
cfg = config.${namespace}.cli.programs.screen;
in
{
options.${namespace}.cli.programs.eza = {
enable = mkBoolOpt false "Whether or not to enable eza.";
options.${namespace}.cli.programs.screen = {
enable = mkBoolOpt false "Whether or not to enable screen.";
};

config = mkIf cfg.enable {
programs.eza = {
enable = true;
};
};
config = mkIf cfg.enable { home.packages = with pkgs; [ screen ]; };
}
5 changes: 4 additions & 1 deletion modules/home/roles/common/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ in
cli = {
terminals.wezterm = enabled;
shells.fish = enabled;
programs.home-manager = enabled;
programs = {
home-manager = enabled;
dua = enabled;
};
};

styles.stylix = enabled;
Expand Down
1 change: 1 addition & 0 deletions modules/home/roles/development/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ in
terraform = enabled;
modern-unix = enabled;
network-tools = enabled;
nsearch = enabled;
nix-index = enabled;
screen = enabled;
ssh = enabled;
Expand Down

0 comments on commit 2cfa017

Please sign in to comment.