Compare commits

...

5 Commits

Author SHA1 Message Date
Andreas Wiese 65218d2d20
snipe-it: 5.2.0 -> 6.0.0-RC-7 2022-04-14 01:17:46 +02:00
Andreas Wiese 5496c6acf8 xmm7360-pci: unstable-20210802 -> unstable-20220210 2022-04-13 13:48:51 +02:00
Andreas Wiese 41ce21aae4 navidrome: remove (package and module)
This is upstream in 21.11.
2022-04-13 13:48:50 +02:00
Andreas Wiese 74f4e7289b flake.lock: update nixpkgs 21.05 -> 21.11
Flake lock file changes:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/348bc5de8bca09c624f5c4975f538684da4713d2' (2021-08-08)
  → 'github:NixOS/nixpkgs/604c44137d97b5111be1ca5c0d97f6e24fbc5c2c' (2022-01-23)
2022-01-24 11:17:06 +01:00
Andreas Wiese dc0061e016 ryzenadj: remove
Please use nixpkgs#ryzenadj.
2022-01-24 11:03:33 +01:00
13 changed files with 1101 additions and 866 deletions

View File

@ -14,10 +14,6 @@ in 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; };
} // optionalAttrs (builtins.elem pkgs.system pkgs.lib.platforms.linux) rec {

View File

@ -2,16 +2,16 @@
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1628427351,
"narHash": "sha256-WuZUIQ07AvRw+T9wvQ3qFf8MXmKZ+ktZz9drNgWXDbs=",
"lastModified": 1642961095,
"narHash": "sha256-RLatktZmvwFBOyqdoIk4qdS4OGKB7aKIvvs4ZP2L8D8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "348bc5de8bca09c624f5c4975f538684da4713d2",
"rev": "604c44137d97b5111be1ca5c0d97f6e24fbc5c2c",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-21.05-small",
"ref": "nixos-21.11-small",
"repo": "nixpkgs",
"type": "github"
}

View File

@ -1,7 +1,7 @@
{
description = "meterriblecrew.net package flake";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-21.05-small";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-21.11-small";
outputs = inputs@{ self, nixpkgs }: let
@ -20,7 +20,6 @@
nixosModules = {
ryzenSMU = import ./modules/ryzenSMU;
servicesNavidrome = import ./modules/services/navidrome.nix;
servicesSnipeIT = import ./modules/services/snipe-it.nix;
};
@ -38,8 +37,6 @@
;
} // prev.lib.optionalAttrs (prev.system == "x86_64-linux") rec {
inherit (localPkgs)
navidrome-bin
ryzenadj
ryzen_smu
;
} // prev.lib.optionalAttrs (builtins.elem prev.system prev.lib.platforms.linux) rec {

View File

@ -1,82 +0,0 @@
{ 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;
};
};
};
}

View File

@ -8,7 +8,6 @@ let
phpPackage = cfg.phpPackage.withExtensions ({ enabled, all }:
enabled ++ (with all; [
json
openssl
pdo
mbstring
@ -37,7 +36,10 @@ let
useSSL = with cfg.nginx; (addSSL || forceSSL || onlySSL || enableACME);
snipe-it = cfg.package.override { inherit (cfg) cacheDir dataDir; };
snipe-it = cfg.package.override {
inherit (cfg) cacheDir dataDir;
php = phpPackage; phpPackages = phpPackage.packages;
};
artisan = pkgs.writeShellScriptBin "snipe-it" ''
cd ${snipe-it}
@ -61,7 +63,7 @@ in {
phpPackage = mkOption {
type = types.package;
default = pkgs.php74;
default = pkgs.php80;
description = "PHP package to use.";
};

View File

@ -1,49 +0,0 @@
{ 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 ];
};
}

View File

@ -1,25 +0,0 @@
{ 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" ];
};
}

View File

@ -4,11 +4,16 @@
let
inherit (phpPackages) composer;
filterSrc = src:
builtins.filterSource (path: type: type != "directory" || (baseNameOf path != ".git" && baseNameOf path != ".git" && baseNameOf path != ".svn")) src;
buildZipPackage = { name, src }:
stdenv.mkDerivation {
inherit name src;
buildInputs = [ unzip ];
nativeBuildInputs = [ unzip ];
buildCommand = ''
shopt -s dotglob
unzip $src
baseDir=$(find . -type d -mindepth 1 -maxdepth 1)
cd $baseDir
@ -133,10 +138,9 @@ let
''}
'') (builtins.attrNames dependencies);
extraArgs = removeAttrs args [ "name" "packages" "devPackages" "buildInputs" ];
extraArgs = removeAttrs args [ "packages" "devPackages" "buildInputs" ];
in
stdenv.mkDerivation ({
name = "composer-${name}";
buildInputs = [ php composer ] ++ buildInputs;
inherit unpackPhase buildPhase;
@ -233,6 +237,7 @@ let
} // extraArgs);
in
{
inherit filterSrc;
composer = lib.makeOverridable composer;
buildZipPackage = lib.makeOverridable buildZipPackage;
buildPackage = lib.makeOverridable buildPackage;

View File

@ -1,10 +1,11 @@
{pkgs ? import <nixpkgs> {
inherit system;
}, system ? builtins.currentSystem, noDev ? false}:
}, system ? builtins.currentSystem, noDev ? false, php ? pkgs.php, phpPackages ? pkgs.phpPackages}:
let
composerEnv = import ./composer-env.nix {
inherit (pkgs) stdenv lib writeTextFile fetchurl php unzip phpPackages;
inherit (pkgs) stdenv lib writeTextFile fetchurl unzip;
inherit php phpPackages;
};
in
import ./php-packages.nix {

View File

@ -1,11 +1,12 @@
{ pkgs, system, lib, fetchFromGitHub
, php, phpPackages
, dataDir ? "/var/lib/snipe-it"
, cacheDir ? "/var/cache/snipe-it"
}:
let
package = (import ./composition.nix {
inherit pkgs system;
inherit pkgs system php phpPackages;
noDev = true;
}).overrideAttrs (oldAttrs: {
installPhase = oldAttrs.installPhase + ''
@ -20,13 +21,13 @@ let
in package.override rec {
name = "snipe-it";
version = "5.2.0";
version = "6.0.0-RC-7";
src = fetchFromGitHub {
owner = "snipe";
repo = "snipe-it";
rev = "v${version}";
sha256 = "sha256-LT1JVHwmprLS52+OWgnddTKam5dEHDSuyHKxFG9WadM=";
sha256 = "sha256-GMGKo2qieTX5eR9WGZN7PnsPRUp14EysX1VyCzQZuUo=";
};
meta = with lib; {

File diff suppressed because it is too large Load Diff

View File

@ -2,19 +2,17 @@
kernel.stdenv.mkDerivation rec {
pname = "xmm7360-pci";
version = "unstable-20210802";
version = "unstable-20220210";
src = fetchFromGitHub {
owner = "xmm7360";
repo = pname;
rev = "b28714b6fb73887ecd5c0c25ffc0613d6eab6533";
sha256 = "sha256-wNSQZvPL297pTAVT9Hj4IgcsHSc7KVNe7K0raS0bObg=";
rev = "cf6625ace8da1bd44f46eb71b2557ac01ee1d11a";
sha256 = "sha256-IVrqFk/M6OZtI8v79DCtlHBBYdj95p6xI6dmsSua8ns=";
};
nativeBuildInputs = kernel.moduleBuildDependencies;
patches = [ ./fix.patch ];
makeFlags = [
"KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
];

View File

@ -1,22 +0,0 @@
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);