use Home Manager config variable

This commit is contained in:
Daniel Langbein 2023-09-05 17:56:38 +02:00
parent 586da8b739
commit 795c37d632
3 changed files with 8 additions and 7 deletions

View File

@ -1,7 +1,7 @@
{ config, pkgs, ... }:
{
home-manager.users.yoda = {
home-manager.users.yoda = { pkgs, ... }: {
# Git config using Home Manager modules
programs.git = {

View File

@ -1,7 +1,7 @@
{ config, pkgs, ... }:
{
home-manager.users.yoda = {
home-manager.users.yoda = { pkgs, ... }: {
programs.ssh = {
enable = true;

View File

@ -1,7 +1,9 @@
{ config, pkgs, ... }:
{
home-manager.users.yoda = {
# Inside the following Home Manager configuration block,
# `config` refers to Home Manager configuration.
home-manager.users.yoda = { osConfig, config, pkgs, ... }: {
programs.zsh = {
enable = true;
@ -13,10 +15,9 @@
history.ignoreDups = true;
#history.ignoreAllDups = true;
# TODO:
# Currently, `config` is my NixOS config. However, I want to access Home Manager's `config`.
# I could change home-manager.users.yoda to be a function and take config as an argument there.
#history.path = "${config.xdg.dataHome}/.histfile";
# nix-repl: config.home-manager.users.yoda.programs.zsh.history.path
# -> /home/yoda/.local/share/.histfile
history.path = "${config.xdg.dataHome}/.histfile";
oh-my-zsh = {
enable = true;