-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathcachecache.nix
More file actions
36 lines (34 loc) · 837 Bytes
/
Copy pathcachecache.nix
File metadata and controls
36 lines (34 loc) · 837 Bytes
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
{ inputs, config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.cachecache;
in {
options = {
services.cachecache.enable = mkEnableOption "enable cachecache";
};
config = mkIf cfg.enable {
nixpkgs.overlays = [
(super: self: {
cachecache = inputs.cachecache.packages.x86_64-linux.cachecache;
})
];
users.users.cachecache = {
home = "/var/lib/cachecache";
isSystemUser = true;
createHome = true;
group = "cachecache";
};
users.groups.cachecache = {};
systemd.services.cachecache = {
wantedBy = [ "multi-user.target" ];
path = [ pkgs.cachecache ];
script = ''
exec cachecache
'';
serviceConfig = {
User = "cachecache";
WorkingDirectory = config.users.users.cachecache.home;
};
};
};
}