Skip to content

Commit 176764e

Browse files
committed
renamed ssh-deploy.nix and removed anything that is not a option.
1 parent 0c0ed5d commit 176764e

3 files changed

Lines changed: 69 additions & 280 deletions

File tree

flake.nix

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@
4141
./nixos-modules/nodes.nix
4242
./nixos-modules/nomad.nix
4343
./nixos-modules/users.nix
44-
(import ./nixos-modules/ssh-deploy.nix {
45-
inherit microvm nixpkgs;
46-
})
44+
./nixos-modules/ssh-deployOptions.nix
4745
{
4846
nixpkgs.overlays = [
4947
nix-cache-cut.overlays.default

nixos-modules/ssh-deploy.nix

Lines changed: 0 additions & 277 deletions
This file was deleted.
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
{ config, lib, ... }:
2+
{
3+
options.skyflake = with lib; {
4+
deploy = {
5+
datacenters = mkOption {
6+
type = with types; listOf str;
7+
default = [ config.skyflake.nomad.datacenter ];
8+
description = ''
9+
List of datacenters to deploy to.
10+
'';
11+
};
12+
13+
binaryCachePath = mkOption {
14+
type = types.str;
15+
default = "/var/lib/skyflake/binary-cache";
16+
description = ''
17+
Directory which is mounted on all nodes that will be used to
18+
share the /nix/store with MicroVMs.
19+
'';
20+
};
21+
22+
sharedGcrootsPath = mkOption {
23+
type = types.str;
24+
default = "/nix/var/nix/gcroots/skyflake";
25+
description = ''
26+
Directory which is mounted on all nodes, is linked from
27+
/nix/var/nix/gcroots/, and contains links to all currently
28+
required microvms.
29+
'';
30+
};
31+
32+
customizationModule = mkOption {
33+
type = types.path;
34+
default = ../default-customization.nix;
35+
description = ''
36+
NixOS module to add when extending a guest NixOS configuration
37+
with MicroVM settings.
38+
'';
39+
};
40+
};
41+
42+
gc = {
43+
cron = mkOption {
44+
type = types.str;
45+
default = "@hourly";
46+
description = lib.mdDoc ''
47+
See `cron` in https://developer.hashicorp.com/nomad/docs/job-specification/periodic#periodic-parameters
48+
'';
49+
};
50+
};
51+
52+
microvmUid = mkOption {
53+
type = types.int;
54+
default = 999;
55+
description = ''
56+
A fixed UID for MicroVM files makes sense for the whole cluster.
57+
'';
58+
};
59+
60+
debug = mkOption {
61+
type = types.bool;
62+
default = false;
63+
description = ''
64+
Enable debug output. Do not use in production!
65+
'';
66+
};
67+
};
68+
}

0 commit comments

Comments
 (0)