Appendix A. All Options

Table of Contents

Skarabox Options
Beacon Options
Flake Module Options

Skarabox Options

skarabox.boot.sshPort

Port the SSH daemon used to decrypt the root partition listens to.

Type: signed integer or string or absolute path

Default: 2222

Declared by:

<skarabox/modules/bootssh.nix>
skarabox.disableNetworkSetup

If set to false, completely disable network setup by Skarabox.

Make sure you can still ssh to the server.

Type: boolean

Default: false

Declared by:

<skarabox/modules/configuration.nix>
skarabox.disks.dataPool

ZFS pool to store important data.

Type: submodule

Declared by:

<skarabox/modules/disks.nix>
skarabox.disks.dataPool.enable

Whether to enable the data pool on other hard drives…

Type: boolean

Default: true

Example: true

Declared by:

<skarabox/modules/disks.nix>
skarabox.disks.dataPool.disk1

First disk on which to install the data pool.

Type: string

Example: "/dev/sda"

Declared by:

<skarabox/modules/disks.nix>
skarabox.disks.dataPool.disk2

Second disk on which to install the data pool.

Type: string

Example: "/dev/sdb"

Declared by:

<skarabox/modules/disks.nix>
skarabox.disks.dataPool.name

Name of the data pool

Type: string

Default: "zdata"

Declared by:

<skarabox/modules/disks.nix>
skarabox.disks.dataPool.reservation

Disk size to reserve for ZFS internals. Should be between 5% and 10% of available size as recorded by zpool.

To get available size on zpool:

zfs get -Hpo value available <pool name>

Then to set manually, if needed:

sudo zfs set reservation=100G <pool name>

Type: string

Example: "1T"

Declared by:

<skarabox/modules/disks.nix>
skarabox.disks.initialBackupDataset

Create the backup dataset.

Type: boolean

Default: true

Declared by:

<skarabox/modules/disks.nix>
skarabox.disks.rootPool

ZFS root pool where the OS is stored.

Type: submodule

Declared by:

<skarabox/modules/disks.nix>
skarabox.disks.rootPool.disk1

SSD disk on which to install. Required

Type: string

Example: "/dev/nvme0n1"

Declared by:

<skarabox/modules/disks.nix>
skarabox.disks.rootPool.disk2

Mirror SSD disk on which to install. Optional. Boot partition will be mirrored too.

Type: null or string

Default: null

Example: "/dev/nvme0n2"

Declared by:

<skarabox/modules/disks.nix>
skarabox.disks.rootPool.name

Name of the root pool

Type: string

Default: "root"

Declared by:

<skarabox/modules/disks.nix>
skarabox.disks.rootPool.reservation

Disk size to reserve for ZFS internals. Should be between 10% and 15% of available size as recorded by zpool.

To get available size on zpool:

zfs get -Hpo value available <pool name>

Then to set manually, if needed:

sudo zfs set reservation=100G <pool name>

Type: string

Example: "100G"

Declared by:

<skarabox/modules/disks.nix>
skarabox.facter-config

nixos-facter config file.

Type: absolute path

Declared by:

<skarabox/modules/configuration.nix>
skarabox.hashedPasswordFile

Contains hashed password for the admin user.

Type: string

Declared by:

<skarabox/modules/configuration.nix>
skarabox.hostId

8 characters unique identifier for this server. Generate with uuidgen | head -c 8.

Type: string or absolute path

Declared by:

<skarabox/modules/configuration.nix>
skarabox.hostname

Hostname to give to the server.

Type: string

Default: "skarabox"

Declared by:

<skarabox/modules/configuration.nix>
skarabox.hotspot.ip

IP address of the beacon in the hotspot network.

Type: string

Default: "192.168.12.1"

Declared by:

<skarabox/modules/hotspot.nix>
skarabox.sshAuthorizedKeyFile

Public SSH key used to connect on boot to decrypt the root pool.

Type: absolute path

Example: "./ssh.pub"

Declared by:

<skarabox/modules/configuration.nix>
skarabox.sshPort

Port the SSH daemon listens to.

Type: signed integer or string or absolute path

Default: 22

Declared by:

<skarabox/modules/configuration.nix>
skarabox.staticNetwork

Use static IP configuration. If unset, use DHCP.

Type: null or (submodule)

Default: null

Example:

{
  ip = "192.168.1.30";
  gateway = "192.168.1.1";
}

Declared by:

<skarabox/modules/configuration.nix>
skarabox.staticNetwork.enable

Whether to enable Skarabox static IP configuration.

Type: boolean

Default: false

Example: true

Declared by:

<skarabox/modules/configuration.nix>
skarabox.staticNetwork.device

Device for which to configure the IP address for.

Either pass the device name directly if you know it, like “ens3”. Or configure the deviceName option to get the first device name matching that prefix from the facter.json report.

Type: string or (submodule)

Default:

{
  namePrefix = "en";
}

Declared by:

<skarabox/modules/configuration.nix>
skarabox.staticNetwork.gateway

IP Gateway, often same beginning as ip and finishing by a 1: XXX.YYY.ZZZ.1.

Type: string

Declared by:

<skarabox/modules/configuration.nix>
skarabox.staticNetwork.ip

