summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAmir Saeid <amir@glgdgt.com>2026-03-08 20:12:44 +0000
committerAmir Saeid <amir@glgdgt.com>2026-03-08 20:12:44 +0000
commit1b95597c921f7a94e0e7b08871d51f941076c319 (patch)
tree663383bc82412d690cd44927bf8cd289d3a3c4c6 /modules
Initial commit
Diffstat (limited to 'modules')
-rw-r--r--modules/base.nix20
-rw-r--r--modules/dev-tools.nix46
-rw-r--r--modules/host-common.nix10
-rw-r--r--modules/shell.nix75
-rw-r--r--modules/term.nix37
5 files changed, 188 insertions, 0 deletions
diff --git a/modules/base.nix b/modules/base.nix
new file mode 100644
index 0000000..bf5efe9
--- /dev/null
+++ b/modules/base.nix
@@ -0,0 +1,20 @@
+{ config
+, pkgs
+, lib
+, userOptions
+, ...
+}:
+{
+ home.stateVersion = "25.11";
+
+ imports = [
+ ./host-common.nix
+ ./dev-tools.nix
+ ./shell.nix
+ ./term.nix
+ ];
+
+ home.packages = with pkgs; [ nixd ];
+
+ programs.home-manager.enable = true;
+}
diff --git a/modules/dev-tools.nix b/modules/dev-tools.nix
new file mode 100644
index 0000000..3c0643b
--- /dev/null
+++ b/modules/dev-tools.nix
@@ -0,0 +1,46 @@
+{ config
+, pkgs
+, unstablePkgs
+, unfreePkgs
+, unstableUnfreePkgs
+, ...
+}:
+{
+ home.packages = with pkgs; [
+ alacritty
+ coursier
+ curl
+ cvc4
+ cvc5
+ fzf
+ git
+ haskell.compiler.ghc912
+ haskellPackages.cabal-install
+ hugo
+ imagemagick
+ jq
+ neovim
+ ripgrep
+ pass
+ starship
+ rustup
+ tig
+ tmux
+ uv
+ wget
+ z3
+ zed-editor
+ zsh
+
+ unfreePkgs.claude-code
+ ];
+
+ programs.claude-code = {
+ package = unfreePkgs.claude-code;
+ enable = true;
+ };
+
+ programs.zed-editor = {
+ enable = true;
+ };
+}
diff --git a/modules/host-common.nix b/modules/host-common.nix
new file mode 100644
index 0000000..83a51e2
--- /dev/null
+++ b/modules/host-common.nix
@@ -0,0 +1,10 @@
+{ config, lib, hostname, ... }:
+let
+ userOptions = import ../hosts/${hostname}/userOptions.nix;
+in
+{
+ _module.args.userOptions = userOptions;
+
+ home.username = userOptions.username;
+ home.homeDirectory = userOptions.userHome;
+}
diff --git a/modules/shell.nix b/modules/shell.nix
new file mode 100644
index 0000000..68111ea
--- /dev/null
+++ b/modules/shell.nix
@@ -0,0 +1,75 @@
+{ config
+, pkgs
+, hmLib
+, lib
+, userOptions
+, ...
+}:
+{
+ home.sessionVariables = {
+ EDITOR = "nvim";
+ };
+
+ home.sessionPath = [
+ "${userOptions.userHome}/.cargo/bin"
+ ];
+
+ home.activation.coursierSetup = hmLib.hm.dag.entryAfter [ "writeBoundary" ] ''
+ $DRY_RUN_CMD ${pkgs.coursier}/bin/cs setup --env --jvm 21
+ '';
+
+ programs.fzf = {
+ enable = true;
+ enableZshIntegration = true;
+ };
+
+ programs.zsh = {
+ enable = true;
+ enableCompletion = true;
+ initContent = ''
+ bindkey '\e.' insert-last-word
+ if java_home=$(cs java-home --jvm 21 2>/dev/null); then
+ export JAVA_HOME="$java_home"
+ fi
+ '';
+ plugins = [
+ {
+ name = "fzf-tab";
+ src = pkgs.fetchFromGitHub {
+ owner = "Aloxaf";
+ repo = "fzf-tab";
+ rev = "v1.2.0";
+ sha256 = "0mnsmfv0bx6np2r6pll43h261v7mh2ic1kd08r7jcwyb5xarfvmb";
+ };
+ }
+ ];
+ };
+
+ programs.git = {
+ enable = true;
+ settings = {
+ user = {
+ email = "${userOptions.gitEmail}";
+ name = "${userOptions.gitName}";
+ };
+ pull.rebase = true;
+ merge.conflictstyle = "zdiff3";
+ };
+ };
+
+ services.gpg-agent = {
+ enable = true;
+ };
+
+ programs.tmux = {
+ enable = true;
+ extraConfig = ''
+ set -g default-command "${pkgs.zsh}/bin/zsh"
+ '';
+ };
+
+ programs.starship = {
+ enable = true;
+ enableZshIntegration = true;
+ };
+}
diff --git a/modules/term.nix b/modules/term.nix
new file mode 100644
index 0000000..3d455d5
--- /dev/null
+++ b/modules/term.nix
@@ -0,0 +1,37 @@
+{ config
+, pkgs
+, lib
+, userOptions
+, ...
+}:
+{
+ home.packages = with pkgs.nerd-fonts; [
+ blex-mono
+ ];
+
+ programs.alacritty = {
+ enable = true;
+ settings = {
+ font = {
+ normal = {
+ family = "BlexMono Nerd Font";
+ style = "SemiBold";
+ };
+ bold = {
+ family = "BlexMono Nerd Font";
+ style = "Bold";
+ };
+ italic = {
+ family = "BlexMono Nerd Font";
+ style = "SemiBold Italic";
+ };
+ bold_italic = {
+ family = "BlexMono Nerd Font";
+ style = "Bold Italic";
+ };
+ size = 12;
+ };
+ };
+ theme = "tokyo_night";
+ };
+}