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}";
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;
in {
programs.git = {
@ -6,7 +6,10 @@ in {
diff-so-fancy = {
enable = true;
};
userEmail = user.primary.emailAddress;
userEmail =
if pkgs.stdenv.isLinux
then user.primary.emailAddress
else user.primary.workEmail;
userName = user.primary.realName;
signing = {
key = user.primary.pgpFingerprint;

View file

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

View file

@ -17,19 +17,24 @@
initExtra = ''
bindkey -v '^?' backward-delete-char
'';
profileExtra = ''
if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ] ; then
exec ${pkgs.hyprland}/bin/Hyprland
fi
'';
profileExtra =
if pkgs.stdenv.isLinux
then ''
if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ] ; then
exec ${pkgs.hyprland}/bin/Hyprland
fi
''
else "";
shellAliases = {
cat = "bat";
cd = "z";
cp = "cp -v";
grep = "grep --color=auto";
ln = "ln -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 = {
enable = true;
package = pkgs.waybar.overrideAttrs (oldAttrs: {

Binary file not shown.