turned off visualizer for ncmpcpp, enabled restic server.
This commit is contained in:
		
							parent
							
								
									7784c07a01
								
							
						
					
					
						commit
						879744abb8
					
				
					 5 changed files with 79 additions and 30 deletions
				
			
		| 
						 | 
					@ -3,38 +3,44 @@
 | 
				
			||||||
  pkgs,
 | 
					  pkgs,
 | 
				
			||||||
  lib,
 | 
					  lib,
 | 
				
			||||||
  ...
 | 
					  ...
 | 
				
			||||||
}: {
 | 
					}: let
 | 
				
			||||||
 | 
					  visualizer = false;
 | 
				
			||||||
 | 
					in {
 | 
				
			||||||
  services.mpd = {
 | 
					  services.mpd = {
 | 
				
			||||||
    enable = true;
 | 
					    enable = true;
 | 
				
			||||||
    musicDirectory = "${config.home.homeDirectory}/Music";
 | 
					    musicDirectory = "${config.home.homeDirectory}/Music";
 | 
				
			||||||
    network.startWhenNeeded = true;
 | 
					    network.startWhenNeeded = true;
 | 
				
			||||||
    playlistDirectory = "${config.services.mpd.musicDirectory}/.mpd/playlists";
 | 
					    playlistDirectory = "${config.services.mpd.musicDirectory}/.mpd/playlists";
 | 
				
			||||||
    extraConfig = ''
 | 
					    extraConfig =
 | 
				
			||||||
      restore_paused "yes"
 | 
					      (''
 | 
				
			||||||
      auto_update "yes"
 | 
					        restore_paused "yes"
 | 
				
			||||||
      replaygain "auto"
 | 
					        auto_update "yes"
 | 
				
			||||||
      follow_outside_symlinks "yes"
 | 
					        replaygain "auto"
 | 
				
			||||||
 | 
					        follow_outside_symlinks "yes"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      #for ncmpcpp visualizer
 | 
					        audio_output {
 | 
				
			||||||
      audio_output {
 | 
					          type "pipewire"
 | 
				
			||||||
          type "fifo"
 | 
					          name "PipeWire Sound Server"
 | 
				
			||||||
          name "Visualizer feed"
 | 
					        }
 | 
				
			||||||
          path "/tmp/mpd.fifo"
 | 
					      ''
 | 
				
			||||||
          format "44100:16:2"
 | 
					       + lib.optionalString visualizer
 | 
				
			||||||
      }
 | 
					      ''
 | 
				
			||||||
      audio_output {
 | 
					        #for ncmpcpp visualizer
 | 
				
			||||||
        type "pipewire"
 | 
					        audio_output {
 | 
				
			||||||
        name "PipeWire Sound Server"
 | 
					            type "fifo"
 | 
				
			||||||
      }
 | 
					            name "Visualizer feed"
 | 
				
			||||||
    '';
 | 
					            path "/tmp/mpd.fifo"
 | 
				
			||||||
 | 
					            format "44100:16:2"
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      ''); 
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  services.mpd-mpris.enable = true;
 | 
					  services.mpd-mpris.enable = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  programs.ncmpcpp = {
 | 
					  programs.ncmpcpp = {
 | 
				
			||||||
    enable = true;
 | 
					    enable = true;
 | 
				
			||||||
    package = pkgs.ncmpcpp.override {visualizerSupport = true;};
 | 
					    package = lib.mkIf visualizer (pkgs.ncmpcpp.override {visualizerSupport = true;});
 | 
				
			||||||
    settings = {
 | 
					    settings = lib.mkIf visualizer {
 | 
				
			||||||
      visualizer_data_source = "/tmp/mpd.fifo";
 | 
					      visualizer_data_source = "/tmp/mpd.fifo";
 | 
				
			||||||
      visualizer_output_name = "Visualizer feed";
 | 
					      visualizer_output_name = "Visualizer feed";
 | 
				
			||||||
      visualizer_in_stereo = "yes";
 | 
					      visualizer_in_stereo = "yes";
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -60,6 +60,10 @@ inputs.nixpkgs.lib.nixosSystem {
 | 
				
			||||||
            format = "binary";
 | 
					            format = "binary";
 | 
				
			||||||
            owner = config.services.nginx.user;
 | 
					            owner = config.services.nginx.user;
 | 
				
			||||||
          };
 | 
					          };
 | 
				
			||||||
 | 
					          restic-server-credentials = {
 | 
				
			||||||
 | 
					            sopsFile = "${inputs.nix-secrets}/restic-server";
 | 
				
			||||||
 | 
					            format = "binary";
 | 
				
			||||||
 | 
					          };
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -68,6 +68,16 @@
 | 
				
			||||||
          compression = "zstd";
 | 
					          compression = "zstd";
 | 
				
			||||||
          mountpoint = "/storage";
 | 
					          mountpoint = "/storage";
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
 | 
					        datasets = {
 | 
				
			||||||
 | 
					          backup = {
 | 
				
			||||||
 | 
					            type="zfs_fs";
 | 
				
			||||||
 | 
					            options={
 | 
				
			||||||
 | 
					              mountpoint="/backup";
 | 
				
			||||||
 | 
					              compression="zstd";
 | 
				
			||||||
 | 
					              quota="6T";
 | 
				
			||||||
 | 
					            };
 | 
				
			||||||
 | 
					          };
 | 
				
			||||||
 | 
					        };
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -8,15 +8,17 @@
 | 
				
			||||||
  imports = [
 | 
					  imports = [
 | 
				
			||||||
    ../../configs/nixos/nginx.nix
 | 
					    ../../configs/nixos/nginx.nix
 | 
				
			||||||
  ];
 | 
					  ];
 | 
				
			||||||
  services.nginx.virtualHosts."gabevenberg.com" = {
 | 
					  services.nginx.virtualHosts = {
 | 
				
			||||||
    enableACME = true;
 | 
					    "gabevenberg.com" = {
 | 
				
			||||||
    forceSSL = true;
 | 
					      enableACME = true;
 | 
				
			||||||
    root = "/var/www/gabevenberg.com";
 | 
					      forceSSL = true;
 | 
				
			||||||
  };
 | 
					      root = "/var/www/gabevenberg.com";
 | 
				
			||||||
  services.nginx.virtualHosts."draft.gabevenberg.com" = {
 | 
					    };
 | 
				
			||||||
    enableACME = true;
 | 
					    "draft.gabevenberg.com" = {
 | 
				
			||||||
    forceSSL = true;
 | 
					      enableACME = true;
 | 
				
			||||||
    root = "/var/www/draft.gabevenberg.com";
 | 
					      forceSSL = true;
 | 
				
			||||||
    basicAuthFile = config.sops.secrets.gabevenberg-draft-credentials.path;
 | 
					      root = "/var/www/draft.gabevenberg.com";
 | 
				
			||||||
 | 
					      basicAuthFile = config.sops.secrets.gabevenberg-draft-credentials.path;
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										27
									
								
								hosts/cirrostratus/restic.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								hosts/cirrostratus/restic.nix
									
										
									
									
									
										Normal 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}";
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					  };
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue