-
Notifications
You must be signed in to change notification settings - Fork 461
/
mk-machine.nix
39 lines (35 loc) · 1.18 KB
/
mk-machine.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{ pkgs, plutus, tfinfo, extraImports ? [ ] }:
# mkMachine :: { config : Path, name : String } -> NixOS machine
# Takes a machine specific configuration and a hostname to set and
# applies generic settings:
# - aws machine settings from ./profiles/std.nix
# - configures root ssh keys for
# - adds plutus specific packages through an overlay
{ config, name }: {
imports = extraImports ++ [
(pkgs.path + "/nixos/modules/virtualisation/amazon-image.nix")
config
({ config, ... }: {
config._module.args.tfinfo = tfinfo;
})
({ lib, config, ... }:
{
networking.hostName = name;
users.extraUsers.root.openssh.authorizedKeys.keys = tfinfo.rootSshKeys;
nixpkgs = {
inherit pkgs;
overlays = [
(self: super: {
plutus-pab = plutus.plutus-pab;
marlowe-dashboard = plutus.marlowe-dashboard;
marlowe-playground = plutus.marlowe-playground;
marlowe-web = plutus.marlowe-web;
plutus-playground = plutus.plutus-playground;
web-ghc = plutus.web-ghc;
plutus-docs = plutus.docs;
})
];
};
})
];
}