Skip to content

Instantly share code, notes, and snippets.

@infinisil
Created June 5, 2018 18:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save infinisil/cca1d208685c39a3fe0c564b5d63c65b to your computer and use it in GitHub Desktop.
Save infinisil/cca1d208685c39a3fe0c564b5d63c65b to your computer and use it in GitHub Desktop.
with import <nixpkgs/lib>;
let
app = pkgs.callPackage ./default.nix {};
in {
network.description = "whup";
} // listToAttrs (map (n: nameValuePair "agent${toString n}" (
{ pkgs, ... }:
let app = pkgs.callPackage ./default.nix {};
in {
networking.firewall.enable = false;
systemd.services.wallet = {
enable = true;
wantedBy = ["multi-user.target"];
description = "Agent";
after = [ "network-online.target" ];
script=''
${app}/bin/app.py
'';
};
services.openssh.enable = true;
}
)) (range 1 10))
with import <nixpkgs/lib>;
listToAttrs (map (n: nameValuePair "agent${toString n}" {
deployment.targetEnv = "virtualbox";
deployment.virtualbox.headless = true;
}) (range 1 10))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment