gitPath added

This commit is contained in:
get 2024-04-12 14:33:18 +02:00
commit daf33ba294
3 changed files with 10 additions and 1 deletions

View file

@ -7,6 +7,9 @@
programs.kdeconnect.enable = true; programs.kdeconnect.enable = true;
myOptions = { myOptions = {
other = { other = {
system = {
gitPath = "/home/lars/nichts";
};
home-manager = { home-manager = {
enable = true; enable = true;
enableDirenv = true; enableDirenv = true;

View file

@ -2,6 +2,7 @@
with lib; let with lib; let
cfg = config.myOptions.programs.zsh; cfg = config.myOptions.programs.zsh;
username = config.myOptions.other.system.username; username = config.myOptions.other.system.username;
gitPath = config.myOptions.other.system.gitPath;
in { in {
options.myOptions.programs.zsh = { options.myOptions.programs.zsh = {
enable = mkEnableOption "zsh"; enable = mkEnableOption "zsh";
@ -54,7 +55,7 @@ in {
cd = "z"; cd = "z";
nv = "nvim"; nv = "nvim";
#TODO fix hardcoding of git repo path and profile name #TODO fix hardcoding of git repo path and profile name
update = "sudo -p 'password: ' echo 'Your daughter is just a fork of your wife.' && sudo nixos-rebuild switch --flake \"$HOME/nichts#${config.myOptions.other.system.hostname}\" --log-format internal-json |& nom --json"; update = "sudo -p 'password: ' echo 'Your daughter is just a fork of your wife.' && sudo nixos-rebuild switch --flake \"${gitPath}#${config.myOptions.other.system.hostname}\" --log-format internal-json |& nom --json";
} // cfg.extraAliases; } // cfg.extraAliases;
initExtraFirst = mkIf cfg.profiling "zmodload zsh/zprof"; initExtraFirst = mkIf cfg.profiling "zmodload zsh/zprof";

View file

@ -15,6 +15,11 @@ in {
description = "username for this system"; description = "username for this system";
type = types.str; type = types.str;
}; };
gitPath = mkOption {
description = "path to the flake directory";
type = types.str;
};
}; };
config = { config = {