aboutsummaryrefslogtreecommitdiff
path: root/nixos/modules/turris-board.nix
blob: 1c52de0b76e03e315d230b2386b2d319c98f2725 (plain)
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
{ config, lib, pkgs, ... }:

with lib;

{

  options = {
    turris.board = mkOption {
      type = types.enum [ "omnia" "mox" ];
      description = "The unique Turris board identifier.";
    };
  };

  config = {
    assertions = [{
      assertion = config.turris.board != null;
      message = "Turris board has to be specified";
    }];

    environment.systemPackages =  with pkgs; [
      # As we override the nix package we have to override nixos-rebuild as well
      (pkgs.nixos-rebuild.override { nix = config.nix.package.out; })
      # The Git is required to access this repository
      git
    ];
  };
}