Get the demo running an intake server
This commit is contained in:
parent
a0e3328555
commit
a2a14d26b4
@ -52,7 +52,7 @@
|
||||
modules = [
|
||||
nixos-shell.nixosModules.nixos-shell
|
||||
self.nixosModules.intake
|
||||
./tests/demo.nix
|
||||
(import ./tests/demo.nix self)
|
||||
];
|
||||
};
|
||||
};
|
||||
|
@ -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";
|
||||
|
||||
nixos-shell.mounts = {
|
||||
@ -9,6 +18,19 @@
|
||||
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.virtualHosts = {
|
||||
alpha-fsid = {
|
||||
|
Loading…
Reference in New Issue
Block a user