mirror of https://github.com/materusPL/Nixerus.git
configurations: update
This commit is contained in:
parent
5748882088
commit
dacf1e1fe8
|
@ -157,9 +157,9 @@
|
|||
services.openssh.enable = true;
|
||||
|
||||
# Open ports in the firewall.
|
||||
networking.firewall.allowedTCPPorts = [ 22 27015 25565 24454 ];
|
||||
networking.firewall.allowedTCPPorts = [ 22 27015 25565 24454 8123 ];
|
||||
networking.firewall.allowedTCPPortRanges = [{ from = 16262; to = 16272; }];
|
||||
networking.firewall.allowedUDPPorts = [ 22 16261 16262 8766 8767 25565 24454 ];
|
||||
networking.firewall.allowedUDPPorts = [ 22 16261 16262 8766 8767 25565 24454 8123 ];
|
||||
# Or disable the firewall altogether.
|
||||
networking.firewall.enable = true;
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ in
|
|||
hardware.firmware = with pkgs; [
|
||||
materusPkgs.amdgpu-pro-libs.firmware.vcn
|
||||
materusPkgs.amdgpu-pro-libs.firmware
|
||||
pkg.linux-firmware
|
||||
linux-firmware
|
||||
alsa-firmware
|
||||
sof-firmware
|
||||
];
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{ config, pkgs, lib, inputs, materusFlake, materusPkgs, ... }:
|
||||
{
|
||||
virtualisation.lxc.enable = true;
|
||||
virtualisation.lxc.lxcfs.enable = true;
|
||||
virtualisation.lxd.enable = true;
|
||||
virtualisation.lxc.enable = false;
|
||||
virtualisation.lxc.lxcfs.enable = false;
|
||||
virtualisation.lxd.enable = false;
|
||||
#virtualisation.lxd.recommendedSysctlSettings = true;
|
||||
|
||||
programs.corectrl.enable = true;
|
||||
|
@ -83,7 +83,7 @@
|
|||
|
||||
services.xserver.libinput.enable = true;
|
||||
|
||||
virtualisation.waydroid.enable = true;
|
||||
virtualisation.waydroid.enable = false;
|
||||
virtualisation.podman = {
|
||||
enable = true;
|
||||
#enableNvidia = true;
|
||||
|
@ -220,7 +220,7 @@
|
|||
aspellDicts.pl
|
||||
aspellDicts.en
|
||||
aspellDicts.en-computers
|
||||
|
||||
steamtinkerlaunch
|
||||
distrobox
|
||||
|
||||
p7zip
|
||||
|
@ -302,10 +302,7 @@
|
|||
|
||||
|
||||
|
||||
system.activationScripts.libvirt-hooks.text =
|
||||
''
|
||||
ln -Tfs /etc/libvirt/hooks /var/lib/libvirt/hooks
|
||||
'';
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -4,40 +4,6 @@
|
|||
./win10
|
||||
];
|
||||
|
||||
system.activationScripts.libvirt-hooks.text =
|
||||
''
|
||||
ln -Tfs /etc/libvirt/hooks /var/lib/libvirt/hooks
|
||||
'';
|
||||
environment.etc."libvirt/hooks/qemu" = {
|
||||
text =
|
||||
''
|
||||
#!${pkgs.bash}/bin/bash
|
||||
GUEST_NAME="''$1"
|
||||
HOOK_NAME="''$2"
|
||||
STATE_NAME="''$3"
|
||||
MISC="''${@:4}"
|
||||
|
||||
BASEDIR="''$(dirname ''$0)"
|
||||
|
||||
HOOKPATH="''$BASEDIR/qemu.d/''$GUEST_NAME/''$HOOK_NAME/''$STATE_NAME"
|
||||
|
||||
set -e # If a script exits with an error, we should as well.
|
||||
|
||||
# check if it's a non-empty executable file
|
||||
if [ -f "''$HOOKPATH" ] && [ -s "''$HOOKPATH"] && [ -x "''$HOOKPATH" ]; then
|
||||
eval \"''$HOOKPATH\" "$@"
|
||||
elif [ -d "''$HOOKPATH" ]; then
|
||||
while read file; do
|
||||
# check for null string
|
||||
if [ ! -z "''$file" ]; then
|
||||
eval \"''$file\" "''$@"
|
||||
fi
|
||||
done <<< "''$(find -L "''$HOOKPATH" -maxdepth 1 -type f -executable -print;)"
|
||||
fi
|
||||
'';
|
||||
mode = "0755";
|
||||
};
|
||||
|
||||
|
||||
virtualisation.libvirtd = {
|
||||
enable = true;
|
||||
|
@ -50,6 +16,8 @@
|
|||
qemu.package = pkgs.qemu_full;
|
||||
};
|
||||
|
||||
virtualisation.spiceUSBRedirection.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
virtiofsd
|
||||
config.virtualisation.libvirtd.qemu.package
|
||||
|
|
|
@ -1,63 +1,90 @@
|
|||
{ config, pkgs, lib, inputs, materusFlake, ... }:
|
||||
let
|
||||
startHook = ''
|
||||
# Debugging
|
||||
# exec 19>/home/materus/startlogfile
|
||||
# BASH_XTRACEFD=19
|
||||
# set -x
|
||||
|
||||
# exec 3>&1 4>&2
|
||||
# trap 'exec 2>&4 1>&3' 0 1 2 3
|
||||
# exec 1>/home/materus/startlogfile.out 2>&1
|
||||
|
||||
|
||||
systemctl stop mountWin10Share.service
|
||||
sleep 1s
|
||||
|
||||
echo ''$VIRSH_GPU_VIDEO > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/driver/unbind"
|
||||
echo ''$VIRSH_GPU_AUDIO > "/sys/bus/pci/devices/''${VIRSH_GPU_AUDIO}/driver/unbind"
|
||||
|
||||
sleep 1s
|
||||
|
||||
echo "8" > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/resource0_resize"
|
||||
echo "1" > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/resource2_resize"
|
||||
|
||||
|
||||
'';
|
||||
stopHook = ''
|
||||
|
||||
# Debugging
|
||||
# exec 19>/home/materus/stoplogfile
|
||||
# BASH_XTRACEFD=19
|
||||
# set -x
|
||||
|
||||
# exec 3>&1 4>&2
|
||||
# trap 'exec 2>&4 1>&3' 0 1 2 3
|
||||
# exec 1>/home/materus/stoplogfile.out 2>&1
|
||||
|
||||
|
||||
|
||||
|
||||
echo ''$VIRSH_GPU_VIDEO > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/driver/unbind"
|
||||
echo ''$VIRSH_GPU_AUDIO > "/sys/bus/pci/devices/''${VIRSH_GPU_AUDIO}/driver/unbind"
|
||||
|
||||
|
||||
sleep 1s
|
||||
|
||||
echo "15" > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/resource0_resize"
|
||||
echo "8" > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/resource2_resize"
|
||||
|
||||
echo ''$VIRSH_GPU_VIDEO > /sys/bus/pci/drivers/amdgpu/bind
|
||||
echo ''$VIRSH_GPU_AUDIO > /sys/bus/pci/drivers/snd_hda_intel/bind
|
||||
|
||||
|
||||
systemctl start mountWin10Share.service
|
||||
|
||||
'';
|
||||
in
|
||||
{
|
||||
|
||||
|
||||
|
||||
environment.etc = {
|
||||
"libvirt/hooks/kvm.conf" = {
|
||||
text =
|
||||
''
|
||||
VIRSH_GPU_VIDEO="0000:03:00.0"
|
||||
VIRSH_GPU_AUDIO="0000:03:00.1"
|
||||
'';
|
||||
mode = "0755";
|
||||
};
|
||||
|
||||
"libvirt/hooks/qemu.d/win10/prepare/begin/start.sh" = {
|
||||
text = ''
|
||||
#!${pkgs.bash}/bin/bash
|
||||
source /etc/libvirt/hooks/kvm.conf
|
||||
|
||||
systemctl stop mountWin10Share.service
|
||||
|
||||
echo ''$VIRSH_GPU_VIDEO > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/driver/unbind"
|
||||
echo ''$VIRSH_GPU_AUDIO > "/sys/bus/pci/devices/''${VIRSH_GPU_AUDIO}/driver/unbind"
|
||||
|
||||
sleep 1s
|
||||
|
||||
echo "8" > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/resource0_resize"
|
||||
echo "1" > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/resource2_resize"
|
||||
virtualisation.libvirtd.hooks.qemu = {
|
||||
"win10" = pkgs.writeShellScript "win10.sh" ''
|
||||
VIRSH_GPU_VIDEO="0000:03:00.0"
|
||||
VIRSH_GPU_AUDIO="0000:03:00.1"
|
||||
VIRSH_USB1="0000:10:00.0"
|
||||
|
||||
'';
|
||||
mode = "0755";
|
||||
};
|
||||
if [ ''$1 = "win10" ]; then
|
||||
if [ ''$2 = "prepare" ] && [ ''$3 = "begin" ]; then
|
||||
${startHook}
|
||||
fi
|
||||
|
||||
"libvirt/hooks/qemu.d/win10/release/end/stop.sh" = {
|
||||
text = ''
|
||||
#!${pkgs.bash}/bin/bash
|
||||
source /etc/libvirt/hooks/kvm.conf
|
||||
if [ ''$2 = "release" ] && [ ''$3 = "end" ]; then
|
||||
${stopHook}
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
|
||||
echo ''$VIRSH_GPU_VIDEO > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/driver/unbind"
|
||||
echo ''$VIRSH_GPU_AUDIO > "/sys/bus/pci/devices/''${VIRSH_GPU_AUDIO}/driver/unbind"
|
||||
|
||||
sleep 1s
|
||||
|
||||
echo "15" > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/resource0_resize"
|
||||
echo "8" > "/sys/bus/pci/devices/''${VIRSH_GPU_VIDEO}/resource2_resize"
|
||||
|
||||
echo ''$VIRSH_GPU_VIDEO > /sys/bus/pci/drivers/amdgpu/bind
|
||||
echo ''$VIRSH_GPU_AUDIO > /sys/bus/pci/drivers/snd_hda_intel/bind
|
||||
|
||||
systemctl start mountWin10Share.service
|
||||
|
||||
'';
|
||||
mode = "0755";
|
||||
};
|
||||
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
systemd.services.mountWin10Share = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = [ config.virtualisation.libvirtd.qemu.package pkgs.util-linux pkgs.kmod pkgs.coreutils ];
|
||||
|
|
|
@ -6,8 +6,8 @@ in
|
|||
|
||||
options= let mkBoolOpt = materusPkgs.lib.mkBoolOpt; in{
|
||||
materus.profile.browser.firefox.enable = mkBoolOpt config.materus.profile.enableDesktop "Enable Firefox with materus cfg";
|
||||
materus.profile.browser.vivaldi.enable = mkBoolOpt false "Enable Vivaldi with materus cfg";
|
||||
materus.profile.browser.brave.enable = mkBoolOpt config.materus.profile.enableDesktop "Enable Brave with materus cfg";
|
||||
materus.profile.browser.vivaldi.enable = mkBoolOpt config.materus.profile.enableDesktop "Enable Vivaldi with materus cfg";
|
||||
materus.profile.browser.brave.enable = mkBoolOpt false "Enable Brave with materus cfg";
|
||||
|
||||
};
|
||||
#TODO: Make some config
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, pkgs, lib, materusFlake, materusPkgs, ... }:
|
||||
{ config, pkgs, lib, materusFlake, materusPkgs, options, ... }:
|
||||
let
|
||||
p10kcfg = "${zshcfg}/p10kcfg";
|
||||
zshcfg = "${materusFlake.path}/extraFiles/config/zsh";
|
||||
|
@ -22,7 +22,7 @@ in
|
|||
programs.zsh = {
|
||||
enable = true;
|
||||
enableAutosuggestions = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
enableSyntaxHighlighting = true;
|
||||
enableVteIntegration = true;
|
||||
historySubstringSearch.enable = true;
|
||||
historySubstringSearch.searchUpKey = ";5A";
|
||||
|
|
|
@ -27,8 +27,12 @@ let
|
|||
pkgs.xorg.xcbutilerrors
|
||||
pkgs.xorg.xcbutilrenderutil
|
||||
pkgs.xorg.xcbutil
|
||||
pkgs.xorg.xwininfo
|
||||
pkgs.yad
|
||||
pkgs.xdotool
|
||||
pkgs.libinput
|
||||
pkgs.openvdb
|
||||
pkgs.openssl
|
||||
pkgs.tbb_2021_8
|
||||
pkgs.gtk4
|
||||
pkgs.gtk3
|
||||
|
@ -42,7 +46,7 @@ let
|
|||
pkgs.tdb
|
||||
pkgs.jbig2enc
|
||||
pkgs.jbig2dec
|
||||
pkgs.brave
|
||||
pkgs.vivaldi
|
||||
|
||||
] ++ config.materus.profile.packages.list.fonts;
|
||||
|
||||
|
|
Loading…
Reference in New Issue