move audio stuff to different profile from xsession
This commit is contained in:
		
							parent
							
								
									1f5c793d77
								
							
						
					
					
						commit
						b372167736
					
				@ -1,6 +1,6 @@
 | 
				
			|||||||
let
 | 
					let
 | 
				
			||||||
  unstable = import <nixos-unstable> { }; 
 | 
					  unstable = import <unstable> { }; 
 | 
				
			||||||
  stable = import <nixos> {};
 | 
					  stable = import <nixpkgs> {};
 | 
				
			||||||
  nur = import <nur> { pkgs = unstable; };
 | 
					  nur = import <nur> { pkgs = unstable; };
 | 
				
			||||||
in
 | 
					in
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
				
			|||||||
@ -13,6 +13,8 @@
 | 
				
			|||||||
  profiles.xsession.enable = true;
 | 
					  profiles.xsession.enable = true;
 | 
				
			||||||
  profiles.zsh.enable = true;
 | 
					  profiles.zsh.enable = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  profiles.audio.fancy = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  services.gammastep =  {
 | 
					  services.gammastep =  {
 | 
				
			||||||
    enable = true;
 | 
					    enable = true;
 | 
				
			||||||
    dawnTime = "7:00-8:15";
 | 
					    dawnTime = "7:00-8:15";
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										34
									
								
								profiles/audio.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								profiles/audio.nix
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,34 @@
 | 
				
			|||||||
 | 
					{pkgs, config, lib, ...}:
 | 
				
			||||||
 | 
					let
 | 
				
			||||||
 | 
					  cfg = config.profiles.audio;
 | 
				
			||||||
 | 
					  audio-plugins = pkgs.symlinkJoin { name = "audio-plugins"; paths = [ pkgs.lsp-plugins pkgs.speech-denoiser ];};
 | 
				
			||||||
 | 
					in
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					  options.profiles.audio = {
 | 
				
			||||||
 | 
					    enable = lib.mkOption {
 | 
				
			||||||
 | 
					      default = config.profiles.xsession.enable;
 | 
				
			||||||
 | 
					      defaultText = "xsession.enable";
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					    fancy = lib.mkOption {
 | 
				
			||||||
 | 
					      default = cfg.enable;
 | 
				
			||||||
 | 
					      defaultText = "audio.enable";
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  config = lib.mkIf config.profiles.audio.enable {
 | 
				
			||||||
 | 
					    home.packages = with pkgs; [
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    ] ++ lib.optionals config.profiles.gui.enable (with pkgs; [
 | 
				
			||||||
 | 
					      pavucontrol
 | 
				
			||||||
 | 
					      spotify
 | 
				
			||||||
 | 
					    ]) ++ lib.optionals cfg.fancy (with pkgs; [
 | 
				
			||||||
 | 
					      carla
 | 
				
			||||||
 | 
					    ]);
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    home.file."audio-plugins" = lib.mkIf cfg.fancy {
 | 
				
			||||||
 | 
					      source = "${audio-plugins}/lib";
 | 
				
			||||||
 | 
					      target = "audio-plugins";
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					  };
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -62,7 +62,6 @@ in {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
      mpv
 | 
					      mpv
 | 
				
			||||||
      sxiv
 | 
					      sxiv
 | 
				
			||||||
      spotify
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
      mumble
 | 
					      mumble
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
 | 
				
			|||||||
@ -2,6 +2,7 @@
 | 
				
			|||||||
  imports = [
 | 
					  imports = [
 | 
				
			||||||
    ./base
 | 
					    ./base
 | 
				
			||||||
    ./xsession
 | 
					    ./xsession
 | 
				
			||||||
 | 
					    ./audio.nix
 | 
				
			||||||
    ./zsh
 | 
					    ./zsh
 | 
				
			||||||
    ./gui.nix
 | 
					    ./gui.nix
 | 
				
			||||||
    ./non-nixos.nix
 | 
					    ./non-nixos.nix
 | 
				
			||||||
 | 
				
			|||||||
@ -1,17 +0,0 @@
 | 
				
			|||||||
{pkgs, config, lib, ...}:
 | 
					 | 
				
			||||||
let
 | 
					 | 
				
			||||||
  audio-plugins = pkgs.symlinkJoin { name = "audio-plugins"; paths = [ pkgs.lsp-plugins pkgs.speech-denoiser ];};
 | 
					 | 
				
			||||||
in
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
  config = lib.mkIf config.profiles.xsession.enable {
 | 
					 | 
				
			||||||
    home.packages = [ ] ++ lib.optionals config.profiles.gui.enable [
 | 
					 | 
				
			||||||
      pkgs.pavucontrol
 | 
					 | 
				
			||||||
      pkgs.carla
 | 
					 | 
				
			||||||
    ];
 | 
					 | 
				
			||||||
    
 | 
					 | 
				
			||||||
    home.file."audio-plugins" = {
 | 
					 | 
				
			||||||
      source = "${audio-plugins}/lib";
 | 
					 | 
				
			||||||
      target = "audio-plugins";
 | 
					 | 
				
			||||||
    };
 | 
					 | 
				
			||||||
  };
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@ -6,7 +6,7 @@ let
 | 
				
			|||||||
  mkGL = program: "${lib.strings.optionalString non-nixos.enable "nixGL "}${program}";
 | 
					  mkGL = program: "${lib.strings.optionalString non-nixos.enable "nixGL "}${program}";
 | 
				
			||||||
in
 | 
					in
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  imports = [ ./dunstrc.nix ./terminal.nix ./audio.nix ./polybar.nix ];
 | 
					  imports = [ ./dunstrc.nix ./terminal.nix ./polybar.nix ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  options.profiles.xsession = {
 | 
					  options.profiles.xsession = {
 | 
				
			||||||
    enable = lib.mkEnableOption "Whether or not to control the xsession";
 | 
					    enable = lib.mkEnableOption "Whether or not to control the xsession";
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user