Commit 78e5321

HPCesia <me@hpcesia.com>
2025-09-30 18:20:33
refactor: core packages
1 parent 16503a4
home/base/core/core.nix
@@ -1,110 +0,0 @@
-{
-  pkgs,
-  lib,
-  ...
-}: {
-  home.packages = with pkgs; [
-    # Misc
-    gnupg
-    gnumake
-
-    fd # search for files by name, faster than find
-    ripgrep # search for files by its content, replacement of grep
-    yq-go # yaml processor https://github.com/mikefarah/yq
-    delta # A viewer for git and diff output
-    gping # ping, but with a graph(TUI)
-    websocat # Command-line client for WebSockets
-
-    # nix related
-    nix-index # A small utility to index nix store paths
-    nix-init # generate nix derivation from url
-    nix-melt # A TUI flake.lock viewer
-    nix-tree # A TUI to visualize the dependency graph of a nix derivation
-  ];
-
-  programs = {
-    # A command-line fuzzy finder
-    fzf = {
-      enable = true;
-    };
-
-    # a cat(1) clone with syntax highlighting and Git integration.
-    bat = {
-      enable = true;
-      config = {
-        pager = "less -FR";
-      };
-    };
-
-    # zoxide is a smarter cd command, inspired by z and autojump.
-    # It remembers which directories you use most frequently,
-    # so you can "jump" to them in just a few keystrokes.
-    # zoxide works on all major shells.
-    zoxide = {
-      enable = true;
-      enableBashIntegration = true;
-      enableFishIntegration = true;
-      enableNushellIntegration = true;
-    };
-
-    carapace = {
-      enable = true;
-      enableBashIntegration = true;
-      enableFishIntegration = true;
-      enableNushellIntegration = true;
-    };
-
-    # rbw, a unofficial CLI Bitwarden client
-    rbw = {
-      enable = true;
-      settings = {
-        base_url = "https://bitwarden.hpcesia.com/";
-        email = "me@hpcesia.com";
-        pinentry = lib.mkDefault pkgs.pinentry-tty;
-      };
-    };
-
-    # very fast version of tldr in Rust
-    tealdeer = {
-      enable = true;
-      enableAutoUpdates = true;
-      settings = {
-        display = {
-          compact = false;
-          use_pager = true;
-        };
-        updates = {
-          auto_update = false;
-          auto_update_interval_hours = 720;
-        };
-      };
-    };
-
-    # Atuin replaces your existing shell history with a SQLite database,
-    # and records additional context for your commands.
-    # Additionally, it provides optional and fully encrypted
-    # synchronisation of your history between machines, via an Atuin server.
-    atuin = {
-      enable = true;
-      enableBashIntegration = true;
-      enableFishIntegration = true;
-      enableNushellIntegration = true;
-      settings = {
-        sync_address = "https://atuin.hpcesia.com";
-        sync_frequency = "10m";
-        filter_mode = "host";
-        style = "full";
-        inline_height = 32;
-        keymap_mode = "vim-normal";
-      };
-    };
-
-    eza = {
-      enable = true;
-      enableBashIntegration = true;
-      enableFishIntegration = true;
-      icons = "auto";
-      git = true;
-    };
-  };
-}
home/base/gui/misc.nix
@@ -13,6 +13,4 @@
 
     veracrypt
   ];
-
-  programs.rbw.settings.pinentry = pkgs.pinentry-qt;
 }
