move audio stuff to different profile from xsession

This commit is contained in:
Daniel Olsen 2022-04-24 18:37:29 +02:00
parent 1f5c793d77
commit b372167736
7 changed files with 41 additions and 22 deletions

View File

@ -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
{ {

View File

@ -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
View 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";
};
};
}

View File

@ -62,8 +62,7 @@ in {
mpv mpv
sxiv sxiv
spotify
mumble mumble
#dan.rank_photos #dan.rank_photos

View File

@ -2,6 +2,7 @@
imports = [ imports = [
./base ./base
./xsession ./xsession
./audio.nix
./zsh ./zsh
./gui.nix ./gui.nix
./non-nixos.nix ./non-nixos.nix

View File

@ -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";
};
};
}

View File

@ -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";