configure darwin home-manager

This commit is contained in:
Adithya 2023-06-10 14:07:42 +05:30
parent 6bd6bf2141
commit a3a2efb891
Signed by: adtya
GPG key ID: 48FC9915FFD326D0
6 changed files with 34 additions and 20 deletions

View file

@ -4,7 +4,13 @@
homeDirectory = "/Users/${user.primary.userName}"; homeDirectory = "/Users/${user.primary.userName}";
stateVersion = "23.11"; stateVersion = "23.11";
}; };
programs.home-manager.enable = true; programs = {
home-manager.enable = true;
fzf.enable = true;
lazygit.enable = true;
nix-index.enable = true;
zoxide.enable = true;
};
imports = [./programs/neovim.nix]; imports = [./programs/neovim.nix ./programs/zsh.nix ./programs/tmux.nix ./programs/starship.nix ./programs/exa.nix ./programs/direnv.nix ./programs/bat.nix ./programs/git.nix];
} }

View file

@ -1,4 +1,4 @@
{...}: let {pkgs, ...}: let
user = (import ../../secrets.nix).users; user = (import ../../secrets.nix).users;
in { in {
programs.git = { programs.git = {
@ -6,7 +6,10 @@ in {
diff-so-fancy = { diff-so-fancy = {
enable = true; enable = true;
}; };
userEmail = user.primary.emailAddress; userEmail =
if pkgs.stdenv.isLinux
then user.primary.emailAddress
else user.primary.workEmail;
userName = user.primary.realName; userName = user.primary.realName;
signing = { signing = {
key = user.primary.pgpFingerprint; key = user.primary.pgpFingerprint;

View file

@ -1,9 +1,12 @@
{pkgs, ...}: { {pkgs, ...}: {
xdg.desktopEntries = if pkgs.stdenv.isLinux then { xdg.desktopEntries =
"nvim".name = "Neovim wrapper"; if pkgs.stdenv.isLinux
"nvim".exec = "nvim %F"; then {
"nvim".noDisplay = true; "nvim".name = "Neovim wrapper";
} else {}; "nvim".exec = "nvim %F";
"nvim".noDisplay = true;
}
else {};
programs.neovim = { programs.neovim = {
enable = true; enable = true;
viAlias = true; viAlias = true;

View file

@ -17,19 +17,24 @@
initExtra = '' initExtra = ''
bindkey -v '^?' backward-delete-char bindkey -v '^?' backward-delete-char
''; '';
profileExtra = '' profileExtra =
if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ] ; then if pkgs.stdenv.isLinux
exec ${pkgs.hyprland}/bin/Hyprland then ''
fi if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ] ; then
''; exec ${pkgs.hyprland}/bin/Hyprland
fi
''
else "";
shellAliases = { shellAliases = {
cat = "bat"; cat = "bat";
cd = "z";
cp = "cp -v"; cp = "cp -v";
grep = "grep --color=auto"; grep = "grep --color=auto";
ln = "ln -v"; ln = "ln -v";
mv = "mv -v"; mv = "mv -v";
rebuild_system = "sudo nixos-rebuild --flake /persist/home/.nixos-config#Skipper --cores 0"; rebuild_system =
if pkgs.stdenv.isLinux
then "sudo nixos-rebuild --flake /persist/home/.nixos-config#Skipper --cores 0"
else "home-manager --flake /Users/adtya/Projects/nixos-config#adtya@Alex --cores 0";
}; };
}; };
} }

View file

@ -1,7 +1,4 @@
{ {pkgs, ...}: {
pkgs,
...
}: {
programs.waybar = { programs.waybar = {
enable = true; enable = true;
package = pkgs.waybar.overrideAttrs (oldAttrs: { package = pkgs.waybar.overrideAttrs (oldAttrs: {

Binary file not shown.