modules/core/tools/autin.nix
@@ -0,0 +1,22 @@
+{
+  flake.modules.homeManager.core = _: {
+    # Atuin replaces your existing shell history with a SQLite database,
+    # and records additional context for your commands.
+    # Additionally, it provides optional and fully encrypted
+    # synchronisation of your history between machines, via an Atuin server.
+    programs.atuin = {
+      enable = true;
+      enableBashIntegration = true;
+      enableFishIntegration = true;
+      enableNushellIntegration = true;
+      settings = {
+        sync_address = "https://atuin.hpcesia.com";
+        sync_frequency = "10m";
+        filter_mode = "host";
+        style = "full";
+        inline_height = 32;
+        keymap_mode = "vim-normal";
+      };
+    };
+  };
+}
modules/core/tools/bat.nix
@@ -0,0 +1,11 @@
+{
+  flake.modules.homeManager.core = _: {
+    # a cat clone with syntax highlighting and Git integration.
+    programs.bat = {
+      enable = true;
+      config = {
+        pager = "less -FR";
+      };
+    };
+  };
+}
modules/core/tools/carapace.nix
@@ -0,0 +1,10 @@
+{
+  flake.modules.homeManager.core = _: {
+    programs.carapace = {
+      enable = true;
+      enableBashIntegration = true;
+      enableFishIntegration = true;
+      enableNushellIntegration = true;
+    };
+  };
+}
modules/core/tools/eza.nix
@@ -0,0 +1,11 @@
+{
+  flake.modules.homeManager.core = _: {
+    programs.eza = {
+      enable = true;
+      enableBashIntegration = true;
+      enableFishIntegration = true;
+      icons = "auto";
+      git = true;
+    };
+  };
+}
modules/core/tools/fzf.nix
@@ -0,0 +1,7 @@
+{
+  flake.modules.homeManager.core = _: {
+    programs.fzf = {
+      enable = true;
+    };
+  };
+}
modules/core/tools/packages.nix
@@ -0,0 +1,40 @@
+{
+  flake.modules.nixos.core = {pkgs, ...}: {
+    environment.systemPackages = with pkgs; [
+      git
+
+      # archives
+      zip
+      xz
+      zstd
+      unzipNLS
+      p7zip
+      gnutar
+
+      # text processing
+      gnugrep
+      gnused
+      gawk
+      jq
+
+      # networking tools
+      wget
+      curl
+
+      # misc
+      file
+      which
+      findutils
+    ];
+  };
+
+  flake.modules.homeManager.core = {pkgs, ...}: {
+    home.packages = with pkgs; [
+      fd # search for files by name, faster than find
+      ripgrep # search for files by its content, replacement of grep
+      gping # ping, but with a graph(TUI)
+      yq-go # yaml processor https://github.com/mikefarah/yq
+      websocat # Command-line client for WebSockets
+    ];
+  };
+}
modules/core/tools/rbw.nix
@@ -0,0 +1,13 @@
+{
+  flake.modules.homeManager.core = {pkgs, ...}: {
+    # rbw, a unofficial CLI Bitwarden client
+    programs.rbw = {
+      enable = true;
+      settings = {
+        base_url = "https://bitwarden.hpcesia.com/";
+        email = "me@hpcesia.com";
+        pinentry = pkgs.pinentry-tty;
+      };
+    };
+  };
+}
modules/core/tools/tealdeer.nix
@@ -0,0 +1,19 @@
+{
+  flake.modules.homeManager.core = _: {
+    # very fast version of tldr in Rust
+    programs.tealdeer = {
+      enable = true;
+      enableAutoUpdates = true;
+      settings = {
+        display = {
+          compact = false;
+          use_pager = true;
+        };
+        updates = {
+          auto_update = false;
+          auto_update_interval_hours = 720;
+        };
+      };
+    };
+  };
+}
modules/core/tools/zoxide.nix
@@ -0,0 +1,14 @@
+{
+  flake.modules.homeManager.core = _: {
+    # zoxide is a smarter cd command, inspired by z and autojump.
+    # It remembers which directories you use most frequently,
+    # so you can "jump" to them in just a few keystrokes.
+    # zoxide works on all major shells.
+    programs.zoxide = {
+      enable = true;
+      enableBashIntegration = true;
+      enableFishIntegration = true;
+      enableNushellIntegration = true;
+    };
+  };
+}
os-modules/base/system-packages.nix
@@ -6,31 +6,8 @@
   environment.systemPackages = with pkgs; [
     fastfetch
     nushell
-    git
 
-    # archives
-    zip
-    xz
-    zstd
-    unzipNLS
-    p7zip
-    gnutar
-
-    # text processing
-    gnugrep
-    gnused
-    gawk
-    jq
-
-    # networking tools
-    wget
-    curl
-
-    # misc
-    file
     tree
-    which
-    findutils
     btop
   ];