This repository has been archived on 2025-11-24. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
home-manager-config/home.nix
John Ogle 16e0da2028 Add PATH setup back
Actually I realized this is necessary. Because I'm testing this out on
an arch system that has emacs installed at the system level it was
building doom using the system emacs instead of the nix emacs
2024-07-20 18:18:43 -07:00

226 lines
5.4 KiB
Nix

{ config, pkgs, lib, ... }:
with import <nixpkgs> {};
{
# Home Manager needs a bit of information about you and the paths it should
# manage.
home.username = "johno";
home.homeDirectory = "/home/johno";
# This value determines the Home Manager release that your configuration is
# compatible with. This helps avoid breakage when a new Home Manager release
# introduces backwards incompatible changes.
#
# You should not change this value, even if you update Home Manager. If you do
# want to update the value, then make sure to first check the Home Manager
# release notes.
home.stateVersion = "24.05"; # Please read the comment before changing.
# The home.packages option allows you to install Nix packages into your
# environment.
home.packages = [
# # Adds the 'hello' command to your environment. It prints a friendly
# # "Hello, world!" when run.
# pkgs.hello
# # It is sometimes useful to fine-tune packages, for example, by applying
# # overrides. You can do that directly here, just don't forget the
# # parentheses. Maybe you want to install Nerd Fonts with a limited number of
# # fonts?
# (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
# # You can also create simple shell scripts directly inside your
# # configuration. For example, this adds a command 'my-hello' to your
# # environment:
# (pkgs.writeShellScriptBin "my-hello" ''
# echo "Hello, ${config.home.username}!"
# '')
pkgs.bitwarden
pkgs.element-desktop
pkgs.emacs-all-the-icons-fonts
pkgs.fd
pkgs.fluffychat
pkgs.fontconfig
pkgs.graphviz
pkgs.htop
pkgs.jellyfin-media-player
pkgs.less
pkgs.isort
pkgs.ncdu
pkgs.nerdfonts
pkgs.nil # nix lsp language server
pkgs.nixfmt-rfc-style
pkgs.pandoc
pkgs.pinentry-qt
pkgs.pipenv
pkgs.poetry
pkgs.python3
#pkgs.pytest
(pkgs.ripgrep.override {withPCRE2 = true;})
pkgs.shellcheck
pkgs.tmux
pkgs.vlc
];
fonts.fontconfig.enable = true;
# Home Manager is pretty good at managing dotfiles. The primary way to manage
# plain files is through 'home.file'.
home.file = {
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
# # symlink to the Nix store copy.
# ".screenrc".source = dotfiles/screenrc;
# # You can also set the file content immediately.
# ".gradle/gradle.properties".text = ''
# org.gradle.console=verbose
# org.gradle.daemon.idletimeout=3600000
# '';
".config/emacs" = {
source = fetchGit {
url = "https://github.com/doomemacs/doomemacs.git";
rev = "36e7aaa619342eff61b1daf3ac664f94d5272db7";
};
recursive = true;
};
};
home.activation.doomSync = lib.hm.dag.entryAfter [ "writeBoundary" ] (let
emacs = pkgs.emacs;
in ''
export PATH=${emacs}/bin:$PATH
${config.xdg.configHome}/emacs/bin/doom sync -u -j $((`nproc`/4*3))
'');
# Home Manager can also manage your environment variables through
# 'home.sessionVariables'. These will be explicitly sourced when using a
# shell provided by Home Manager. If you don't want to manage your shell
# through Home Manager then you have to manually source 'hm-session-vars.sh'
# located at either
#
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
#
# or
#
# ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
#
# or
#
# /etc/profiles/per-user/johno/etc/profile.d/hm-session-vars.sh
#
home.sessionVariables = {
DOOMLOCALDIR = "${config.xdg.dataHome}/doom";
EDITOR = "emacs -nw";
};
home.sessionPath = [
"${config.xdg.configHome}/emacs/bin"
];
programs.bash.enable = true;
nix = {
gc = {
automatic = true;
};
};
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
programs.command-not-found.enable = true;
programs.emacs = {
enable = true;
package = pkgs.emacs;
};
programs.firefox = {
enable = true;
};
programs.git = {
enable = true;
userName = "John Ogle";
userEmail = "john@ogle.fyi";
};
programs.gpg.enable = true;
services.gpg-agent = {
enable = true;
enableSshSupport = true;
defaultCacheTtl = 1800;
pinentryPackage = pkgs.pinentry-qt;
};
programs.jq.enable = true;
programs.k9s.enable = true;
programs.neovim = {
enable = true;
viAlias = true;
vimAlias = true;
};
programs.rbw = {
enable = true;
settings = {
email = "john@johnogle.info";
base_url = "https://bitwarden.johnogle.info";
pinentry = pkgs.pinentry-qt;
};
};
programs.spotify-player.enable = true;
programs.ssh = {
enable = true;
addKeysToAgent = "yes";
matchBlocks = {
"nucdeb1" = {
hostname = "nucdeb1.oglehome";
user = "root";
};
};
};
services.home-manager.autoUpgrade = {
enable = true;
frequency = "weekly";
};
services.kdeconnect = {
enable = true;
indicator = true;
};
services.spotifyd = {
enable = true;
settings = {
global = {
username = "johnogle222";
};
};
};
services.syncthing = {
enable = true;
tray = {
enable = true;
package = pkgs.qsyncthingtray;
command = "qsyncthingtray --wait";
};
};
xdg = {
enable = true;
configFile."doom".source = ./doom;
};
}