Compare commits
4 commits
99bb1e74c7
...
a7608ace94
Author | SHA1 | Date | |
---|---|---|---|
a7608ace94 | |||
a989bacbd7 | |||
fb9ccce37a | |||
fc320d3fd9 |
30
flake.lock
30
flake.lock
|
@ -213,11 +213,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1728334376,
|
"lastModified": 1730190761,
|
||||||
"narHash": "sha256-CTKEKPzD/j8FK6H4DO3EjyixZd3HHvgAgfnCwpGFP5c=",
|
"narHash": "sha256-o5m5WzvY6cGIDupuOvjgNSS8AN6yP2iI9MtUC6q/uos=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "disko",
|
"repo": "disko",
|
||||||
"rev": "d39ee334984fcdae6244f5a8e6ab857479cbaefe",
|
"rev": "3979285062d6781525cded0f6c4ff92e71376b55",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -489,11 +489,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1728263287,
|
"lastModified": 1729999765,
|
||||||
"narHash": "sha256-GJDtsxz2/zw6g/Nrp4XVWBS5IaZ7ZUkuvxPOBEDe7pg=",
|
"narHash": "sha256-LYsavZXitFjjyETZoij8usXjTa7fa9AIF3Sk3MJSX+Y=",
|
||||||
"owner": "Mic92",
|
"owner": "Mic92",
|
||||||
"repo": "nix-index-database",
|
"repo": "nix-index-database",
|
||||||
"rev": "5fce10c871bab6d7d5ac9e5e7efbb3a2783f5259",
|
"rev": "0e3a8778c2ee218eff8de6aacf3d2fa6c33b2d4f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -531,11 +531,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1728193676,
|
"lastModified": 1730137625,
|
||||||
"narHash": "sha256-PbDWAIjKJdlVg+qQRhzdSor04bAPApDqIv2DofTyynk=",
|
"narHash": "sha256-9z8oOgFZiaguj+bbi3k4QhAD6JabWrnv7fscC/mt0KE=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "ecbc1ca8ffd6aea8372ad16be9ebbb39889e55b6",
|
"rev": "64b80bfb316b57cdb8919a9110ef63393d74382a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -546,11 +546,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs-unstable": {
|
"nixpkgs-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1728018373,
|
"lastModified": 1729880355,
|
||||||
"narHash": "sha256-NOiTvBbRLIOe5F6RbHaAh6++BNjsb149fGZd1T4+KBg=",
|
"narHash": "sha256-RP+OQ6koQQLX5nw0NmcDrzvGL8HDLnyXt/jHhL1jwjM=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "bc947f541ae55e999ffdb4013441347d83b00feb",
|
"rev": "18536bf04cd71abd345f9579158841376fdd0c5a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -837,11 +837,11 @@
|
||||||
},
|
},
|
||||||
"vpsadminos": {
|
"vpsadminos": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1728335559,
|
"lastModified": 1730290190,
|
||||||
"narHash": "sha256-95/KJBA449oAjf6bLwaCvDgys7yE8vKXY3wHe/uUkiw=",
|
"narHash": "sha256-a+op2lnWrCytuEhLOE24SKR/irRfjwDEHkpLyAL5P90=",
|
||||||
"owner": "vpsfreecz",
|
"owner": "vpsfreecz",
|
||||||
"repo": "vpsadminos",
|
"repo": "vpsadminos",
|
||||||
"rev": "c928bdec26484e99621cc76cb165abb73aa7d029",
|
"rev": "63ac771b9667b45ab2ea87363f69ca7f85668e9b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -24,6 +24,7 @@ in
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
./partition.nix
|
./partition.nix
|
||||||
./amdgpu.nix
|
./amdgpu.nix
|
||||||
|
./factorio-server.nix
|
||||||
];
|
];
|
||||||
boot.initrd.availableKernelModules = [
|
boot.initrd.availableKernelModules = [
|
||||||
"nvme"
|
"nvme"
|
||||||
|
@ -38,13 +39,7 @@ in
|
||||||
|
|
||||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
|
||||||
boot.extraModulePackages = with config.boot.kernelPackages; [
|
boot.extraModulePackages = with config.boot.kernelPackages; [ zenpower ];
|
||||||
zenpower
|
|
||||||
(pkgs.linux-bluetooth.override {
|
|
||||||
kernel = config.boot.kernelPackages.kernel;
|
|
||||||
patches = [ ../../patches/linux/v2-Bluetooth-btusb-Fix-regression-with-CSR-controllers.diff ];
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||||
boot.kernelModules = [
|
boot.kernelModules = [
|
||||||
|
|
17
hosts/monolith/factorio-server.nix
Normal file
17
hosts/monolith/factorio-server.nix
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
services.factorio = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.factorio-headless; # I override this in ./pkgs
|
||||||
|
public = true;
|
||||||
|
lan = true;
|
||||||
|
openFirewall = true;
|
||||||
|
admins = [ "lelgenio" ];
|
||||||
|
extraSettingsFile = config.age.secrets.factorio-settings.path;
|
||||||
|
};
|
||||||
|
|
||||||
|
age.secrets.factorio-settings = {
|
||||||
|
file = ../../secrets/factorio-settings.age;
|
||||||
|
mode = "777";
|
||||||
|
};
|
||||||
|
}
|
|
@ -21,7 +21,6 @@
|
||||||
./invidious.nix
|
./invidious.nix
|
||||||
./davi.nix
|
./davi.nix
|
||||||
./goofs.nix
|
./goofs.nix
|
||||||
./factorio-server.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
networking.hostName = "phantom";
|
networking.hostName = "phantom";
|
||||||
|
|
|
@ -1,24 +0,0 @@
|
||||||
{ config, pkgs, ... }:
|
|
||||||
{
|
|
||||||
services.factorio = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.unstable.factorio-headless.overrideAttrs (_: rec {
|
|
||||||
version = "2.0.12";
|
|
||||||
src = pkgs.fetchurl {
|
|
||||||
name = "factorio_headless_x64-${version}.tar.xz";
|
|
||||||
url = "https://www.factorio.com/get-download/${version}/headless/linux64";
|
|
||||||
hash = "sha256-0vgg5eJ6ZEFO0TUixNsByCs8YyPGOArgqnXbT5RIjTE=";
|
|
||||||
};
|
|
||||||
});
|
|
||||||
public = true;
|
|
||||||
lan = true;
|
|
||||||
openFirewall = true;
|
|
||||||
admins = [ "lelgenio" ];
|
|
||||||
extraSettingsFile = config.age.secrets.phantom-factorio-settings.path;
|
|
||||||
};
|
|
||||||
|
|
||||||
age.secrets.phantom-factorio-settings = {
|
|
||||||
file = ../../secrets/phantom-factorio-settings.age;
|
|
||||||
mode = "777";
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,24 +0,0 @@
|
||||||
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
|
|
||||||
index c0b6ef8ee5da..f72218c1037e 100644
|
|
||||||
--- a/drivers/bluetooth/btusb.c
|
|
||||||
+++ b/drivers/bluetooth/btusb.c
|
|
||||||
@@ -1366,10 +1366,15 @@ static int btusb_submit_intr_urb(struct hci_dev *hdev, gfp_t mem_flags)
|
|
||||||
if (!urb)
|
|
||||||
return -ENOMEM;
|
|
||||||
|
|
||||||
- /* Use maximum HCI Event size so the USB stack handles
|
|
||||||
- * ZPL/short-transfer automatically.
|
|
||||||
- */
|
|
||||||
- size = HCI_MAX_EVENT_SIZE;
|
|
||||||
+ if (le16_to_cpu(data->udev->descriptor.idVendor) == 0x0a12 &&
|
|
||||||
+ le16_to_cpu(data->udev->descriptor.idProduct) == 0x0001)
|
|
||||||
+ /* Fake CSR devices don't seem to support sort-transter */
|
|
||||||
+ size = le16_to_cpu(data->intr_ep->wMaxPacketSize);
|
|
||||||
+ else
|
|
||||||
+ /* Use maximum HCI Event size so the USB stack handles
|
|
||||||
+ * ZPL/short-transfer automatically.
|
|
||||||
+ */
|
|
||||||
+ size = HCI_MAX_EVENT_SIZE;
|
|
||||||
|
|
||||||
buf = kmalloc(size, mem_flags);
|
|
||||||
if (!buf) {
|
|
|
@ -8,5 +8,7 @@ rec {
|
||||||
emmet-cli = pkgs.callPackage ./emmet-cli.nix { };
|
emmet-cli = pkgs.callPackage ./emmet-cli.nix { };
|
||||||
material-wifi-icons = pkgs.callPackage ./material-wifi-icons.nix { };
|
material-wifi-icons = pkgs.callPackage ./material-wifi-icons.nix { };
|
||||||
gnome-pass-search-provider = pkgs.callPackage ./gnome-pass-search-provider.nix { };
|
gnome-pass-search-provider = pkgs.callPackage ./gnome-pass-search-provider.nix { };
|
||||||
linux-bluetooth = pkgs.callPackage ./linux-bluetooth.nix { };
|
factorio-headless = pkgs.callPackage ./factorio-headless {
|
||||||
|
inherit (pkgs.unstable) factorio-headless;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
10
pkgs/factorio-headless/default.nix
Normal file
10
pkgs/factorio-headless/default.nix
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{ factorio-headless, pkgs }:
|
||||||
|
|
||||||
|
factorio-headless.overrideAttrs (_: rec {
|
||||||
|
version = "2.0.13";
|
||||||
|
src = pkgs.fetchurl {
|
||||||
|
name = "factorio_headless_x64-${version}.tar.xz";
|
||||||
|
url = "https://www.factorio.com/get-download/${version}/headless/linux64";
|
||||||
|
hash = "sha256-J7NpAaOeWTrfKEGMAoYULGx6n4PRVpY8c2m9QFolx9E=";
|
||||||
|
};
|
||||||
|
})
|
14
pkgs/factorio-headless/update.sh
Executable file
14
pkgs/factorio-headless/update.sh
Executable file
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -xe
|
||||||
|
|
||||||
|
cd "$(dirname $0)"
|
||||||
|
|
||||||
|
current_version="$(rg '^.*?version\s*=\s*"(.+)".*?$' --replace '$1' ./default.nix)"
|
||||||
|
current_hash="$(rg '^.*?hash\s*=\s*"(.+)".*?$' --replace '$1' ./default.nix)"
|
||||||
|
|
||||||
|
new_version="$(curl https://factorio.com/api/latest-releases | jq -r .stable.headless)"
|
||||||
|
new_hash="$(nix-hash --to-sri --type sha256 $(nix-prefetch-url --type sha256 https://www.factorio.com/get-download/${new_version}/headless/linux64))"
|
||||||
|
|
||||||
|
sd "$current_version" "$new_version" ./default.nix
|
||||||
|
sd "$current_hash" "$new_hash" ./default.nix
|
|
@ -1,47 +0,0 @@
|
||||||
{
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
kernel ? pkgs.linuxPackages_latest.kernel,
|
|
||||||
patches ? [ ],
|
|
||||||
}:
|
|
||||||
|
|
||||||
pkgs.stdenv.mkDerivation {
|
|
||||||
pname = "bluetooth-kernel-module";
|
|
||||||
inherit (kernel)
|
|
||||||
src
|
|
||||||
version
|
|
||||||
postPatch
|
|
||||||
nativeBuildInputs
|
|
||||||
;
|
|
||||||
|
|
||||||
inherit patches;
|
|
||||||
|
|
||||||
kernel_dev = kernel.dev;
|
|
||||||
kernelVersion = kernel.modDirVersion;
|
|
||||||
|
|
||||||
modulePath = "drivers/bluetooth";
|
|
||||||
|
|
||||||
buildPhase = ''
|
|
||||||
BUILT_KERNEL=$kernel_dev/lib/modules/$kernelVersion/build
|
|
||||||
|
|
||||||
cp $BUILT_KERNEL/Module.symvers .
|
|
||||||
cp $BUILT_KERNEL/.config .
|
|
||||||
cp $kernel_dev/vmlinux .
|
|
||||||
|
|
||||||
make "-j$NIX_BUILD_CORES" modules_prepare
|
|
||||||
make "-j$NIX_BUILD_CORES" M=$modulePath modules
|
|
||||||
'';
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
make \
|
|
||||||
INSTALL_MOD_PATH="$out" \
|
|
||||||
XZ="xz -T$NIX_BUILD_CORES" \
|
|
||||||
M="$modulePath" \
|
|
||||||
modules_install
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
description = "Bluetooth kernel module";
|
|
||||||
license = lib.licenses.gpl3;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -12,7 +12,7 @@ in
|
||||||
"monolith-forgejo-runner-token.age".publicKeys = [ main_ssh_public_key ];
|
"monolith-forgejo-runner-token.age".publicKeys = [ main_ssh_public_key ];
|
||||||
"lelgenio-cachix.age".publicKeys = [ main_ssh_public_key ];
|
"lelgenio-cachix.age".publicKeys = [ main_ssh_public_key ];
|
||||||
"monolith-nix-serve-privkey.age".publicKeys = [ main_ssh_public_key ];
|
"monolith-nix-serve-privkey.age".publicKeys = [ main_ssh_public_key ];
|
||||||
"phantom-factorio-settings.age".publicKeys = [ main_ssh_public_key ];
|
"factorio-settings.age".publicKeys = [ main_ssh_public_key ];
|
||||||
"phantom-nextcloud.age".publicKeys = [ main_ssh_public_key ];
|
"phantom-nextcloud.age".publicKeys = [ main_ssh_public_key ];
|
||||||
"phantom-writefreely.age".publicKeys = [ main_ssh_public_key ];
|
"phantom-writefreely.age".publicKeys = [ main_ssh_public_key ];
|
||||||
"phantom-renawiki.age".publicKeys = [ main_ssh_public_key ];
|
"phantom-renawiki.age".publicKeys = [ main_ssh_public_key ];
|
||||||
|
|
Loading…
Reference in a new issue