320 current 2024-04-04 17:14:22 24.05.20240403.d9b45d7 6.8.2-zen2 *

This commit is contained in:
zackartz 2024-04-04 17:14:31 -04:00
parent 617f3f4080
commit 5255de35f4
No known key found for this signature in database
GPG key ID: 5B53E53A9A514DBA
4 changed files with 63 additions and 14 deletions

View file

@ -38,20 +38,20 @@
# Load nvidia driver for Xorg and Wayland # Load nvidia driver for Xorg and Wayland
services.xserver.videoDrivers = ["nvidia"]; # or "nvidiaLegacy470 etc. services.xserver.videoDrivers = ["nvidia"]; # or "nvidiaLegacy470 etc.
services.minidlna = { # services.minidlna = {
enable = true; # enable = true;
openFirewall = true; # openFirewall = true;
settings = { # settings = {
notify_interval = 60; # notify_interval = 60;
friendly_name = "ZACKPC"; # friendly_name = "ZACKPC";
media_dir = ["A,/home/zack/Music"]; # media_dir = ["A,/home/zack/Music"];
inotify = "yes"; # inotify = "yes";
}; # };
}; # };
#
users.users.minidlna = { # users.users.minidlna = {
extraGroups = ["users"]; # extraGroups = ["users"];
}; # };
# services.openssh = { # services.openssh = {
# enable = true; # enable = true;

View file

@ -103,6 +103,7 @@
pkgs.parsec-bin pkgs.parsec-bin
pkgs.filezilla pkgs.filezilla
pkgs.steam pkgs.steam
pkgs.gerbera
pkgs.devenv pkgs.devenv
pkgs.ghidra pkgs.ghidra

View file

@ -0,0 +1,47 @@
{
config,
lib,
pkgs,
...
}: let
# Custom function to create the Gerbera service
mkGerberaService = name: cfg: {
Unit = {
Description = "Gerbera Media Server";
After = ["network.target"];
Wants = ["network.target"];
};
Install = {
WantedBy = ["default.target"];
};
Service = {
User = cfg.user;
Group = cfg.group;
ExecStart = "${pkgs.gerbera}/bin/gerbera -c ${cfg.configFile}";
Restart = "on-failure";
};
};
in {
# Define the systemd service for Gerbera
systemd.user.services.gerbera = mkGerberaService "gerbera" {
user = "zack"; # Run the service as user Zack
group = "users"; # Assuming 'users' is the desired group
configFile = "/home/zack/.config/gerbera/config.xml"; # Path to Gerbera's configuration file
};
xdg.configFile."gerbera/config.xml" = {
text = '' <?xml version="1.0" encoding="UTF-8"?>
<config version="2">
<server>
<!-- Server settings -->
</server>
<storage>
<directory location="/home/zack/Music" />
</storage>
<!-- Additional configuration here -->
</config>'';
};
# Enable the service to start automatically
systemd.user.startServices = true;
}

View file

@ -37,6 +37,7 @@ in {
nodejs nodejs
fswatch # File watcher utility, replacing libuv.fs_event for neovim 10.0 fswatch # File watcher utility, replacing libuv.fs_event for neovim 10.0
sqlite sqlite
gerbera
vscode-extensions.vadimcn.vscode-lldb.adapter vscode-extensions.vadimcn.vscode-lldb.adapter
]; ];
plugins = [ plugins = [