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, ... }: { config, pkgs, ... }:
{ {
home-manager.users.yoda = { home-manager.users.yoda = { pkgs, ... }: {
# Git config using Home Manager modules # Git config using Home Manager modules
programs.git = { programs.git = {

View File

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

View File

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