Compare commits

..

2 commits

Author SHA1 Message Date
Bruno BELANYI 17061acd7b nixos: services: flood: use upstream module
Some checks failed
ci/woodpecker/push/check Pipeline failed
2024-06-21 15:38:32 +00:00
Bruno BELANYI 89cf8bc26d flake: bump inputs 2024-06-21 15:38:12 +00:00
2 changed files with 16 additions and 34 deletions

View file

@ -136,11 +136,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1718526747, "lastModified": 1718788307,
"narHash": "sha256-sKrD/utGvmtQALvuDj4j0CT3AJXP1idOAq2p+27TpeE=", "narHash": "sha256-SqiOz0sljM0GjyQEVinPXQxaGcbOXw5OgpCWGPgh/vo=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "0a7ffb28e5df5844d0e8039c9833d7075cdee792", "rev": "d7830d05421d0ced83a0f007900898bdcaf2a2ca",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -152,11 +152,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1718318537, "lastModified": 1718895438,
"narHash": "sha256-4Zu0RYRcAY/VWuu6awwq4opuiD//ahpc2aFHg2CWqFY=", "narHash": "sha256-k3JqJrkdoYwE3fHE6xGDY676AYmyh4U2Zw+0Bwe5DLU=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e9ee548d90ff586a6471b4ae80ae9cfcbceb3420", "rev": "d603719ec6e294f034936c0d0dc06f689d91b6c3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -168,11 +168,11 @@
}, },
"nur": { "nur": {
"locked": { "locked": {
"lastModified": 1718606072, "lastModified": 1718980488,
"narHash": "sha256-+BKOI7p2YoNwNQgfdIldS0hmihEjBBLWPOek624sgeg=", "narHash": "sha256-cULCoFNaBcyB9TUMmL6oDKu2FygaZbfn6I5mYwRC4G8=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "6af362f6660ce325faacb9e180e3c2e8d2af3fdd", "rev": "ef74ae1e19df0d2118a4f27d6127f1153469a25e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -194,11 +194,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1717664902, "lastModified": 1718879355,
"narHash": "sha256-7XfBuLULizXjXfBYy/VV+SpYMHreNRHk9nKMsm1bgb4=", "narHash": "sha256-RTyqP4fBX2MdhNuMP+fnR3lIwbdtXhyj7w7fwtvgspc=",
"owner": "cachix", "owner": "cachix",
"repo": "pre-commit-hooks.nix", "repo": "pre-commit-hooks.nix",
"rev": "cc4d466cb1254af050ff7bdf47f6d404a7c646d1", "rev": "8cd35b9496d21a6c55164d8547d9d5280162b07a",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -1,5 +1,5 @@
# A nice UI for various torrent clients # A nice UI for various torrent clients
{ config, lib, pkgs, ... }: { config, lib, ... }:
let let
cfg = config.my.services.flood; cfg = config.my.services.flood;
in in
@ -13,31 +13,13 @@ in
example = 3000; example = 3000;
description = "Internal port for Flood UI"; description = "Internal port for Flood UI";
}; };
stateDir = mkOption {
type = types.str;
default = "flood";
example = "floodUI";
description = "Directory under `/var/run` for storing Flood's files";
};
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
systemd.services.flood = { services.flood = {
description = "Flood torrent UI"; enable = true;
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = { inherit (cfg) port;
ExecStart = lib.concatStringsSep " " [
(lib.getExe pkgs.flood)
"--port ${builtins.toString cfg.port}"
"--rundir /var/lib/${cfg.stateDir}"
];
DynamicUser = true;
StateDirectory = cfg.stateDir;
ReadWritePaths = "";
};
}; };
my.services.nginx.virtualHosts = { my.services.nginx.virtualHosts = {