Compare commits

...

6 Commits

Author SHA1 Message Date
Nathan McCarty 2f483a214a
Add obs looking-glass plugin 2023-07-02 11:56:35 -04:00
Nathan McCarty 0a21932c47
nvme 2023-07-02 03:08:05 -04:00
Nathan McCarty abc64eab2a
Gparted 2023-07-02 02:52:44 -04:00
Nathan McCarty b03a9ad919
Disable windows mount 2023-07-01 20:15:29 -04:00
Nathan McCarty 7c1e567f48
vifo config 2023-07-01 18:46:52 -04:00
Nathan McCarty 8f2ecff5d1
Switch monitor port 2023-07-01 17:23:18 -04:00
7 changed files with 52 additions and 12 deletions

View File

@ -51,7 +51,7 @@ with nLib; {
}; };
targets = mkOption { targets = mkOption {
description = "Targets to install desktop services to"; description = "Targets to install desktop services to";
default = [ "hyprland-session.target" ]; default = [ "graphical-session.target" ];
}; };
swaylock = { swaylock = {
package = mkOption { package = mkOption {

View File

@ -62,6 +62,7 @@ in {
obs-vaapi obs-vaapi
obs-gstreamer obs-gstreamer
input-overlay input-overlay
looking-glass-obs
]; ];
}; };
}) })

View File

@ -6,6 +6,7 @@ let
inherit system; inherit system;
}; };
in { in {
imports = [ ./passthrough.nix ];
# Sops setup for this machine # Sops setup for this machine
sops.secrets = { sops.secrets = {
"borg-ssh-key" = { "borg-ssh-key" = {
@ -58,7 +59,7 @@ in {
podman = true; podman = true;
}; };
windows = { windows = {
enable = true; enable = false;
mount = { mount = {
device = "/dev/nvme0n1p2"; device = "/dev/nvme0n1p2";
mountPoint = "/mnt/windows"; mountPoint = "/mnt/windows";
@ -79,8 +80,6 @@ in {
allowedUDPPorts = [ 61377 1701 9001 ]; allowedUDPPorts = [ 61377 1701 9001 ];
}; };
}; };
# GPU passthrough
boot.kernelParams = [ "amd_iommu=on" ];
# Setup home manager # Setup home manager
home-manager.users.nathan = import ./home.nix; home-manager.users.nathan = import ./home.nix;

View File

@ -19,12 +19,12 @@
# Hyprland outputs # Hyprland outputs
wayland.windowManager.hyprland.extraConfig = '' wayland.windowManager.hyprland.extraConfig = ''
# monitor=DP-1,preferred,auto,1.4,bitdepth,10 # monitor=DP-3,preferred,auto,1.4,bitdepth,10
# disable 10 bit output for now as this breaks screenshots # disable 10 bit output for now as this breaks screenshots
misc { misc {
vrr = 1 vrr = 1
} }
monitor=DP-1,preferred,auto,1.4 monitor=DP-3,preferred,auto,1.4
input { input {
sensitivity = -0.8 sensitivity = -0.8
# accel_profile = flat # accel_profile = flat
@ -40,7 +40,7 @@
xdg.configFile."hypr/hyprpaper.conf" = { xdg.configFile."hypr/hyprpaper.conf" = {
text = '' text = ''
preload = /home/nathan/Pictures/Backgrounds/IMG_20190518_195619.jpg preload = /home/nathan/Pictures/Backgrounds/IMG_20190518_195619.jpg
wallpaper = DP-1,/home/nathan/Pictures/Backgrounds/IMG_20190518_195619.jpg wallpaper = DP-3,/home/nathan/Pictures/Backgrounds/IMG_20190518_195619.jpg
''; '';
}; };
@ -90,9 +90,4 @@
}; };
}; };
# Mako output configuration
services.mako = {
# Lock mako notifs to main display
output = "DP-1";
};
} }

View File

@ -0,0 +1,35 @@
{ config, lib, pkgs, ... }:
let
gpuIDs = [
# 2080 super
"10de:1e81" # Graphics
"10de:10f8" # Audio
"10de:1ad8" # Usb ????
"10de:1ad9" # Usb ????
];
in {
boot = {
kernelParams = [
# enable iommu
"amd_iommu=on"
# Isolate the nvidia gpu
("vfio-pci.ids=" + lib.concatStringsSep "," gpuIDs)
];
# Modules needed
initrd.kernelModules = [ "vfio_pci" "vfio" "vfio_iommu_type1" ];
};
environment.systemPackages = with pkgs; [ looking-glass-client ];
virtualisation.spiceUSBRedirection.enable = true;
virtualisation.libvirtd = {
qemu = {
swtpm.enable = true;
ovmf = {
enable = true;
packages = [ pkgs.OVMFFull.fd ];
};
};
};
systemd.tmpfiles.rules =
[ "f /dev/shm/looking-glass 0660 nathan qemu-libvirtd -" ];
}

View File

@ -78,5 +78,14 @@ with lib; {
MaxRetentionSec=7day MaxRetentionSec=7day
''; '';
} }
# Partitioning tools
(mkIf config.nathan.config.isDesktop {
environment.systemPackages = with pkgs; [
parted
gparted
xorg.xhost
nvme-cli
];
})
]; ];
} }

View File

@ -6,6 +6,7 @@ in with lib; {
# Enable the kernel modules # Enable the kernel modules
boot.kernelModules = [ "kvm-amd" "kvm-intel" ]; boot.kernelModules = [ "kvm-amd" "kvm-intel" ];
# Enable libvirt # Enable libvirt
programs.dconf.enable = true;
virtualisation.libvirtd.enable = true; virtualisation.libvirtd.enable = true;
# Install virt-manager # Install virt-manager
environment.systemPackages = with pkgs; [ virtmanager virt-viewer ]; environment.systemPackages = with pkgs; [ virtmanager virt-viewer ];