diff --git a/Makefile b/Makefile index 60d12c1..fdb1786 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ OS := $(shell uname) +# TODO: Automatically detect platform. all: $(error Choose a platform (eg: 'make macos')) diff --git a/flake.nix b/flake.nix index 097a4da..b938c20 100644 --- a/flake.nix +++ b/flake.nix @@ -46,10 +46,20 @@ home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.extraSpecialArgs = { inherit system inputs; }; - home-manager.users.srid = import ./home.nix - { - inherit inputs system pkgs; - }; + home-manager.users.srid = { + imports = [ + ./home/tmux.nix + ./home/git.nix + ./home/neovim.nix + ./home/starship.nix + ./home/terminal.nix + ./home/direnv.nix + ]; + + programs.bash = { + enable = true; + } // (import ./home/shellcommon.nix { inherit pkgs; }); + }; } ]; mkLinuxSystem = extraModules: nixpkgs.lib.nixosSystem { @@ -115,7 +125,6 @@ ./features/caches/oss.nix home-manager.darwinModules.home-manager { - # TODO: Refactor-DRY with Linux's home.nix home-manager.extraSpecialArgs = { inherit system inputs; }; home-manager.users.srid = { pkgs, ... }: { imports = [ diff --git a/home.nix b/home.nix deleted file mode 100644 index 86862cd..0000000 --- a/home.nix +++ /dev/null @@ -1,42 +0,0 @@ -# Linux only. TODO: Will want to consolidate with macOS. -{ pkgs, inputs, system, ... }: -rec { - imports = [ - ./home/tmux.nix - ./home/git.nix - ./home/neovim.nix - ./home/starship.nix - ./home/terminal.nix - ./home/direnv.nix - ]; - - home.packages = with pkgs; [ - gnumake - psmisc - lsof - # psutils -- collides with tex - usbutils - ghcid - - cachix - tig - procs # no more: ps -ef | grep - unzip - ripgrep - htop - ]; - - programs.bash = { - enable = true; - } // (import ./home/shellcommon.nix { inherit pkgs; }); - - # This value determines the Home Manager release that your - # configuration is compatible with. This helps avoid breakage - # when a new Home Manager release introduces backwards - # incompatible changes. - # - # You can update Home Manager without changing this value. See - # the Home Manager release notes for a list of state version - # changes in each release. - # home.stateVersion = "21.03"; -} diff --git a/home/git.nix b/home/git.nix index 2c033dc..20f969f 100644 --- a/home/git.nix +++ b/home/git.nix @@ -1,6 +1,8 @@ +{ pkgs, ... }: { + home.packages = [ pkgs.tig ]; programs.git = { - # package = pkgs.gitAndTools.gitFull; + package = pkgs.gitAndTools.gitFull; enable = true; userName = "Sridhar Ratnakumar"; userEmail = "srid@srid.ca"; diff --git a/home/terminal.nix b/home/terminal.nix index f125d50..002eec0 100644 --- a/home/terminal.nix +++ b/home/terminal.nix @@ -1,4 +1,16 @@ +{ pkgs, ... }: { + # Key packages required on nixos and macos + home.packages = with pkgs; [ + # Unixy tools + gnumake + ripgrep + htop + + # Haskell dev + ghcid + ]; + programs = { bat.enable = true; autojump.enable = false;