Support for nix home-manager
This commit is contained in:
35
nix/home.nix
Normal file
35
nix/home.nix
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
# Home Manager needs a bit of information about you and the
|
||||||
|
# paths it should manage.
|
||||||
|
home.username = "ttm";
|
||||||
|
home.homeDirectory = builtins.getEnv "HOME";
|
||||||
|
|
||||||
|
# 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 can update Home Manager without changing this value. See
|
||||||
|
# the Home Manager release notes for a list of state version
|
||||||
|
# changes in each release.
|
||||||
|
home.stateVersion = "22.05";
|
||||||
|
|
||||||
|
# Let Home Manager install and manage itself.
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
zoxide
|
||||||
|
fd
|
||||||
|
fzf
|
||||||
|
ncdu
|
||||||
|
ripgrep
|
||||||
|
# kitty
|
||||||
|
git
|
||||||
|
direnv
|
||||||
|
leiningen
|
||||||
|
];
|
||||||
|
|
||||||
|
services.lorri.enable = true;
|
||||||
|
}
|
||||||
@@ -3,10 +3,17 @@ from xonsh.platform import ON_DARWIN
|
|||||||
# Nix integration
|
# Nix integration
|
||||||
nix_daemon_path = p"/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh"
|
nix_daemon_path = p"/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh"
|
||||||
if nix_daemon_path.exists():
|
if nix_daemon_path.exists():
|
||||||
source-bash @(nix_daemon_path)
|
source-bash --suppress-skip-message @(nix_daemon_path)
|
||||||
|
|
||||||
# Nix-darwin integration
|
# Nix-darwin integration
|
||||||
if ON_DARWIN:
|
if ON_DARWIN:
|
||||||
nix_darwin_path = p"/etc/static/bashrc"
|
nix_darwin_path = p"/etc/static/bashrc"
|
||||||
if nix_darwin_path.exists():
|
if nix_darwin_path.exists():
|
||||||
source-bash @(nix_darwin_path)
|
source-bash @(nix_darwin_path)
|
||||||
|
|
||||||
|
$NIX_PATH="$HOME/.nix-defexpr/channels:/nix/var/nix/profiles/per-user/root/channels"
|
||||||
|
|
||||||
|
# Home Manager
|
||||||
|
home_manager_shell_path = p"$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"
|
||||||
|
if home_manager_shell_path.exists():
|
||||||
|
source-bash --suppress-skip-message @(home_manager_shell_path)
|
||||||
|
|||||||
Reference in New Issue
Block a user