-
Notifications
You must be signed in to change notification settings - Fork 3
/
services.nix
72 lines (64 loc) · 2.01 KB
/
services.nix
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
{ pkgs, lib, my, ... }:
let
caps2esc = pkgs.callPackage my.drvs.caps2esc { };
in
{
services.znapzend = {
enable = true;
pure = true;
zetup = {
"rpool/system" = {
timestampFormat = "%Y-%m-%dT%H%M%S";
plan = "15min=>5min,4h=>15min,4d=>1h,1w=>1d,1m=>1w";
recursive = true;
};
"rpool/user" = {
timestampFormat = "%Y-%m-%dT%H%M%S";
plan = "15min=>5min,4h=>15min,4d=>1h,1w=>1d,1m=>1w";
recursive = true;
};
"rpool/win10" = {
timestampFormat = "%Y-%m-%dT%H%M%S";
plan = "15min=>5min,4h=>15min,4d=>1h,1w=>1d,1m=>1w";
};
};
};
# Scrub the disk regularly to ensure integrity
services.zfs.autoScrub.enable = true;
services.zfs.autoScrub.interval = "weekly";
# Automount USB
services.gvfs.enable = true;
# Hide the "help" message
services.mingetty.helpLine = lib.mkForce "";
# Enable the OpenSSH daemon.
services.openssh.enable = true;
services.openssh.passwordAuthentication = false;
# Enable CUPS to print documents.
services.printing = {
enable = true;
drivers = with pkgs; [ gutenprint ];
};
# Necessary for discovering network printers.
services.avahi = {
enable = true;
nssmdns = true;
};
# No longer necessary, now that I have a CTRL. However, keep it around since I
# might want it for other devices.
# services.interception-tools = {
# enable = false;
# plugins = [ caps2esc ];
# udevmonConfig = ''
# - JOB: "intercept -g $DEVNODE | caps2esc -n | uinput -d $DEVNODE"
# DEVICE:
# EVENTS:
# EV_KEY: [KEY_CAPSLOCK, KEY_ESC]
# '';
# };
# services.udev.packages for packages with udev rules
# SUBSYSTEMS=="usb", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="eed2", TAG+="uaccess", RUN{builtin}+="uaccess"
# Set noop scheduler for zfs partitions
services.udev.extraRules = ''
KERNEL=="sd[a-z]*[0-9]*|mmcblk[0-9]*p[0-9]*|nvme[0-9]*n[0-9]*p[0-9]*", ENV{ID_FS_TYPE}=="zfs_member", ATTR{../queue/scheduler}="none"
'';
}