turned off visualizer for ncmpcpp, enabled restic server.

This commit is contained in:
Gabe Venberg 2024-09-28 15:14:40 +02:00
parent 7784c07a01
commit 879744abb8
5 changed files with 79 additions and 30 deletions

View file

@ -3,18 +3,28 @@
pkgs,
lib,
...
}: {
}: let
visualizer = false;
in {
services.mpd = {
enable = true;
musicDirectory = "${config.home.homeDirectory}/Music";
network.startWhenNeeded = true;
playlistDirectory = "${config.services.mpd.musicDirectory}/.mpd/playlists";
extraConfig = ''
extraConfig =
(''
restore_paused "yes"
auto_update "yes"
replaygain "auto"
follow_outside_symlinks "yes"
audio_output {
type "pipewire"
name "PipeWire Sound Server"
}
''
+ lib.optionalString visualizer
''
#for ncmpcpp visualizer
audio_output {
type "fifo"
@ -22,19 +32,15 @@
path "/tmp/mpd.fifo"
format "44100:16:2"
}
audio_output {
type "pipewire"
name "PipeWire Sound Server"
}
'';
'');
};
services.mpd-mpris.enable = true;
programs.ncmpcpp = {
enable = true;
package = pkgs.ncmpcpp.override {visualizerSupport = true;};
settings = {
package = lib.mkIf visualizer (pkgs.ncmpcpp.override {visualizerSupport = true;});
settings = lib.mkIf visualizer {
visualizer_data_source = "/tmp/mpd.fifo";
visualizer_output_name = "Visualizer feed";
visualizer_in_stereo = "yes";

View file

@ -60,6 +60,10 @@ inputs.nixpkgs.lib.nixosSystem {
format = "binary";
owner = config.services.nginx.user;
};
restic-server-credentials = {
sopsFile = "${inputs.nix-secrets}/restic-server";
format = "binary";
};
};
};

View file

@ -68,6 +68,16 @@
compression = "zstd";
mountpoint = "/storage";
};
datasets = {
backup = {
type="zfs_fs";
options={
mountpoint="/backup";
compression="zstd";
quota="6T";
};
};
};
};
};
};

View file

@ -8,15 +8,17 @@
imports = [
../../configs/nixos/nginx.nix
];
services.nginx.virtualHosts."gabevenberg.com" = {
services.nginx.virtualHosts = {
"gabevenberg.com" = {
enableACME = true;
forceSSL = true;
root = "/var/www/gabevenberg.com";
};
services.nginx.virtualHosts."draft.gabevenberg.com" = {
"draft.gabevenberg.com" = {
enableACME = true;
forceSSL = true;
root = "/var/www/draft.gabevenberg.com";
basicAuthFile = config.sops.secrets.gabevenberg-draft-credentials.path;
};
};
}

View file

@ -0,0 +1,27 @@
{
inputs,
config,
pkgs,
lib,
...
}: let
port = "8090";
in {
services.restic.server = {
enable = true;
appendOnly = true;
dataDir = "/backup/restic";
extraFlags = [
"--htpasswd-file ${config.sops.secrets.gabevenberg-draft-credentials.path}"
"--private-repos"
];
listenAddress = "127.0.0.1:${port}";
};
services.nginx.virtualHosts."restic.gabevenberg.com" = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://localhost:${port}";
};
};
}