Compare commits
2 commits
b82994c914
...
c745986ef4
Author | SHA1 | Date | |
---|---|---|---|
c745986ef4 | |||
29734b6bd7 |
3 changed files with 58 additions and 0 deletions
|
@ -33,6 +33,7 @@
|
||||||
"arr"
|
"arr"
|
||||||
"zerotier"
|
"zerotier"
|
||||||
"mosh"
|
"mosh"
|
||||||
|
"amule"
|
||||||
]
|
]
|
||||||
++ [
|
++ [
|
||||||
./disko.nix
|
./disko.nix
|
||||||
|
|
23
modules/amarr/default.nix
Normal file
23
modules/amarr/default.nix
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
args@{ lib, pkgs, ... }:
|
||||||
|
let
|
||||||
|
pkgs = builtins.getFlake "github:NixOS/nixpkgs/d278c7bfb89130ac167e80d2250f9abc0bede419";
|
||||||
|
amarr = pkgs.legacyPackages.${args.pkgs.system}.amarr;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
systemd.services.amarr = {
|
||||||
|
description = "amarr";
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
after = [ "network.target" ];
|
||||||
|
serviceConfig = {
|
||||||
|
User = "root";
|
||||||
|
Type = "oneshot";
|
||||||
|
ExecStart = lib.getExe amarr;
|
||||||
|
};
|
||||||
|
environment = {
|
||||||
|
AMULE_HOST = "localhost";
|
||||||
|
AMULE_PORT = "4712";
|
||||||
|
AMULE_PASSWORD = "";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
34
modules/amule/default.nix
Normal file
34
modules/amule/default.nix
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
{ config, lib, ... }:
|
||||||
|
{
|
||||||
|
users.users.amule = {
|
||||||
|
isSystemUser = true;
|
||||||
|
group = "amule";
|
||||||
|
extraGroups = [ "amule" ];
|
||||||
|
home = config.services.amule.dataDir;
|
||||||
|
};
|
||||||
|
|
||||||
|
users.groups.amule = { };
|
||||||
|
services.amule = {
|
||||||
|
dataDir = "/mnt/hd/amule";
|
||||||
|
enable = true;
|
||||||
|
user = "amule";
|
||||||
|
};
|
||||||
|
|
||||||
|
# sometimes the service crashes with a segfeault without any reason...
|
||||||
|
systemd.services.amuled.serviceConfig.Restart = lib.mkForce "always";
|
||||||
|
|
||||||
|
environment.persistence."/persist".directories = [
|
||||||
|
config.services.amule.dataDir
|
||||||
|
];
|
||||||
|
|
||||||
|
networking.firewall = {
|
||||||
|
allowedTCPPorts = [ 4662 ];
|
||||||
|
allowedUDPPortRanges = [
|
||||||
|
{
|
||||||
|
from = 4665;
|
||||||
|
to = 4672;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue