313 current 1970-01-01 01:00:00 23.11.20240514.9ddcaff 6.1.90 *

This commit is contained in:
Max Känner 2024-05-18 20:55:04 +02:00
parent f3d2da344f
commit f3eacd23c3
4 changed files with 91 additions and 25 deletions

View File

@ -21,18 +21,36 @@
"type": "github"
}
},
"nixpkgs": {
"musnix": {
"inputs": {
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1712168706,
"narHash": "sha256-XP24tOobf6GGElMd0ux90FEBalUtw6NkBSVh/RlA6ik=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "1487bdea619e4a7a53a4590c475deabb5a9d1bfb",
"lastModified": 1715993859,
"narHash": "sha256-hBPn1xF4Wspf6kJ+SR9FHy9vRUFmtJEZjrTLIWjFib8=",
"owner": "musnix",
"repo": "musnix",
"rev": "3ba4dba298a4720d51db6269f97038601f3fe2c1",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-23.11",
"owner": "musnix",
"repo": "musnix",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1715266358,
"narHash": "sha256-doPgfj+7FFe9rfzWo1siAV2mVCasW+Bh8I1cToAXEE4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "f1010e0469db743d14519a1efd37e23f8513d714",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
@ -53,10 +71,27 @@
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1715668745,
"narHash": "sha256-xp62OkRkbUDNUc6VSqH02jB0FbOS+MsfMb7wL1RJOfA=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "9ddcaffecdf098822d944d4147dd8da30b4e6843",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-23.11",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",
"musnix": "musnix",
"nixpkgs": "nixpkgs_2",
"sops-nix": "sops-nix",
"unstable": "unstable"
}

View File

@ -15,6 +15,8 @@
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
musnix = {url = "github:musnix/musnix";};
};
outputs = {
@ -51,6 +53,7 @@
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
}
inputs.musnix.nixosModules.musnix
];
};
};

View File

@ -1,3 +1,18 @@
{...}: {
{
lib,
config,
inputs,
...
}: let
cfg = config.music;
in {
imports = [./mpd.nix];
options = {
music.enable = lib.mkEnableOption "make the system ready for listening to music";
};
config = lib.mkIf cfg.enable {
music.mpd.enable = lib.mkDefault true;
};
}

View File

@ -1,11 +1,23 @@
{pkgs, ...}: {
{
lib,
config,
pkgs,
...
}: let
cfg = config.music.mpd;
in {
options = {
music.mpd.enable = lib.mkEnableOption "Music Player Daemon";
};
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [
mpc-cli
ymuse
];
services.mpd = {
enable = true;
musicDirectory = "/home/max/Music/";
musicDirectory = "~/Music/";
network.startWhenNeeded = true;
extraConfig = ''
restore_paused "yes"
@ -14,4 +26,5 @@
};
services.mpd-mpris.enable = true;
services.mpdris2.enable = true;
};
}