Static IP to use.

Type: string

Declared by:

<skarabox/modules/configuration.nix>
skarabox.username

Name given to the admin user on the server.

Type: string

Default: "skarabox"

Declared by:

<skarabox/modules/configuration.nix>

Beacon Options

skarabox.hostname

Hostname to give the beacon. Use the same as for the host to simplify installation.

Type: string

Default: "skarabox"

Declared by:

<skarabox/modules/beacon.nix>
skarabox.hotspot.ip

IP address of the beacon in the hotspot network.

Type: string

Default: "192.168.12.1"

Declared by:

<skarabox/modules/hotspot.nix>
skarabox.ip

Static IP for beacon.

Type: string

Declared by:

<skarabox/modules/beacon.nix>
skarabox.sshPublicKey

Public key to connect to the beacon. Use the same as for the host to simplify installation.

Type: absolute path

Declared by:

<skarabox/modules/beacon.nix>
skarabox.username

Username with which you can log on the beacon. Use the same as for the host to simplify installation.

Type: string

Default: "skarabox"

Declared by:

<skarabox/modules/beacon.nix>

Flake Module Options

skarabox.hosts

Hosts managed by Skarabox.

Type: attribute set of (submodule)

Default: { }

Declared by:

<skarabox/flakeModule.nix>
skarabox.hosts.<name>.extraBeaconModules

Modules to add to the beacon configuration. Use this to add static network config, for example.

Type: list of anything

Default: [ ]

Example:

''
  extraBeaconModules = [
    {
      environment.systemPackages = [ pkgs.tmux ];
    }
  ];
''

Declared by:

<skarabox/flakeModule.nix>
skarabox.hosts.<name>.extraSecretsPassphrasesPath

Paths in python dictionary format to other passphrases for extra ZFS pools as they is stored in the SOPS secrets file.

Type: attribute set of string

Default: { }

Example:

{
  backup_passphrase = "['‹name›']['disks']['backupPassphrase']";
}

Declared by:

<skarabox/flakeModule.nix>
skarabox.hosts.<name>.hostKeyPath

Path from the top of the repo to the ssh private file used as the host key.

Type: string

Default: "‹name›/host_key"

Declared by:

<skarabox/flakeModule.nix>
skarabox.hosts.<name>.hostKeyPub

SSH public file used as the host key.

Type: absolute path

Example: ./‹name›/host_key.pub

Declared by:

<skarabox/flakeModule.nix>
skarabox.hosts.<name>.ip

IP or hostname used to ssh into the server.

Can be the IP or hostname directly or a file containing the value.

Type: string or absolute path

Default: "127.0.0.1"

Declared by:

<skarabox/flakeModule.nix>
skarabox.hosts.<name>.knownHosts

Known hosts file.

Type: absolute path

Declared by:

<skarabox/flakeModule.nix>
skarabox.hosts.<name>.knownHostsPath

Path from the top of the repo to known hosts file.

Type: string

Default: "‹name›/known_hosts"

Declared by:

<skarabox/flakeModule.nix>
skarabox.hosts.<name>.modules

Modules to add to the host nixosConfiguration. Add here all your own configuration.

Type: list of anything

Default: [ ]

Declared by:

<skarabox/flakeModule.nix>
skarabox.hosts.<name>.pkgs

If given, overrides pkgs in the nixosConfiguration.

By default, use the pkgs from the nixpkgs input.

Type: anything

Default: "inputs.nixpkgs"

Declared by:

<skarabox/flakeModule.nix>
skarabox.hosts.<name>.secretsDataPassphrasePath

Path in python dictionary format to the passphrase of the data ZFS pool as it is stored in the SOPS secrets file.

Type: string

Default: "['‹name›']['disks']['dataPassphrase']"

Declared by:

<skarabox/flakeModule.nix>
skarabox.hosts.<name>.secretsFilePath

Path from the top of the repo to the SOPS secrets file.

By default Skarabox assumes one secret file per host to avoid sharing secrets across them but having only one file by specifying “./secrets.yaml” is possible too.

Type: string

Default: "‹name›/secrets.yaml"

Declared by:

<skarabox/flakeModule.nix>
skarabox.hosts.<name>.secretsRootPassphrasePath

Path in python dictionary format to the passphrase of the root ZFS pool as it is stored in the SOPS secrets file.

Type: string

Default: "['‹name›']['disks']['rootPassphrase']"

Declared by:

<skarabox/flakeModule.nix>
skarabox.hosts.<name>.sshPrivateKeyPath

Path from the top of the repo to the ssh private file used to ssh into the host.

Type: string

Default: "‹name›/ssh"

Declared by:

<skarabox/flakeModule.nix>
skarabox.hosts.<name>.sshPublicKey

SSH public file used to ssh into the host.

Type: absolute path

Declared by:

<skarabox/flakeModule.nix>
skarabox.hosts.<name>.system

System of the host.

Can be the systm directly or a file containing the value.

Type: string or absolute path

Declared by:

<skarabox/flakeModule.nix>
skarabox.sopsKeyPath

Path from the top of the repo to the main sops key.

Type: string

Default: "sops.key"

Declared by:

<skarabox/flakeModule.nix>