Compare commits
No commits in common. "65218d2d204edef0bd5551d23097e7b3cfbee2fd" and "7200896974997081d03a3dbb8042bc4da6c2320b" have entirely different histories.
65218d2d20
...
7200896974
|
@ -14,6 +14,10 @@ in rec {
|
||||||
|
|
||||||
} // optionalAttrs (pkgs.system == "x86_64-linux") rec {
|
} // optionalAttrs (pkgs.system == "x86_64-linux") rec {
|
||||||
|
|
||||||
|
navidrome-bin = callPackage ./pkgs/navidrome-bin { };
|
||||||
|
|
||||||
|
ryzenadj = callPackage ./pkgs/ryzenadj { };
|
||||||
|
|
||||||
ryzen_smu = callPackage ./pkgs/ryzen_smu { kernel = pkgs.linux; };
|
ryzen_smu = callPackage ./pkgs/ryzen_smu { kernel = pkgs.linux; };
|
||||||
|
|
||||||
} // optionalAttrs (builtins.elem pkgs.system pkgs.lib.platforms.linux) rec {
|
} // optionalAttrs (builtins.elem pkgs.system pkgs.lib.platforms.linux) rec {
|
||||||
|
|
|
@ -2,16 +2,16 @@
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1642961095,
|
"lastModified": 1628427351,
|
||||||
"narHash": "sha256-RLatktZmvwFBOyqdoIk4qdS4OGKB7aKIvvs4ZP2L8D8=",
|
"narHash": "sha256-WuZUIQ07AvRw+T9wvQ3qFf8MXmKZ+ktZz9drNgWXDbs=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "604c44137d97b5111be1ca5c0d97f6e24fbc5c2c",
|
"rev": "348bc5de8bca09c624f5c4975f538684da4713d2",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"ref": "nixos-21.11-small",
|
"ref": "nixos-21.05-small",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
description = "meterriblecrew.net package flake";
|
description = "meterriblecrew.net package flake";
|
||||||
|
|
||||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-21.11-small";
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-21.05-small";
|
||||||
|
|
||||||
outputs = inputs@{ self, nixpkgs }: let
|
outputs = inputs@{ self, nixpkgs }: let
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@
|
||||||
nixosModules = {
|
nixosModules = {
|
||||||
ryzenSMU = import ./modules/ryzenSMU;
|
ryzenSMU = import ./modules/ryzenSMU;
|
||||||
|
|
||||||
|
servicesNavidrome = import ./modules/services/navidrome.nix;
|
||||||
servicesSnipeIT = import ./modules/services/snipe-it.nix;
|
servicesSnipeIT = import ./modules/services/snipe-it.nix;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -37,6 +38,8 @@
|
||||||
;
|
;
|
||||||
} // prev.lib.optionalAttrs (prev.system == "x86_64-linux") rec {
|
} // prev.lib.optionalAttrs (prev.system == "x86_64-linux") rec {
|
||||||
inherit (localPkgs)
|
inherit (localPkgs)
|
||||||
|
navidrome-bin
|
||||||
|
ryzenadj
|
||||||
ryzen_smu
|
ryzen_smu
|
||||||
;
|
;
|
||||||
} // prev.lib.optionalAttrs (builtins.elem prev.system prev.lib.platforms.linux) rec {
|
} // prev.lib.optionalAttrs (builtins.elem prev.system prev.lib.platforms.linux) rec {
|
||||||
|
|
|
@ -0,0 +1,82 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (lib) callPackageWith mkEnableOption mkIf mkOption
|
||||||
|
recursiveUpdate types;
|
||||||
|
|
||||||
|
cfg = config.services.navidrome;
|
||||||
|
package = callPackageWith pkgs ../../pkgs/navidrome-bin { };
|
||||||
|
settingsFormat = pkgs.formats.json {};
|
||||||
|
|
||||||
|
in lib.optionalAttrs (lib.versionOlder lib.version "21.11pre") {
|
||||||
|
|
||||||
|
options = {
|
||||||
|
services.navidrome = {
|
||||||
|
|
||||||
|
enable = mkEnableOption package.meta.description;
|
||||||
|
|
||||||
|
package = mkOption {
|
||||||
|
type = types.package;
|
||||||
|
default = package;
|
||||||
|
description = "Navidrome package to use.";
|
||||||
|
};
|
||||||
|
|
||||||
|
settings = mkOption rec {
|
||||||
|
type = settingsFormat.type;
|
||||||
|
apply = recursiveUpdate default;
|
||||||
|
default = {
|
||||||
|
Address = "127.0.0.1";
|
||||||
|
Port = 4533;
|
||||||
|
};
|
||||||
|
example = {
|
||||||
|
MusicFolder = "/mnt/music";
|
||||||
|
};
|
||||||
|
description = ''
|
||||||
|
Configuration for Navidrome, see <link xlink:href="https://www.navidrome.org/docs/usage/configuration-options/"/> for supported values.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
systemd.services.navidrome = {
|
||||||
|
description = "Navidrome Media Server";
|
||||||
|
after = [ "network.target" ];
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
serviceConfig = {
|
||||||
|
ExecStart = ''
|
||||||
|
${cfg.package}/bin/navidrome --configfile ${settingsFormat.generate "navidrome.json" cfg.settings}
|
||||||
|
'';
|
||||||
|
DynamicUser = true;
|
||||||
|
StateDirectory = "navidrome";
|
||||||
|
WorkingDirectory = "/var/lib/navidrome";
|
||||||
|
RuntimeDirectory = "navidrome";
|
||||||
|
RootDirectory = "/run/navidrome";
|
||||||
|
ReadWritePaths = "";
|
||||||
|
BindReadOnlyPaths = [
|
||||||
|
builtins.storeDir
|
||||||
|
] ++ lib.optional (cfg.settings ? MusicFolder) cfg.settings.MusicFolder;
|
||||||
|
CapabilityBoundingSet = "";
|
||||||
|
RestrictAddressFamilies = [ "AF_UNIX" "AF_INET" "AF_INET6" ];
|
||||||
|
RestrictNamespaces = true;
|
||||||
|
PrivateDevices = true;
|
||||||
|
PrivateUsers = true;
|
||||||
|
ProtectClock = true;
|
||||||
|
ProtectControlGroups = true;
|
||||||
|
ProtectHome = true;
|
||||||
|
ProtectKernelLogs = true;
|
||||||
|
ProtectKernelModules = true;
|
||||||
|
ProtectKernelTunables = true;
|
||||||
|
SystemCallArchitectures = "native";
|
||||||
|
SystemCallFilter = [ "@system-service" "~@privileged" "~@resources" ];
|
||||||
|
RestrictRealtime = true;
|
||||||
|
LockPersonality = true;
|
||||||
|
MemoryDenyWriteExecute = true;
|
||||||
|
UMask = "0066";
|
||||||
|
ProtectHostname = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
|
@ -8,6 +8,7 @@ let
|
||||||
|
|
||||||
phpPackage = cfg.phpPackage.withExtensions ({ enabled, all }:
|
phpPackage = cfg.phpPackage.withExtensions ({ enabled, all }:
|
||||||
enabled ++ (with all; [
|
enabled ++ (with all; [
|
||||||
|
json
|
||||||
openssl
|
openssl
|
||||||
pdo
|
pdo
|
||||||
mbstring
|
mbstring
|
||||||
|
@ -36,10 +37,7 @@ let
|
||||||
|
|
||||||
useSSL = with cfg.nginx; (addSSL || forceSSL || onlySSL || enableACME);
|
useSSL = with cfg.nginx; (addSSL || forceSSL || onlySSL || enableACME);
|
||||||
|
|
||||||
snipe-it = cfg.package.override {
|
snipe-it = cfg.package.override { inherit (cfg) cacheDir dataDir; };
|
||||||
inherit (cfg) cacheDir dataDir;
|
|
||||||
php = phpPackage; phpPackages = phpPackage.packages;
|
|
||||||
};
|
|
||||||
|
|
||||||
artisan = pkgs.writeShellScriptBin "snipe-it" ''
|
artisan = pkgs.writeShellScriptBin "snipe-it" ''
|
||||||
cd ${snipe-it}
|
cd ${snipe-it}
|
||||||
|
@ -63,7 +61,7 @@ in {
|
||||||
|
|
||||||
phpPackage = mkOption {
|
phpPackage = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
default = pkgs.php80;
|
default = pkgs.php74;
|
||||||
description = "PHP package to use.";
|
description = "PHP package to use.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,49 @@
|
||||||
|
{ lib, stdenv, pkgs, fetchurl, ffmpeg, ffmpegSupport ? true, makeWrapper, nixosTests }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "navidrome-bin";
|
||||||
|
version = "0.46.0";
|
||||||
|
|
||||||
|
|
||||||
|
src = fetchurl (if pkgs.system == "x86_64-linux"
|
||||||
|
then {
|
||||||
|
url = "https://github.com/navidrome/navidrome/releases/download/v${version}/navidrome_${version}_Linux_x86_64.tar.gz";
|
||||||
|
sha256 = "sha256-baBSQZnlcC5zq7wKWbia8xEMqZuCgkn/zyQWwtfHn/w=";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
url = "https://github.com/navidrome/navidrome/releases/download/v${version}/navidrome_${version}_Linux_arm64.tar.gz";
|
||||||
|
sha256 = "sha256-Km58BMc2ngv6CLqXkNpDIxC+nFb/fbvz7iBF0/xNcsU=";
|
||||||
|
});
|
||||||
|
|
||||||
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
|
unpackPhase = ''
|
||||||
|
tar xvf $src navidrome
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
|
mkdir -p $out/bin
|
||||||
|
cp navidrome $out/bin
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
|
postFixup = ''
|
||||||
|
wrapProgram $out/bin/navidrome \
|
||||||
|
--prefix PATH : ${makeBinPath (optional ffmpegSupport ffmpeg)}
|
||||||
|
'';
|
||||||
|
|
||||||
|
passthru.tests.navidrome = nixosTests.navidrome;
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Navidrome Music Server and Streamer compatible with Subsonic/Airsonic";
|
||||||
|
homepage = "https://www.navidrome.org/";
|
||||||
|
license = licenses.gpl3Only;
|
||||||
|
platforms = [ "x86_64-linux" "aarch64-linux" ];
|
||||||
|
maintainers = with maintainers; [ aciceri ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,25 @@
|
||||||
|
{ stdenv, lib, fetchFromGitHub, cmake, pciutils, ... }:
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "ryzenadj";
|
||||||
|
version = "0.8.2";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "FlyGoat";
|
||||||
|
repo = pname;
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "sha256-jRrIhKlejX0Yt1wkF/MBJk/6DAIGWWRK9oReCplNVKA=";
|
||||||
|
};
|
||||||
|
nativeBuildInputs = [ cmake pciutils ];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
install -D -m0755 ryzenadj $out/bin/ryzenadj
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Adjust power management settings for Ryzen mobile processors";
|
||||||
|
homepage = src.meta.homepage;
|
||||||
|
license = licenses.lgpl3;
|
||||||
|
maintainers = with maintainers; [ aw ];
|
||||||
|
platforms = [ "x86_64-linux" ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -4,16 +4,11 @@
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (phpPackages) composer;
|
inherit (phpPackages) composer;
|
||||||
|
|
||||||
filterSrc = src:
|
|
||||||
builtins.filterSource (path: type: type != "directory" || (baseNameOf path != ".git" && baseNameOf path != ".git" && baseNameOf path != ".svn")) src;
|
|
||||||
|
|
||||||
buildZipPackage = { name, src }:
|
buildZipPackage = { name, src }:
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
inherit name src;
|
inherit name src;
|
||||||
nativeBuildInputs = [ unzip ];
|
buildInputs = [ unzip ];
|
||||||
buildCommand = ''
|
buildCommand = ''
|
||||||
shopt -s dotglob
|
|
||||||
unzip $src
|
unzip $src
|
||||||
baseDir=$(find . -type d -mindepth 1 -maxdepth 1)
|
baseDir=$(find . -type d -mindepth 1 -maxdepth 1)
|
||||||
cd $baseDir
|
cd $baseDir
|
||||||
|
@ -138,9 +133,10 @@ let
|
||||||
''}
|
''}
|
||||||
'') (builtins.attrNames dependencies);
|
'') (builtins.attrNames dependencies);
|
||||||
|
|
||||||
extraArgs = removeAttrs args [ "packages" "devPackages" "buildInputs" ];
|
extraArgs = removeAttrs args [ "name" "packages" "devPackages" "buildInputs" ];
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation ({
|
stdenv.mkDerivation ({
|
||||||
|
name = "composer-${name}";
|
||||||
buildInputs = [ php composer ] ++ buildInputs;
|
buildInputs = [ php composer ] ++ buildInputs;
|
||||||
|
|
||||||
inherit unpackPhase buildPhase;
|
inherit unpackPhase buildPhase;
|
||||||
|
@ -237,7 +233,6 @@ let
|
||||||
} // extraArgs);
|
} // extraArgs);
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
inherit filterSrc;
|
|
||||||
composer = lib.makeOverridable composer;
|
composer = lib.makeOverridable composer;
|
||||||
buildZipPackage = lib.makeOverridable buildZipPackage;
|
buildZipPackage = lib.makeOverridable buildZipPackage;
|
||||||
buildPackage = lib.makeOverridable buildPackage;
|
buildPackage = lib.makeOverridable buildPackage;
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
{pkgs ? import <nixpkgs> {
|
{pkgs ? import <nixpkgs> {
|
||||||
inherit system;
|
inherit system;
|
||||||
}, system ? builtins.currentSystem, noDev ? false, php ? pkgs.php, phpPackages ? pkgs.phpPackages}:
|
}, system ? builtins.currentSystem, noDev ? false}:
|
||||||
|
|
||||||
let
|
let
|
||||||
composerEnv = import ./composer-env.nix {
|
composerEnv = import ./composer-env.nix {
|
||||||
inherit (pkgs) stdenv lib writeTextFile fetchurl unzip;
|
inherit (pkgs) stdenv lib writeTextFile fetchurl php unzip phpPackages;
|
||||||
inherit php phpPackages;
|
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
import ./php-packages.nix {
|
import ./php-packages.nix {
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
{ pkgs, system, lib, fetchFromGitHub
|
{ pkgs, system, lib, fetchFromGitHub
|
||||||
, php, phpPackages
|
|
||||||
, dataDir ? "/var/lib/snipe-it"
|
, dataDir ? "/var/lib/snipe-it"
|
||||||
, cacheDir ? "/var/cache/snipe-it"
|
, cacheDir ? "/var/cache/snipe-it"
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
package = (import ./composition.nix {
|
package = (import ./composition.nix {
|
||||||
inherit pkgs system php phpPackages;
|
inherit pkgs system;
|
||||||
noDev = true;
|
noDev = true;
|
||||||
}).overrideAttrs (oldAttrs: {
|
}).overrideAttrs (oldAttrs: {
|
||||||
installPhase = oldAttrs.installPhase + ''
|
installPhase = oldAttrs.installPhase + ''
|
||||||
|
@ -21,13 +20,13 @@ let
|
||||||
|
|
||||||
in package.override rec {
|
in package.override rec {
|
||||||
name = "snipe-it";
|
name = "snipe-it";
|
||||||
version = "6.0.0-RC-7";
|
version = "5.2.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "snipe";
|
owner = "snipe";
|
||||||
repo = "snipe-it";
|
repo = "snipe-it";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "sha256-GMGKo2qieTX5eR9WGZN7PnsPRUp14EysX1VyCzQZuUo=";
|
sha256 = "sha256-LT1JVHwmprLS52+OWgnddTKam5dEHDSuyHKxFG9WadM=";
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -2,17 +2,19 @@
|
||||||
|
|
||||||
kernel.stdenv.mkDerivation rec {
|
kernel.stdenv.mkDerivation rec {
|
||||||
pname = "xmm7360-pci";
|
pname = "xmm7360-pci";
|
||||||
version = "unstable-20220210";
|
version = "unstable-20210802";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "xmm7360";
|
owner = "xmm7360";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "cf6625ace8da1bd44f46eb71b2557ac01ee1d11a";
|
rev = "b28714b6fb73887ecd5c0c25ffc0613d6eab6533";
|
||||||
sha256 = "sha256-IVrqFk/M6OZtI8v79DCtlHBBYdj95p6xI6dmsSua8ns=";
|
sha256 = "sha256-wNSQZvPL297pTAVT9Hj4IgcsHSc7KVNe7K0raS0bObg=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = kernel.moduleBuildDependencies;
|
nativeBuildInputs = kernel.moduleBuildDependencies;
|
||||||
|
|
||||||
|
patches = [ ./fix.patch ];
|
||||||
|
|
||||||
makeFlags = [
|
makeFlags = [
|
||||||
"KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
|
"KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
|
||||||
];
|
];
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
diff --git a/xmm7360.c b/xmm7360.c
|
||||||
|
index ccd149d..5a4dc74 100644
|
||||||
|
--- a/xmm7360.c
|
||||||
|
+++ b/xmm7360.c
|
||||||
|
@@ -1272,7 +1272,7 @@ static int xmm7360_tty_write(struct tty_struct *tty,
|
||||||
|
return written;
|
||||||
|
}
|
||||||
|
|
||||||
|
-static int xmm7360_tty_write_room(struct tty_struct *tty)
|
||||||
|
+static unsigned int xmm7360_tty_write_room(struct tty_struct *tty)
|
||||||
|
{
|
||||||
|
struct queue_pair *qp = tty->driver_data;
|
||||||
|
if (!xmm7360_qp_can_write(qp))
|
||||||
|
@@ -1555,7 +1555,7 @@ static void xmm7360_exit(void)
|
||||||
|
pci_unregister_driver(&xmm7360_driver);
|
||||||
|
unregister_chrdev_region(xmm_base, 8);
|
||||||
|
tty_unregister_driver(xmm7360_tty_driver);
|
||||||
|
- put_tty_driver(xmm7360_tty_driver);
|
||||||
|
+ tty_driver_kref_put(xmm7360_tty_driver);
|
||||||
|
}
|
||||||
|
|
||||||
|
module_init(xmm7360_init);
|
Loading…
Reference in New Issue