From 93a8040de56c998f026c384a6d49985eea88ebbc Mon Sep 17 00:00:00 2001 From: Alex Stan Date: Wed, 16 Oct 2024 08:13:05 +0300 Subject: [PATCH] slskd and stuff Signed-off-by: Alex Stan unfuck the merge --- flake.lock | 21 +++++++++++++++++++++ flake.nix | 4 ++++ hosts/titan/configuration.nix | 2 ++ hosts/titan/services/iceshrimp.nix | 21 +++++++++++++++++++++ hosts/titan/services/slskd.nix | 19 +++++++++++++++++++ hosts/titan/services/syncthing.nix | 7 +++++++ 6 files changed, 74 insertions(+) create mode 100644 hosts/titan/services/iceshrimp.nix create mode 100644 hosts/titan/services/slskd.nix create mode 100644 hosts/titan/services/syncthing.nix diff --git a/flake.lock b/flake.lock index df21d2b..9f08e0c 100644 --- a/flake.lock +++ b/flake.lock @@ -543,6 +543,26 @@ "type": "github" } }, + "iceshrimp": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1718289195, + "narHash": "sha256-xmkExjsTztXW4/AYb3d3Er6Wwg4r7AVwq7rv9E93+Ec=", + "ref": "refs/heads/dev", + "rev": "746c6319d3425ccfacc906535c67951e161996d9", + "revCount": 47, + "type": "git", + "url": "https://iceshrimp.dev/iceshrimp/packaging" + }, + "original": { + "type": "git", + "url": "https://iceshrimp.dev/iceshrimp/packaging" + } + }, "mailserver": { "inputs": { "blobs": "blobs", @@ -900,6 +920,7 @@ "home-manager": "home-manager", "hypr-contrib": "hypr-contrib", "hyprland": "hyprland", + "iceshrimp": "iceshrimp", "mailserver": "mailserver", "niri": "niri", "nix-but-gigachad": "nix-but-gigachad", diff --git a/flake.nix b/flake.nix index ba084b3..bc9f4ad 100644 --- a/flake.nix +++ b/flake.nix @@ -57,6 +57,10 @@ niri = { url = "github:sodiboo/niri-flake"; }; + iceshrimp = { + url = "git+https://iceshrimp.dev/iceshrimp/packaging"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = { self, nixpkgs, home-manager, ... }@inputs: { diff --git a/hosts/titan/configuration.nix b/hosts/titan/configuration.nix index 63d8af9..adf9ed4 100644 --- a/hosts/titan/configuration.nix +++ b/hosts/titan/configuration.nix @@ -19,6 +19,8 @@ in { ( import ./services/matrix.nix inputs ) ( import ./services/tor.nix inputs ) ( import ./services/navidrome.nix inputs ) +# ( import ./services/iceshrimp.nix inputs ) + ( import ./services/slskd.nix inputs ) # ( import ./services/office.nix inputs ) # ( import ./services/Sharkey inputs ) # ( import ./services/caddy.nix inputs ) # doesn't work diff --git a/hosts/titan/services/iceshrimp.nix b/hosts/titan/services/iceshrimp.nix new file mode 100644 index 0000000..9514a60 --- /dev/null +++ b/hosts/titan/services/iceshrimp.nix @@ -0,0 +1,21 @@ +inputs: { pkgs, config, ... }: { + imports = [ + inputs.iceshrimp.nixosModules.iceshrimp + ]; + services.iceshrimp = { + enable = true; + createDb = true; + dbPasswordFile = /var/keys/iceshrimpdbpass; + secretConfig = /var/keys/is_secrets.yml; + settings = { + url = "https://is.phite.ro"; + accountDomain = "phite.ro"; + port = 3010; + maxNoteLength = 100000; + maxCaptionLength = 8192; + disableHsts = true; # caddy will handle that + clusterLimit = 4; + outgoingAddressFamily = "dual"; + }; + }; +} diff --git a/hosts/titan/services/slskd.nix b/hosts/titan/services/slskd.nix new file mode 100644 index 0000000..1047299 --- /dev/null +++ b/hosts/titan/services/slskd.nix @@ -0,0 +1,19 @@ +inputs: { pkgs, ... }: { + services.slskd = { + enable = true; + environmentFile = /var/keys/slsk.env; + domain = null; + + settings = { + web = { + port = 3011; + https.disabled = true; + }; +# directories.downloads = "/var/navidrome/music"; + shares.directories = [ + "/home/ultra/Music" + "/var/navidrome/music" + ]; + }; + }; +} diff --git a/hosts/titan/services/syncthing.nix b/hosts/titan/services/syncthing.nix new file mode 100644 index 0000000..8801736 --- /dev/null +++ b/hosts/titan/services/syncthing.nix @@ -0,0 +1,7 @@ +inputs: { pkgs, ... }: { + services.syncthing = { + enable = true; + user = "ultra"; + dataDir = "/home/ultra/.local/lib/syncthing"; + }; +}