313 current 1970-01-01 01:00:00 23.11.20240514.9ddcaff 6.1.90 *
This commit is contained in:
		
							
								
								
									
										53
									
								
								flake.lock
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										53
									
								
								flake.lock
									
									
									
										generated
									
									
									
								
							| @@ -21,18 +21,36 @@ | |||||||
|         "type": "github" |         "type": "github" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "nixpkgs": { |     "musnix": { | ||||||
|  |       "inputs": { | ||||||
|  |         "nixpkgs": "nixpkgs" | ||||||
|  |       }, | ||||||
|       "locked": { |       "locked": { | ||||||
|         "lastModified": 1712168706, |         "lastModified": 1715993859, | ||||||
|         "narHash": "sha256-XP24tOobf6GGElMd0ux90FEBalUtw6NkBSVh/RlA6ik=", |         "narHash": "sha256-hBPn1xF4Wspf6kJ+SR9FHy9vRUFmtJEZjrTLIWjFib8=", | ||||||
|         "owner": "nixos", |         "owner": "musnix", | ||||||
|         "repo": "nixpkgs", |         "repo": "musnix", | ||||||
|         "rev": "1487bdea619e4a7a53a4590c475deabb5a9d1bfb", |         "rev": "3ba4dba298a4720d51db6269f97038601f3fe2c1", | ||||||
|         "type": "github" |         "type": "github" | ||||||
|       }, |       }, | ||||||
|       "original": { |       "original": { | ||||||
|         "owner": "nixos", |         "owner": "musnix", | ||||||
|         "ref": "nixos-23.11", |         "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", |         "repo": "nixpkgs", | ||||||
|         "type": "github" |         "type": "github" | ||||||
|       } |       } | ||||||
| @@ -53,10 +71,27 @@ | |||||||
|         "type": "github" |         "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": { |     "root": { | ||||||
|       "inputs": { |       "inputs": { | ||||||
|         "home-manager": "home-manager", |         "home-manager": "home-manager", | ||||||
|         "nixpkgs": "nixpkgs", |         "musnix": "musnix", | ||||||
|  |         "nixpkgs": "nixpkgs_2", | ||||||
|         "sops-nix": "sops-nix", |         "sops-nix": "sops-nix", | ||||||
|         "unstable": "unstable" |         "unstable": "unstable" | ||||||
|       } |       } | ||||||
|   | |||||||
| @@ -15,6 +15,8 @@ | |||||||
|       url = "github:Mic92/sops-nix"; |       url = "github:Mic92/sops-nix"; | ||||||
|       inputs.nixpkgs.follows = "nixpkgs"; |       inputs.nixpkgs.follows = "nixpkgs"; | ||||||
|     }; |     }; | ||||||
|  |  | ||||||
|  |     musnix = {url = "github:musnix/musnix";}; | ||||||
|   }; |   }; | ||||||
|  |  | ||||||
|   outputs = { |   outputs = { | ||||||
| @@ -51,6 +53,7 @@ | |||||||
|           home-manager.useGlobalPkgs = true; |           home-manager.useGlobalPkgs = true; | ||||||
|           home-manager.useUserPackages = true; |           home-manager.useUserPackages = true; | ||||||
|         } |         } | ||||||
|  |         inputs.musnix.nixosModules.musnix | ||||||
|       ]; |       ]; | ||||||
|     }; |     }; | ||||||
|   }; |   }; | ||||||
|   | |||||||
| @@ -1,3 +1,18 @@ | |||||||
| {...}: { | { | ||||||
|  |   lib, | ||||||
|  |   config, | ||||||
|  |   inputs, | ||||||
|  |   ... | ||||||
|  | }: let | ||||||
|  |   cfg = config.music; | ||||||
|  | in { | ||||||
|   imports = [./mpd.nix]; |   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; | ||||||
|  |   }; | ||||||
| } | } | ||||||
|   | |||||||
| @@ -1,17 +1,30 @@ | |||||||
| {pkgs, ...}: { | { | ||||||
|   home.packages = with pkgs; [ |   lib, | ||||||
|     mpc-cli |   config, | ||||||
|     ymuse |   pkgs, | ||||||
|   ]; |   ... | ||||||
|   services.mpd = { | }: let | ||||||
|     enable = true; |   cfg = config.music.mpd; | ||||||
|     musicDirectory = "/home/max/Music/"; | in { | ||||||
|     network.startWhenNeeded = true; |   options = { | ||||||
|     extraConfig = '' |     music.mpd.enable = lib.mkEnableOption "Music Player Daemon"; | ||||||
|       restore_paused "yes" |   }; | ||||||
|       auto_update "yes" |  | ||||||
|     ''; |   config = lib.mkIf cfg.enable { | ||||||
|  |     home.packages = with pkgs; [ | ||||||
|  |       mpc-cli | ||||||
|  |       ymuse | ||||||
|  |     ]; | ||||||
|  |     services.mpd = { | ||||||
|  |       enable = true; | ||||||
|  |       musicDirectory = "~/Music/"; | ||||||
|  |       network.startWhenNeeded = true; | ||||||
|  |       extraConfig = '' | ||||||
|  |         restore_paused "yes" | ||||||
|  |         auto_update "yes" | ||||||
|  |       ''; | ||||||
|  |     }; | ||||||
|  |     services.mpd-mpris.enable = true; | ||||||
|  |     services.mpdris2.enable = true; | ||||||
|   }; |   }; | ||||||
|   services.mpd-mpris.enable = true; |  | ||||||
|   services.mpdris2.enable = true; |  | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user