-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflake.nix.example
58 lines (51 loc) · 1.93 KB
/
flake.nix.example
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{
description = "Example Raspberry Pi GNSS/GPS time server using stratum";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";
stratum.url = "github:koenw/stratum";
};
outputs = { self, nixpkgs, stratum }@inputs: {
nixosConfigurations."stratum" = nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
modules = [
# Uncomment to be able to build an SD image using
# `nix build '.#nixosConfigurations."stratum".config.system.build.sdImage'`
# stratum.nixosModules.sdImage
stratum.nixosModules.stratum
({config, pkgs, lib, ...}:
{
networking.hostName = "stratum";
# Don't forget to create a user for yourself before re-configuring,
# or you might lock yourself out!
# users.groups.stratum = {};
# users.users.stratum = {
# isNormalUser = true;
# extraGroups = [ "wheel" ];
# group = "stratum";
# openssh.authorizedKeys.keys = [
# "ssh-ed25519 AAAAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX stratum@purple"
# ];
# initialHashedPassword = "";
# };
# Set if you want to use ACME/Let's Encrypt for NTS certificates
# security.acme.acceptTerms = true;
# security.acme.defaults.email = "[email protected]";
stratum = {
enable = true;
ntp.allowedIPv6Ranges = [
{ address = "fe80::"; prefixLength = 10; }
{ address = "2a02:a469:1070:babe::"; prefixLength = 64; }
];
# Using ACME by default, see above to accept terms and set your email
# ntp.nts.enable = true;
# or bring your own certificates
# ntp.nts.certificate = "/etc/bladiebla";
# ntp.nts.key = "/etc/bladiebla";
gps.serial.offset = "0.119";
i2c-rtc.enable = true;
};
})
];
};
};
}