feat: Added navidrome

This commit is contained in:
uttarayan21
2024-11-20 18:20:16 +05:30
parent 84905b68ce
commit c529435caf
3 changed files with 50 additions and 21 deletions

View File

@@ -7,7 +7,7 @@
imports = [
# Include the results of the hardware scan.
./mirai.nix
./docker.nix
./services.nix
];
security.sudo.wheelNeedsPassword = false;
@@ -37,8 +37,9 @@
users.users.fs0c131y = {
isNormalUser = true;
extraGroups = ["wheel" "docker"];
extraGroups = ["wheel" "docker" "media"];
};
users.groups.media = {};
nixpkgs.config.allowUnfree = true;
networking.hostName = "mirai"; # Define your hostname.

View File

@@ -1,30 +1,39 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" ];
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci"];
boot.initrd.kernelModules = ["dm-snapshot"];
boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/8f805d1b-a469-4db8-9ee1-b98ea220714a";
fileSystems."/" = {
device = "/dev/disk/by-uuid/8f805d1b-a469-4db8-9ee1-b98ea220714a";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/D840-A590";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/D840-A590";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
options = ["fmask=0022" "dmask=0022"];
};
swapDevices = [ ];
fileSystems."/media" = {
device = "/dev/disk/by-uuid/cad22fc7-08d2-4650-8d5e-a101e3fd1bd1";
fsType = "ext4";
};
swapDevices = [];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's

19
nixos/mirai/services.nix Normal file
View File

@@ -0,0 +1,19 @@
{
config,
lib,
pkgs,
...
}: {
services.navidrome = {
enable = true;
settings = {
MusicFolder = "/media/music";
};
};
services.caddy = {
enable = true;
virtualHosts."navidrome.darksailor.dev".extraConfig = ''
reverse_proxy localhost:4533
'';
};
}