From 4f04e12ba475ea3c09d73aeaf7467239a170ad55 Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Sat, 3 Dec 2022 13:05:37 -0500 Subject: [PATCH] make shellcommon a regular module --- flake.nix | 8 ++++---- home/shellcommon.nix | 6 +++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/flake.nix b/flake.nix index bb4686f..1e98192 100644 --- a/flake.nix +++ b/flake.nix @@ -140,11 +140,10 @@ userName = "Sridhar Ratnakumar"; userEmail = "srid@srid.ca"; }) + ./home/shellcommon.nix ./home/vscode-server.nix ]; - programs.bash = { - enable = true; - } // (import ./home/shellcommon.nix { inherit pkgs; }); + programs.bash.enable = true; }; } ]; @@ -201,13 +200,14 @@ userName = "Sridhar Ratnakumar"; userEmail = "srid@srid.ca"; }) + ./home/shellcommon.nix ]; programs.zsh = { enable = true; initExtra = '' export PATH=/etc/profiles/per-user/${userName}/bin:/run/current-system/sw/bin/:$PATH ''; - } // (import ./home/shellcommon.nix { inherit pkgs; }); + }; home.stateVersion = "21.11"; }; } diff --git a/home/shellcommon.nix b/home/shellcommon.nix index 86ad2cb..54b451a 100644 --- a/home/shellcommon.nix +++ b/home/shellcommon.nix @@ -1,5 +1,5 @@ { pkgs, ... }: -{ +let shellAliases = { e = "nvim"; ee = "nvim \"$(fzf)\""; @@ -15,4 +15,8 @@ # TODO: Gotta specify ~/.todo/config in Nix t = "${pkgs.todo-txt-cli}/bin/todo.sh"; }; +in +{ + programs.bash = { inherit shellAliases; }; + programs.zsh = { inherit shellAliases; }; }