summaryrefslogtreecommitdiff
path: root/hm/shell
diff options
context:
space:
mode:
Diffstat (limited to 'hm/shell')
-rw-r--r--hm/shell/cli.nix35
-rw-r--r--hm/shell/fish.nix69
-rw-r--r--hm/shell/foot.nix38
-rw-r--r--hm/shell/shell.nix9
-rw-r--r--hm/shell/starship.nix49
5 files changed, 200 insertions, 0 deletions
diff --git a/hm/shell/cli.nix b/hm/shell/cli.nix
new file mode 100644
index 0000000..222b002
--- /dev/null
+++ b/hm/shell/cli.nix
@@ -0,0 +1,35 @@
+{ config, lib, pkgs, ... }:
+let
+ cfg = config.szpont.hm.shell.cli;
+in
+{
+ options.szpont.hm.shell.cli.enable = lib.mkEnableOption "modern cli tools";
+
+ config = lib.mkIf cfg.enable {
+ programs.zoxide.enable = true;
+ programs.zoxide.options = [ "--cmd cd" ];
+
+ programs.bat = {
+ enable = true;
+ config.theme = "gruvbox-dark";
+ };
+
+ programs.eza.enable = true;
+ programs.fzf.enable = true;
+ programs.fd.enable = true;
+ programs.ripgrep.enable = true;
+ programs.yazi.enable = true;
+
+ programs.btop.enable = true;
+ programs.fastfetch.enable = true;
+
+ home.packages = with pkgs; [
+ gdu
+ file
+ mediainfo
+ chafa
+ hexyl
+ procs
+ ];
+ };
+}
diff --git a/hm/shell/fish.nix b/hm/shell/fish.nix
new file mode 100644
index 0000000..644eadc
--- /dev/null
+++ b/hm/shell/fish.nix
@@ -0,0 +1,69 @@
+{ config, lib, pkgs, ... }:
+let
+ cfg = config.szpont.hm.shell.fish;
+in
+{
+ options.szpont.hm.shell.fish.enable = lib.mkEnableOption "enables fish shell";
+
+ config = lib.mkIf cfg.enable {
+ programs.fish = {
+ enable = true;
+
+ interactiveShellInit = ''
+ set fish_greeting
+ fastfetch
+ '';
+
+ shellAliases = {
+ nos = "nh os switch";
+ nob = "nh os boot";
+ nfu = "nix flake update";
+ ll = "ls -lah";
+ la = "ls -A";
+ md = "mkdir -p";
+ rmf = "rm -rf";
+ gl = "git log --oneline --graph --decorate";
+ untar = "tar -xzvf";
+ tarc = "tar -czvf";
+ ff = "fastfetch";
+ cat = "bat";
+ ls = "eza";
+ };
+
+ plugins = [
+ {
+ name = "transient-fish";
+ src = pkgs.fishPlugins.transient-fish.src;
+ }
+ {
+ name = "fishbang";
+ src = pkgs.fishPlugins.fishbang.src;
+ }
+ {
+ name = "puffer";
+ src = pkgs.fishPlugins.puffer.src;
+ }
+ {
+ name = "pisces";
+ src = pkgs.fishPlugins.pisces.src;
+ }
+ {
+ name = "fzf-fish";
+ src = pkgs.fishPlugins.fzf-fish.src;
+ }
+ {
+ name = "fish-you-should-use";
+ src = pkgs.fishPlugins.fish-you-should-use.src;
+ }
+ {
+ name = "colored-man-pages";
+ src = pkgs.fishPlugins.colored-man-pages.src;
+ }
+ {
+ name = "fifc";
+ src = pkgs.fishPlugins.fifc.src;
+ }
+ ];
+ };
+ };
+}
diff --git a/hm/shell/foot.nix b/hm/shell/foot.nix
new file mode 100644
index 0000000..9847399
--- /dev/null
+++ b/hm/shell/foot.nix
@@ -0,0 +1,38 @@
+{ pkgs, lib, config, ... }:
+let
+ cfg = config.szpont.hm.shell.foot;
+
+ footTheme = pkgs.fetchurl {
+ url = "https://codeberg.org/dnkl/foot/raw/branch/master/themes/gruvbox-dark";
+ sha256 = "sha256-ubvnLgDEPGvNrwQdZRNguftg2SF5qcO1iVK0Tb5ZveI=";
+ };
+in
+{
+ options.szpont.hm.shell.foot = {
+ enable = lib.mkEnableOption "foot terminal emulator";
+ fontSize = lib.mkOption {
+ type = lib.types.int;
+ default = 14;
+ description = "Font size for the foot terminal";
+ };
+ };
+
+ config = lib.mkIf cfg.enable {
+ programs.foot = {
+ enable = true;
+ settings = {
+ main = {
+ font = "JetBrainsMonoNFM-Regular:size=${toString cfg.fontSize}";
+ box-drawings-uses-font-glyphs = "yes";
+ include = "${footTheme}";
+ };
+ scrollback = {
+ lines = 10000;
+ };
+ mouse = {
+ hide-when-typing = "yes";
+ };
+ };
+ };
+ };
+}
diff --git a/hm/shell/shell.nix b/hm/shell/shell.nix
new file mode 100644
index 0000000..a1ca34d
--- /dev/null
+++ b/hm/shell/shell.nix
@@ -0,0 +1,9 @@
+{ ... }:
+{
+ imports = [
+ ./cli.nix
+ ./fish.nix
+ ./foot.nix
+ ./starship.nix
+ ];
+}
diff --git a/hm/shell/starship.nix b/hm/shell/starship.nix
new file mode 100644
index 0000000..4996bdc
--- /dev/null
+++ b/hm/shell/starship.nix
@@ -0,0 +1,49 @@
+{ config, lib, ... }:
+let
+ cfg = config.szpont.hm.shell.starship;
+in
+{
+ options.szpont.hm.shell.starship.enable = lib.mkEnableOption "Starship prompt";
+
+ config = lib.mkIf cfg.enable {
+ programs.starship = {
+ enable = true;
+ enableFishIntegration = true;
+
+ settings = {
+ add_newline = true;
+
+ # format = lib.concatStrings [
+ # "$hostname"
+ # "$directory"
+ # "$git_branch"
+ # "$git_status"
+ # "$nix_shell"
+ # "$python"
+ # "$rust"
+ # "$character"
+ # ];
+
+ directory = {
+ truncate_to_repo = false;
+ read_only = "";
+ };
+
+ hostname.format = "[$hostname ]($style) ";
+
+ python = { symbol = ""; format = "[$symbol ]($style)"; };
+ rust = { symbol = ""; };
+ nix_shell.format = "[$symbol$state ]($style)";
+
+ git_status = {
+ conflicted = "󰦎";
+ ahead = "";
+ behind = "";
+ diverged = "";
+ renamed = "";
+ deleted = "x";
+ };
+ };
+ };
+ };
+}