Switch back to Vim

- Change default editor back to vim since doom-emacs is broken at the
  moment
- Conditionally include emacs or vim nix files in configuration.nix
- User username to find dwm-flexipatch path on system
- Add tree and btop to miscellaneous system packages
- Add some cli tools like just and git to home-manager packages
- Add more XDG env vars for config and cache
This commit is contained in:
Sravan Balaji
2024-03-28 16:26:10 -04:00
parent cf7abb3e89
commit 7acdd41b11
9 changed files with 27 additions and 7 deletions

View File

@@ -39,7 +39,7 @@
theme = "dracula"; # Selected theme from themes directory theme = "dracula"; # Selected theme from themes directory
browser = "vivaldi"; # Default browser browser = "vivaldi"; # Default browser
term = "kitty"; # Default terminal command term = "kitty"; # Default terminal command
editor = "emacsclient"; # Default editor editor = "vim"; # Default editor
spawnEditor = spawnEditor =
if (editor == "emacsclient") then if (editor == "emacsclient") then
"emacsclient -c -a 'emacs'" "emacsclient -c -a 'emacs'"

View File

@@ -12,6 +12,7 @@
imports = [ imports = [
(../../user/browser + "/${userSettings.browser}.nix") (../../user/browser + "/${userSettings.browser}.nix")
../../user/development/default.nix ../../user/development/default.nix
(if userSettings.editor == "emacsclient" then ../../user/development/doom-emacs.nix else (../../user/development + "/${userSettings.editor}.nix"))
../../user/gaming/default.nix ../../user/gaming/default.nix
../../user/launcher/default.nix ../../user/launcher/default.nix
../../user/media/default.nix ../../user/media/default.nix

View File

@@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, userSettings, ... }:
{ {
imports = [ imports = [
@@ -10,7 +10,7 @@
services.xserver.windowManager.dwm = { services.xserver.windowManager.dwm = {
enable = true; enable = true;
package = pkgs.dwm.overrideAttrs { package = pkgs.dwm.overrideAttrs {
src = ~/.config/dwm-flexipatch; src = (/home + "/${userSettings.username}" + /.config/dwm-flexipatch);
buildInputs = with pkgs; [ buildInputs = with pkgs; [
xorg.libX11.dev xorg.libX11.dev
xorg.libXinerama xorg.libXinerama

View File

@@ -10,5 +10,7 @@
rsync rsync
cryptsetup cryptsetup
home-manager home-manager
tree
btop
]; ];
} }

8
user/development/cli.nix Normal file
View File

@@ -0,0 +1,8 @@
{ config, lib, pkgs, ... }:
{
home.packages = (with pkgs; [
git
just
]);
}

View File

@@ -1,8 +1,8 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, userSettings, ... }:
{ {
imports = [ imports = [
./vscode.nix ./vscode.nix
./doom-emacs.nix ./cli.nix
]; ];
} }

View File

@@ -1,8 +1,8 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, userSettings, ... }:
{ {
programs.doom-emacs = { programs.doom-emacs = {
enable = true; enable = true;
doomPrivateDir = ~/.config/doom-emacs-config; doomPrivateDir = (/home + "/${userSettings.username}" + /.config/doom-emacs-config);
}; };
} }

7
user/development/vim.nix Normal file
View File

@@ -0,0 +1,7 @@
{ config, lib, pkgs, ... }:
{
home.packages = (with pkgs; [
vim
]);
}

View File

@@ -15,6 +15,8 @@
publicShare = null; publicShare = null;
extraConfig = { extraConfig = {
XDG_GAME_DIR = "${config.home.homeDirectory}/Games"; XDG_GAME_DIR = "${config.home.homeDirectory}/Games";
XDG_CONFIG_HOME = "${config.home.homeDirectory}/.config";
XDG_CACHE_HOME = "${config.home.homeDirectory}/.cache";
}; };
}; };
xdg.mime.enable = true; xdg.mime.enable = true;