Fix path to profile dir when using as nixos submodule
This commit is contained in:
parent
13b6955460
commit
3c6f3c29d6
|
@ -6,6 +6,8 @@ let
|
|||
|
||||
cfg = config.programs.bash;
|
||||
|
||||
profileDir = if config.nixosSubmodule then "${config.home.path}" else "$HOME/.nix-profile";
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
|
@ -183,7 +185,7 @@ in
|
|||
home.file.".profile".text = ''
|
||||
# -*- mode: sh -*-
|
||||
|
||||
. "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"
|
||||
. "${profileDir}/etc/profile.d/hm-session-vars.sh"
|
||||
|
||||
${sessionVarsStr}
|
||||
|
||||
|
|
|
@ -28,8 +28,10 @@ let
|
|||
|
||||
dag = config.lib.dag;
|
||||
|
||||
profileDir = if config.nixosSubmodule then "${config.home.path}" else "$HOME/.nix-profile";
|
||||
|
||||
# Indexes info files found in this location
|
||||
homeInfoPath = "$HOME/.nix-profile/share/info";
|
||||
homeInfoPath = "${profileDir}/share/info";
|
||||
|
||||
# Installs this package -- the interactive just means that it
|
||||
# includes the curses `info` program. We also use `install-info`
|
||||
|
|
|
@ -19,6 +19,8 @@ let
|
|||
|
||||
zdotdir = "$HOME/" + cfg.dotDir;
|
||||
|
||||
profileDir = if config.nixosSubmodule then "${config.home.path}" else "$HOME/.nix-profile";
|
||||
|
||||
historyModule = types.submodule ({ config, ... }: {
|
||||
options = {
|
||||
size = mkOption {
|
||||
|
@ -302,7 +304,7 @@ in
|
|||
}
|
||||
|
||||
# Environment variables
|
||||
. "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"
|
||||
. "${profileDir}/etc/profile.d/hm-session-vars.sh"
|
||||
${envVarsStr}
|
||||
|
||||
${optionalString cfg.oh-my-zsh.enable ''
|
||||
|
|
|
@ -99,7 +99,7 @@ in
|
|||
|
||||
basePaths = [
|
||||
"/run/current-system/sw"
|
||||
"${config.home.homeDirectory}/.nix-profile"
|
||||
(if config.nixosSubmodule then "${config.home.path}" else "${config.home.homeDirectory}/.nix-profile")
|
||||
cfg.iconTheme.package
|
||||
] ++ optional useCustomTheme hicolorTheme.package;
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ let
|
|||
|
||||
cfg = config.services.flameshot;
|
||||
package = pkgs.flameshot;
|
||||
profileDir = if config.nixosSubmodule then "${config.home.path}" else "%h/.nix-profile";
|
||||
|
||||
in
|
||||
|
||||
|
@ -33,7 +34,7 @@ in
|
|||
};
|
||||
|
||||
Service = {
|
||||
Environment = "PATH=%h/.nix-profile/bin";
|
||||
Environment = "PATH=${profileDir}/bin";
|
||||
ExecStart = "${package}/bin/flameshot";
|
||||
Restart = "on-abort";
|
||||
};
|
||||
|
|
|
@ -2,7 +2,11 @@
|
|||
|
||||
with lib;
|
||||
|
||||
{
|
||||
let
|
||||
|
||||
profileDir = if config.nixosSubmodule then "${config.home.path}" else "%h/.nix-profile";
|
||||
|
||||
in {
|
||||
options = {
|
||||
services.owncloud-client = {
|
||||
enable = mkEnableOption "Owncloud Client";
|
||||
|
@ -18,7 +22,7 @@ with lib;
|
|||
};
|
||||
|
||||
Service = {
|
||||
Environment = "PATH=%h/.nix-profile/bin";
|
||||
Environment = "PATH=${profileDir}/bin";
|
||||
ExecStart = "${pkgs.owncloud-client}/bin/owncloud";
|
||||
};
|
||||
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
|
||||
{
|
||||
profileDir = if config.nixosSubmodule then "${config.home.path}" else "%h/.nix-profile";
|
||||
|
||||
in {
|
||||
meta.maintainers = [ maintainers.rycee ];
|
||||
|
||||
options = {
|
||||
|
@ -54,7 +57,7 @@ with lib;
|
|||
};
|
||||
|
||||
Service = {
|
||||
Environment = "PATH=%h/.nix-profile/bin";
|
||||
Environment = "PATH=${profileDir}/bin";
|
||||
ExecStart = "${pkgs.qsyncthingtray}/bin/QSyncthingTray";
|
||||
};
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ with lib;
|
|||
let
|
||||
|
||||
cfg = config.xsession;
|
||||
profileDir = if config.nixosSubmodule then "${config.home.path}" else "$HOME/.nix-profile";
|
||||
|
||||
in
|
||||
|
||||
|
@ -82,7 +83,7 @@ in
|
|||
};
|
||||
|
||||
home.file.".xprofile".text = ''
|
||||
. "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"
|
||||
. "${profileDir}/etc/profile.d/hm-session-vars.sh"
|
||||
|
||||
if [[ -e "$HOME/.profile" ]]; then
|
||||
. "$HOME/.profile"
|
||||
|
|
Loading…
Reference in a new issue