diff --git a/Droidnix/README.org b/Droidnix/README.org index 63b05e0cd..d43ecb81c 100644 --- a/Droidnix/README.org +++ b/Droidnix/README.org @@ -290,7 +290,7 @@ let ################################# # Read package list from config file ################################# - packagesConfPath = "${flakeRoot}/generated/.config/packages.conf"; + packagesConfPath = "${flakeRoot}/generated/assets/packages.conf"; raw = builtins.readFile packagesConfPath; rawLines = lib.splitString "\n" raw; @@ -341,9 +341,9 @@ in { } #+END_SRC -** =generated/assets/apps/packages.conf= +** =generated/assets/packages.conf= This is a list of additional apps to install -#+BEGIN_SRC conf :tangle generated/assets/apps/packages.conf :noweb tangle :mkdirp yes :eval never-html +#+BEGIN_SRC conf :tangle generated/assets/packages.conf :noweb tangle :mkdirp yes :eval never-html #productivity todoist @@ -1111,10 +1111,10 @@ in ** =generated/modules/traveldroid/apps/zsh.nix= This sets up the zsh in the terminal #+BEGIN_SRC nix :tangle generated/modules/traveldroid/apps/zsh.nix :noweb tangle :mkdirp yes :eval never-html -{ config, pkgs, lib, flakeRoot, ... }: +{ config, pkgs, lib, ... }: let - generatedZsh = "${flakeRoot}/generated/.config/zsh/.zshrc"; + generatedZsh = "${config.home.file.".config/zsh/.zshrc".source}"; in { programs.zsh = { @@ -1138,18 +1138,15 @@ in autosuggestions.enable = true; syntaxHighlighting.enable = true; - - # Use initExtra instead of non-existent extraConfig - initExtra = '' - # Tell Zsh to use ~/.config/zsh as main config dir - export ZDOTDIR="$HOME/.config/zsh" - - # Source generated .zshrc if it exists - if [ -f "${generatedZsh}" ]; then - source "${generatedZsh}" - fi - ''; }; + + # Set ZDOTDIR globally in the user environment + home.sessionVariables = { + ZDOTDIR = "${config.home.homeDirectory}/.config/zsh"; + }; + + # Place the generated .zshrc file there + home.file.".config/zsh/.zshrc".source = generatedZsh; } #+END_SRC diff --git a/Droidnix/generated/assets/apps/packages.conf b/Droidnix/generated/assets/packages.conf similarity index 100% rename from Droidnix/generated/assets/apps/packages.conf rename to Droidnix/generated/assets/packages.conf diff --git a/Droidnix/generated/modules/traveldroid/apps/packages.nix b/Droidnix/generated/modules/traveldroid/apps/packages.nix index 2108a9698..a0dcf5032 100644 --- a/Droidnix/generated/modules/traveldroid/apps/packages.nix +++ b/Droidnix/generated/modules/traveldroid/apps/packages.nix @@ -4,7 +4,7 @@ let ################################# # Read package list from config file ################################# - packagesConfPath = "${flakeRoot}/generated/.config/packages.conf"; + packagesConfPath = "${flakeRoot}/generated/assets/packages.conf"; raw = builtins.readFile packagesConfPath; rawLines = lib.splitString "\n" raw; diff --git a/Droidnix/generated/modules/traveldroid/apps/zsh.nix b/Droidnix/generated/modules/traveldroid/apps/zsh.nix index a1362a280..35f0befec 100644 --- a/Droidnix/generated/modules/traveldroid/apps/zsh.nix +++ b/Droidnix/generated/modules/traveldroid/apps/zsh.nix @@ -1,7 +1,7 @@ -{ config, pkgs, lib, flakeRoot, ... }: +{ config, pkgs, lib, ... }: let - generatedZsh = "${flakeRoot}/generated/.config/zsh/.zshrc"; + generatedZsh = "${config.home.file.".config/zsh/.zshrc".source}"; in { programs.zsh = { @@ -25,16 +25,13 @@ in autosuggestions.enable = true; syntaxHighlighting.enable = true; - - # Use initExtra instead of non-existent extraConfig - initExtra = '' - # Tell Zsh to use ~/.config/zsh as main config dir - export ZDOTDIR="$HOME/.config/zsh" - - # Source generated .zshrc if it exists - if [ -f "${generatedZsh}" ]; then - source "${generatedZsh}" - fi - ''; }; + + # Set ZDOTDIR globally in the user environment + home.sessionVariables = { + ZDOTDIR = "${config.home.homeDirectory}/.config/zsh"; + }; + + # Place the generated .zshrc file there + home.file.".config/zsh/.zshrc".source = generatedZsh; }