fixed vm sound

This commit is contained in:
Gerg-L 2023-05-27 22:32:34 -04:00
parent a959cf3e97
commit eb8f11e89e
4 changed files with 49 additions and 61 deletions

94
flake.lock generated
View file

@ -57,21 +57,6 @@
} }
}, },
"flake-utils": { "flake-utils": {
"locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"inputs": { "inputs": {
"systems": "systems" "systems": "systems"
}, },
@ -107,11 +92,11 @@
}, },
"master": { "master": {
"locked": { "locked": {
"lastModified": 1685068755, "lastModified": 1685235077,
"narHash": "sha256-j7h6J5ll6LG16xu95rDqEfMsOjNEyfe6xUG4grOidfc=", "narHash": "sha256-Z9R7CuclQdnjKYIU6szsvjDASzmMFV3LcwJ1cRDjFig=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "84443f97656ab4abeed2baf5976094df9af0eb40", "rev": "c93e310072dad60b55bb5d8e244c946c21ddaa8f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -121,24 +106,16 @@
} }
}, },
"neovim-src": { "neovim-src": {
"inputs": { "flake": false,
"flake-utils": "flake-utils",
"nixpkgs": [
"nvim-flake",
"nixpkgs"
]
},
"locked": { "locked": {
"dir": "contrib", "lastModified": 1685074380,
"lastModified": 1684067358, "narHash": "sha256-F7jRBJAHiCo3djt7FckAtP2BMF9U1B7VTD+RZzVy8Uk=",
"narHash": "sha256-9CdP1arEvBbgYhK+qZMV2gUeaxmxFkyxLqUKTZR/icw=",
"owner": "neovim", "owner": "neovim",
"repo": "neovim", "repo": "neovim",
"rev": "ecd6d679a020ff97156de2fd3c443a77a671ac3d", "rev": "d31f7648ecaf32426239020331d1bbe9a6f56140",
"type": "github" "type": "github"
}, },
"original": { "original": {
"dir": "contrib",
"owner": "neovim", "owner": "neovim",
"repo": "neovim", "repo": "neovim",
"type": "github" "type": "github"
@ -250,33 +227,19 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_2": {
"locked": {
"lastModified": 1683014792,
"narHash": "sha256-6Va9iVtmmsw4raBc3QKvQT2KT/NGRWlvUlJj46zN8B8=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "1a411f23ba299db155a5b45d5e145b85a7aafc42",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nvim-flake": { "nvim-flake": {
"inputs": { "inputs": {
"neovim-src": "neovim-src", "neovim-src": "neovim-src",
"nixpkgs": "nixpkgs_2" "nixpkgs": [
"unstable"
]
}, },
"locked": { "locked": {
"lastModified": 1684097344, "lastModified": 1685079814,
"narHash": "sha256-cVd8tk6qzL9n4hHG5VfFunksCbjuy2xtTSCSnaZg0v8=", "narHash": "sha256-dzDjdDznY6o5mHzobIeY7UJ09UeBUh0VhvrCOGdMUrw=",
"owner": "Gerg-L", "owner": "Gerg-L",
"repo": "nvim-flake", "repo": "nvim-flake",
"rev": "8bd7d66d21741d7d9c42a7229b7c125f422d6170", "rev": "9520496c7cfbe8f66fff43a545120a2238a09ba7",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -285,6 +248,22 @@
"type": "github" "type": "github"
} }
}, },
"pipewire_fix": {
"locked": {
"lastModified": 1684322576,
"narHash": "sha256-p6KBRm9bZNlYjcrADYjMAlr6vFQXEh0qD/CryPAEwV4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "45a55711fe12d0aada3aa04746082cf1b83dfbf3",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "45a55711fe12d0aada3aa04746082cf1b83dfbf3",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"disko": "disko", "disko": "disko",
@ -293,6 +272,7 @@
"nix": "nix", "nix": "nix",
"nixos-generators": "nixos-generators", "nixos-generators": "nixos-generators",
"nvim-flake": "nvim-flake", "nvim-flake": "nvim-flake",
"pipewire_fix": "pipewire_fix",
"sops-nix": "sops-nix", "sops-nix": "sops-nix",
"spicetify-nix": "spicetify-nix", "spicetify-nix": "spicetify-nix",
"stable": "stable", "stable": "stable",
@ -323,7 +303,7 @@
}, },
"spicetify-nix": { "spicetify-nix": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_2", "flake-utils": "flake-utils",
"nixpkgs": [ "nixpkgs": [
"unstable" "unstable"
] ]
@ -344,11 +324,11 @@
}, },
"stable": { "stable": {
"locked": { "locked": {
"lastModified": 1684936879, "lastModified": 1685043448,
"narHash": "sha256-BOSq/QiX7MDs8tUnAt4+nYTJctgYkzVSNL95qlfMYeM=", "narHash": "sha256-U3BwyDc2OzBcZ8tD09qXibyivgOtOQFTFCVgFyJ+6MM=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "99fe1b870522d6ee3e692c2b6e663d6868a3fde4", "rev": "9886352ec9ab3945896ee8a4185e961fe29df209",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -395,11 +375,11 @@
}, },
"unstable": { "unstable": {
"locked": { "locked": {
"lastModified": 1684935479, "lastModified": 1685168767,
"narHash": "sha256-6QMMsXMr2nhmOPHdti2j3KRHt+bai2zw+LJfdCl97Mk=", "narHash": "sha256-wQgnxz0PdqbyKKpsWl/RU8T8QhJQcHfeC6lh1xRUTfk=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "f91ee3065de91a3531329a674a45ddcb3467a650", "rev": "e10802309bf9ae351eb27002c85cfdeb1be3b262",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -4,6 +4,7 @@
master.url = "github:NixOS/nixpkgs"; master.url = "github:NixOS/nixpkgs";
unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
stable.url = "github:NixOS/nixpkgs/nixos-22.11"; stable.url = "github:NixOS/nixpkgs/nixos-22.11";
pipewire_fix.url = "github:NixOS/nixpkgs/45a55711fe12d0aada3aa04746082cf1b83dfbf3";
#nix 2.16 #nix 2.16
nix.url = "github:NixOS/nix/684e9be8b9356f92b7882d74cba9d146fb71f850"; nix.url = "github:NixOS/nix/684e9be8b9356f92b7882d74cba9d146fb71f850";
@ -29,7 +30,10 @@
url = "github:Gerg-L/suckless"; url = "github:Gerg-L/suckless";
inputs.nixpkgs.follows = "unstable"; inputs.nixpkgs.follows = "unstable";
}; };
nvim-flake.url = "github:Gerg-L/nvim-flake"; nvim-flake = {
url = "github:Gerg-L/nvim-flake";
inputs.nixpkgs.follows = "unstable";
};
fetch-rs = { fetch-rs = {
url = "github:Gerg-L/fetch-rs"; url = "github:Gerg-L/fetch-rs";
inputs.nixpkgs.follows = "unstable"; inputs.nixpkgs.follows = "unstable";

View file

@ -24,7 +24,7 @@
<emulatorpin cpuset="8-15,24-31"/> <emulatorpin cpuset="8-15,24-31"/>
</cputune> </cputune>
<os> <os>
<type arch="x86_64" machine="pc-q35-7.2">hvm</type> <type arch="x86_64" machine="pc-q35-8.0">hvm</type>
<loader readonly="yes" type="pflash">/run/libvirt/nix-ovmf/OVMF_CODE.fd</loader> <loader readonly="yes" type="pflash">/run/libvirt/nix-ovmf/OVMF_CODE.fd</loader>
<nvram>/var/lib/libvirt/qemu/nvram/Windows_VARS.fd</nvram> <nvram>/var/lib/libvirt/qemu/nvram/Windows_VARS.fd</nvram>
<boot dev="hd"/> <boot dev="hd"/>

View file

@ -3,8 +3,11 @@
self, self,
config, config,
lib, lib,
inputs,
... ...
}: let }:
###TAKEN FROM HERE:https://github.com/NixOS/nixpkgs/blob/4787ebf7ae2ab071389be7ff86cf38edeee7e9f8/nixos/modules/services/x11/xserver.nix#L106-L136
let
xcfg = config.services.xserver; xcfg = config.services.xserver;
xserverbase = let xserverbase = let
fontsForXServer = fontsForXServer =
@ -14,7 +17,6 @@
pkgs.xorg.fontadobe75dpi pkgs.xorg.fontadobe75dpi
]; ];
in in
###TAKEN FROM HERE:https://github.com/NixOS/nixpkgs/blob/4787ebf7ae2ab071389be7ff86cf38edeee7e9f8/nixos/modules/services/x11/xserver.nix#L106-L136
pkgs.runCommand "xserverbase" pkgs.runCommand "xserverbase"
{ {
fontpath = fontpath =
@ -45,6 +47,8 @@
oneMonitor = pkgs.writeText "1-monitor.conf" (lib.strings.concatStrings [(builtins.readFile xserverbase) (builtins.readFile (self + /misc/1-monitor.conf))]); oneMonitor = pkgs.writeText "1-monitor.conf" (lib.strings.concatStrings [(builtins.readFile xserverbase) (builtins.readFile (self + /misc/1-monitor.conf))]);
twoMonitor = pkgs.writeText "2-monitor.conf" (lib.strings.concatStrings [(builtins.readFile xserverbase) (builtins.readFile (self + /misc/2-monitor.conf))]); twoMonitor = pkgs.writeText "2-monitor.conf" (lib.strings.concatStrings [(builtins.readFile xserverbase) (builtins.readFile (self + /misc/2-monitor.conf))]);
in { in {
####VM SOUND BORKED
services.pipewire.package = inputs.pipewire_fix.legacyPackages.${pkgs.system}.pipewire;
boot = { boot = {
kernelParams = ["amd_iommu=on" "iommu=pt" "vfio_iommu_type1.allow_unsafe_interrupts=1" "kvm.ignore_msrs=1"]; kernelParams = ["amd_iommu=on" "iommu=pt" "vfio_iommu_type1.allow_unsafe_interrupts=1" "kvm.ignore_msrs=1"];
}; };