From 37a67dfd3540198999eec8ddc0cae9806693e09f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20K=C3=A4nner?= Date: Sat, 9 Mar 2024 10:57:55 +0100 Subject: [PATCH] 119 current 1970-01-01 01:00:00 24.05.20240303.b8697e5 6.6.19 * --- hosts/MaxNixosLaptop/home.nix | 43 ++--------------------------------- modules/home-manager/mpd.nix | 17 ++++++++++++++ 2 files changed, 19 insertions(+), 41 deletions(-) create mode 100644 modules/home-manager/mpd.nix diff --git a/hosts/MaxNixosLaptop/home.nix b/hosts/MaxNixosLaptop/home.nix index acedf95..e036f72 100644 --- a/hosts/MaxNixosLaptop/home.nix +++ b/hosts/MaxNixosLaptop/home.nix @@ -14,6 +14,8 @@ # often used terminal programs ../../modules/home-manager/btop.nix ../../modules/home-manager/bat.nix + # use mpd for music + ../../modules/home-manager/mpd.nix ]; # Home Manager needs a bit of information about you and the paths it should @@ -46,10 +48,6 @@ prismlauncher steam blender - mpd - mpdris2 - mpc-cli - ymuse flip-link bacon probe-rs @@ -63,49 +61,12 @@ sops ]; - # Home Manager is pretty good at managing dotfiles. The primary way to manage - # plain files is through 'home.file'. - home.file = { - # # Building this configuration will create a copy of 'dotfiles/screenrc' in - # # the Nix store. Activating the configuration will then make '~/.screenrc' a - # # symlink to the Nix store copy. - # ".screenrc".source = dotfiles/screenrc; - - # # You can also set the file content immediately. - # ".gradle/gradle.properties".text = '' - # org.gradle.console=verbose - # org.gradle.daemon.idletimeout=3600000 - # ''; - }; - - # Home Manager can also manage your environment variables through - # 'home.sessionVariables'. If you don't want to manage your shell through Home - # Manager then you have to manually source 'hm-session-vars.sh' located at - # either - # - # ~/.nix-profile/etc/profile.d/hm-session-vars.sh - # - # or - # - # ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh - # - # or - # - # /etc/profiles/per-user/max/etc/profile.d/hm-session-vars.sh - # home.sessionVariables = { EDITOR = "nvim"; }; services.nextcloud-client.enable = true; - services.mpd = { - enable = true; - musicDirectory = "/home/max/Music/"; - }; - - services.mpdris2.enable = true; - # Let Home Manager install and manage itself. programs.home-manager.enable = true; } diff --git a/modules/home-manager/mpd.nix b/modules/home-manager/mpd.nix new file mode 100644 index 0000000..55d6d12 --- /dev/null +++ b/modules/home-manager/mpd.nix @@ -0,0 +1,17 @@ +{pkgs, ...}: { + home.packages = with pkgs; [ + mpc-cli + ymuse + ]; + services.mpd = { + enable = true; + musicDirectory = "/home/max/Music/"; + network.startWhenNeeded = true; + extraConfig = '' + restore_paused = yes + auto_update = yes + ''; + }; + services.mpd-mpris.enable = true; + services.mpdris2.enable = true; +}