Move Blu-ray drive from sayuri to fuuko

This removes makemkv-specific configuration from sayuri and adds it to
fuuko. It also changes the makemkv sandbox to now hardcode fuuko’s
configuration.
nazuna
Simon Bruder 2022-10-15 23:27:12 +02:00
parent e4c8012f57
commit aaaf7d3ccc
Signed by: simon
GPG Key ID: 8D3C82F9F309F8EC
4 changed files with 9 additions and 10 deletions

View File

@ -7,7 +7,7 @@
];
boot = {
kernelModules = [ "kvm-amd" ];
kernelModules = [ "kvm-amd" "sg" ];
extraModulePackages = [ ];
supportedFilesystems = [ "btrfs" ];
kernelParams = [ "ip=dhcp" ];

View File

@ -15,7 +15,7 @@
};
initrd = {
availableKernelModules = [ "aesni_intel" "ahci" "ehci_pci" "nvme" "sd_mod" "sr_mod" "usb_storage" "usbhid" "xhci_pci" ];
kernelModules = [ "dm-snapshot" "sg" ];
kernelModules = [ "dm-snapshot" ];
luks.devices = {
root = {
name = "root";

View File

@ -4,6 +4,7 @@
isNormalUser = true;
extraGroups = [
"adbusers"
"cdrom"
"corectrl"
"dialout"
"keys"

View File

@ -1,6 +1,6 @@
{ lib, nixosConfig, pkgs, ... }:
let
# TODO: Do not hardcode /dev/{sr0,sg2} (right paths on sayuri)
# TODO: Do not hardcode /dev/{sr0,sg1} (right paths on fuuko)
makemkv-sandbox = pkgs.writeShellScriptBin "makemkv-sandbox" /* bash */ ''
set -euo pipefail
mkdir -p $HOME/.MakeMKV
@ -9,25 +9,23 @@ let
--proc /proc \
--dev /dev \
--unshare-all \
--share-net \
--die-with-parent \
--ro-bind /nix/store /nix/store \
--dev-bind /dev/dri /dev/dri \
--ro-bind /sys/dev/char /sys/dev/char \
--ro-bind /sys/devices/pci0000:00 /sys/devices/pci0000:00 \
--ro-bind $XDG_RUNTIME_DIR/$WAYLAND_DISPLAY $XDG_RUNTIME_DIR/$WAYLAND_DISPLAY \
--ro-bind /run/opengl-driver /run/opengl-driver \
--ro-bind /etc/fonts /etc/fonts \
--new-session \
--bind $HOME/.MakeMKV $HOME/.MakeMKV \
--dev-bind-try /dev/sr0 /dev/sr0 \
--dev-bind-try /dev/sg2 /dev/sg2 \
--dev-bind-try /dev/sg1 /dev/sg1 \
--dev-bind-try /sys/bus/scsi /sys/bus/scsi \
--bind ''${PWD_TARGET:-$PWD} ''${PWD_TARGET:-$PWD} \
${pkgs.unstable.makemkv}/bin/makemkv
'';
in
lib.mkIf (nixosConfig.sbruder.gui.enable && nixosConfig.sbruder.unfree.allowSoftware) {
home.packages = [
lib.mkIf ((nixosConfig.sbruder.gui.enable || nixosConfig.networking.hostName == "fuuko") && nixosConfig.sbruder.unfree.allowSoftware) {
home.packages = with pkgs; [
makemkv-sandbox
waypipe
];
}