Get the demo running an intake server

This commit is contained in:
Tim Van Baak 2023-06-05 16:58:27 -07:00
parent a0e3328555
commit a2a14d26b4
2 changed files with 25 additions and 3 deletions

View File

@ -52,7 +52,7 @@
modules = [ modules = [
nixos-shell.nixosModules.nixos-shell nixos-shell.nixosModules.nixos-shell
self.nixosModules.intake self.nixosModules.intake
./tests/demo.nix (import ./tests/demo.nix self)
]; ];
}; };
}; };

View File

@ -1,6 +1,15 @@
{ pkgs, ... }: flake: { pkgs, ... }:
{ let
intake = flake.packages.${pkgs.stdenv.hostPlatform.system}.default;
pythonPkg = pkgs.python38;
pythonEnv = pythonPkg.withPackages (pypkgs: [ intake ]);
intakeRun = pkgs.writeShellScript "intake-run.sh" ''
${pythonEnv}/bin/intake run -d /home/alpha/.local/share/intake
'';
in {
system.stateVersion = "22.11"; system.stateVersion = "22.11";
nixos-shell.mounts = { nixos-shell.mounts = {
@ -9,6 +18,19 @@
cache = "none"; cache = "none";
}; };
systemd.services."intake@alpha" = {
description = "Intake service for user alpha";
script = "${intakeRun}";
path = [ ];
serviceConfig = {
User = "alpha";
Type = "simple";
};
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
enable = true;
};
services.nginx.enable = true; services.nginx.enable = true;
services.nginx.virtualHosts = { services.nginx.virtualHosts = {
alpha-fsid = { alpha-fsid = {