add first version of ntp module
This commit is contained in:
19
modules/ntp/default.nix
Normal file
19
modules/ntp/default.nix
Normal file
@@ -0,0 +1,19 @@
|
||||
{ lib, pkgs, config, ...}:
|
||||
let
|
||||
inherit (lib) mkOption types;
|
||||
in {
|
||||
options = {
|
||||
system.service.ntp = mkOption {
|
||||
type = types.functionTo types.package;
|
||||
};
|
||||
};
|
||||
config = {
|
||||
system.service.ntp = pkgs.callPackage ./service.nix {};
|
||||
users.ntp = {
|
||||
uid = 52; gid= 52; gecos = "Unprivileged NTP user";
|
||||
dir = "/run/ntp";
|
||||
shell = "/bin/false";
|
||||
};
|
||||
# groups.system.usernames = ["ntp"];
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user