From 07f84bb581e369ff79100f0417e9d277f3c1fb61 Mon Sep 17 00:00:00 2001 From: Jasper Ras Date: Wed, 12 Feb 2025 08:19:04 +0100 Subject: alot of stuff --- modules/home-manager/hostnet.nix | 55 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 modules/home-manager/hostnet.nix (limited to 'modules/home-manager/hostnet.nix') diff --git a/modules/home-manager/hostnet.nix b/modules/home-manager/hostnet.nix new file mode 100644 index 0000000..b8f6418 --- /dev/null +++ b/modules/home-manager/hostnet.nix @@ -0,0 +1,55 @@ +{ config, pkgs, ... }: +let + nodePkgs = pkgs.nodePackages; + homeDir = "${config.home.homeDirectory}"; + llamaDir = "${homeDir}/.llama"; + apache2Dir = "${homeDir}/.apache2"; + httpd = "${pkgs.apacheHttpd}/bin/httpd"; +in { + home.packages = [ + pkgs.pre-commit + nodePkgs.webpack + nodePkgs.webpack-cli + + (pkgs.writeShellScriptBin "use-toolbox" '' + source ${config.home.homeDirectory}/projects/toolbox/var/bootstrap.zsh + '') + ]; + + programs = { + rbenv = { + enable = true; + enableZshIntegration = true; + plugins = [{ + name = "ruby-build"; + src = pkgs.fetchFromGitHub { + owner = "rbenv"; + repo = "ruby-build"; + rev = "v20230717"; + hash = "sha256-kvdANiz9R5pQMTBRHvxC5bfBewIhXc+sgRbe7V2rVU8="; + }; + }]; + }; + }; + + systemd.user.services.llama = { + Unit.Description = "Hostnet Apache LLama"; + Service = { + ExecStartPre = "${llamaDir}/se-vhosts.sh"; + ExecStart = "${httpd} -f ${llamaDir}/apache2.conf -DFOREGROUND"; + RestartSec = "2"; + Restart = "always"; + Environment = [ + "APACHE_RUN_DIR=${apache2Dir}" + "APACHE_CONFDIR=${llamaDir}" + "APACHE_RUN_USER=${config.home.username}" + "APACHE_RUN_GROUP=${config.home.username}" + "APACHE_PID_FILE=${homeDir}/.apache2.pid" + "APACHE_RUN_FILE=${apache2Dir}/run" + "APACHE_LOCK_FILE=${apache2Dir}/lock" + "APACHE_LOG_FILE=${apache2Dir}/log" + ]; + }; + Install.WantedBy = [ "default.target" ]; + }; +} -- cgit v1.2.3