diff options
author | sefidel <contact@sefidel.net> | 2022-09-09 17:49:03 +0900 |
---|---|---|
committer | sefidel <contact@sefidel.net> | 2022-09-09 21:32:31 +0900 |
commit | 9e6145c031b47fc37398b80dec1b4dfc0cfb5183 (patch) | |
tree | f27e3c50a0c25223931e7057616e456432007de9 /home/profiles/base-darwin/default.nix | |
parent | 9e311725d4f6c68284e3999c01735ebe3665a14d (diff) | |
download | nixrc-9e6145c031b47fc37398b80dec1b4dfc0cfb5183.tar.gz nixrc-9e6145c031b47fc37398b80dec1b4dfc0cfb5183.zip |
milestone: darwin!
feat(darwin/kompakt)!: support darwin chore: reformat feat(home/o32): manage neovim feat(home/development): fix haskell lsp version mismatch feat(darwin/*): stabilise
Diffstat (limited to 'home/profiles/base-darwin/default.nix')
-rw-r--r-- | home/profiles/base-darwin/default.nix | 160 |
1 files changed, 160 insertions, 0 deletions
diff --git a/home/profiles/base-darwin/default.nix b/home/profiles/base-darwin/default.nix new file mode 100644 index 0000000..63454bd --- /dev/null +++ b/home/profiles/base-darwin/default.nix @@ -0,0 +1,160 @@ +{ config, lib, inputs, pkgs, self, ... }: +let + cfg = config.profiles.base-darwin; + + inherit (self.packages.aarch64-darwin) neovim; +in +{ + imports = [ + ../../modules/programs/nixpkgs + ../../modules/programs/zshell + ]; + + options.profiles.base-darwin.enable = lib.mkEnableOption + "The base profile, contains general configurations. (Darwin)"; + + config = lib.mkIf cfg.enable { + home.sessionVariables = rec { + # NIXOS_OZONE_WL = 1; # FIXME: interface 'wl_output' has no event 4 + EDITOR = "nvim"; + VISUAL = "nvim"; + GIT_EDITOR = EDITOR; + }; + + home.packages = [ + # Nix Tools + pkgs.nix-index + pkgs.nix-tree + pkgs.nix-top + pkgs.nix-update + pkgs.hydra-check + + pkgs.aria2 + pkgs.bottom + pkgs.fd + pkgs.fzf + pkgs.iterm2 + pkgs.libnotify + pkgs.procs + pkgs.sops + pkgs.tree + pkgs.pinentry_mac + + neovim + + # Common build tools + (pkgs.rust-bin.selectLatestNightlyWith (toolchain: toolchain.default)) + pkgs.go + pkgs.gcc + ]; + + + programs = { + direnv.enable = true; + direnv.nix-direnv.enable = true; + exa.enable = true; + exa.enableAliases = true; + gpg.enable = true; + gpg.settings.keyserver = "keys.openpgp.org"; + home-manager.enable = true; + htop.enable = true; + + tmux = { + enable = true; + + prefix = "C-f"; + terminal = "xterm-256color"; + shell = "${pkgs.zsh}/bin/zsh"; + baseIndex = 1; + keyMode = "vi"; + + escapeTime = 0; + + extraConfig = import ./config/tmux.nix; + + }; + zsh = { + enable = true; + + enableCompletion = true; + enableAutosuggestions = true; + + autocd = true; + + dotDir = ".config/zsh"; + + plugins = [ + { + name = "powerlevel10k"; + src = pkgs.zsh-powerlevel10k; + file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme"; + } + + { + name = "powerlevel10k-config"; + src = lib.cleanSource ./p10k-config; + file = "p10k.zsh"; + } + + { + name = "zsh-syntax-highlighting"; + src = pkgs.fetchFromGitHub { + owner = "zsh-users"; + repo = "zsh-syntax-highlighting"; + rev = "0.7.1"; + sha256 = "03r6hpb5fy4yaakqm3lbf4xcvd408r44jgpv4lnzl9asp4sb9qc0"; + }; + } + ]; + + shellAliases = config.programs.zshell.aliases; + }; + + zshell.aliases = { + e = "nvim"; + nvimdiff = "nvim -d"; + }; + + zoxide = { + enable = true; + enableZshIntegration = true; + }; + + # TODO: https://github.com/zellij-org/zellij/issues/1013 + # zellij = { + # enable = true; + # + # settings = { + # default_mode = "normal"; + # pane_frames = false; + # simplified_ui = true; # bitmap fonts + # + # themes = { + # default = { + # # Industrial Jellybeans theme + # bg = [ 21 21 21 ]; + # fg = [ 136 136 136 ]; + # black = [ 28 28 28 ]; + # gray = [ 64 64 64 ]; + # white = [ 232 232 211 ]; + # red = [ 141 61 38 ]; + # orange = [ 250 187 110 ]; + # yellow = [ 250 208 122 ]; + # green = [ 153 173 106 ]; + # blue = [ 129 151 191 ]; + # cyan = [ 143 191 220 ]; + # magenta = [ 198 182 238 ]; + # }; + # }; + # }; + # }; + }; + + home.file."${config.programs.gpg.homedir}/gpg-agent.conf".text = '' + default-cache-ttl 3600 + default-cache-ttl-ssh 3600 + pinentry-program ${pkgs.pinentry_mac}/Applications/pinentry-mac.app/Contents/MacOS/pinentry-mac + allow-preset-passphrase + ''; + }; +} |