From a3a2efb8913d75c722b7b73cfd9e23201e05bd52 Mon Sep 17 00:00:00 2001 From: Adithya Nair Date: Sat, 10 Jun 2023 14:07:42 +0530 Subject: [PATCH] configure darwin home-manager --- home/darwin.nix | 10 ++++++++-- home/programs/git.nix | 7 +++++-- home/programs/neovim.nix | 13 ++++++++----- home/programs/zsh.nix | 19 ++++++++++++------- home/wm/addon/waybar/default.nix | 5 +---- secrets.nix | Bin 1425 -> 1476 bytes 6 files changed, 34 insertions(+), 20 deletions(-) diff --git a/home/darwin.nix b/home/darwin.nix index bb537e2..ece66f8 100644 --- a/home/darwin.nix +++ b/home/darwin.nix @@ -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]; } diff --git a/home/programs/git.nix b/home/programs/git.nix index ff25c73..b4a642b 100644 --- a/home/programs/git.nix +++ b/home/programs/git.nix @@ -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; diff --git a/home/programs/neovim.nix b/home/programs/neovim.nix index f0c00ec..30623a3 100644 --- a/home/programs/neovim.nix +++ b/home/programs/neovim.nix @@ -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; diff --git a/home/programs/zsh.nix b/home/programs/zsh.nix index 291b139..183d8af 100644 --- a/home/programs/zsh.nix +++ b/home/programs/zsh.nix @@ -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"; }; }; } diff --git a/home/wm/addon/waybar/default.nix b/home/wm/addon/waybar/default.nix index 4422934..f19b738 100644 --- a/home/wm/addon/waybar/default.nix +++ b/home/wm/addon/waybar/default.nix @@ -1,7 +1,4 @@ -{ - pkgs, - ... -}: { +{pkgs, ...}: { programs.waybar = { enable = true; package = pkgs.waybar.overrideAttrs (oldAttrs: { diff --git a/secrets.nix b/secrets.nix index 422aa588aed6c6818f3886f8b93051c19ec91fab..ad537c4a30259712d2c984e3b1242113639f6594 100644 GIT binary patch literal 1476 zcmV;#1v~lxM@dveQdv+`0McM)9igQ{oFHer7mp{1Mqq8(b%Gj{d{rq~;srVvjx(e5WREFiN<$NkzfPL=@68l% zfeCo$h;7|JSS()mfvg@2a2s!}hQaFy{?T=+d7~vCe#Lq4e(v6L;hvO0Ow2K>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