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

View File

@@ -1,30 +1,39 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{ {
imports = config,
[ (modulesPath + "/installer/scan/not-detected.nix") lib,
]; pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" ]; boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci"];
boot.initrd.kernelModules = [ "dm-snapshot" ]; boot.initrd.kernelModules = ["dm-snapshot"];
boot.kernelModules = [ "kvm-amd" ]; boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/8f805d1b-a469-4db8-9ee1-b98ea220714a"; device = "/dev/disk/by-uuid/8f805d1b-a469-4db8-9ee1-b98ea220714a";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/D840-A590"; device = "/dev/disk/by-uuid/D840-A590";
fsType = "vfat"; 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 # 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 # (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
'';
};
}