Compare commits
6 Commits
1378fb08ed
...
2f483a214a
Author | SHA1 | Date |
---|---|---|
Nathan McCarty | 2f483a214a | |
Nathan McCarty | 0a21932c47 | |
Nathan McCarty | abc64eab2a | |
Nathan McCarty | b03a9ad919 | |
Nathan McCarty | 7c1e567f48 | |
Nathan McCarty | 8f2ecff5d1 |
|
@ -51,7 +51,7 @@ with nLib; {
|
|||
};
|
||||
targets = mkOption {
|
||||
description = "Targets to install desktop services to";
|
||||
default = [ "hyprland-session.target" ];
|
||||
default = [ "graphical-session.target" ];
|
||||
};
|
||||
swaylock = {
|
||||
package = mkOption {
|
||||
|
|
|
@ -62,6 +62,7 @@ in {
|
|||
obs-vaapi
|
||||
obs-gstreamer
|
||||
input-overlay
|
||||
looking-glass-obs
|
||||
];
|
||||
};
|
||||
})
|
||||
|
|
|
@ -6,6 +6,7 @@ let
|
|||
inherit system;
|
||||
};
|
||||
in {
|
||||
imports = [ ./passthrough.nix ];
|
||||
# Sops setup for this machine
|
||||
sops.secrets = {
|
||||
"borg-ssh-key" = {
|
||||
|
@ -58,7 +59,7 @@ in {
|
|||
podman = true;
|
||||
};
|
||||
windows = {
|
||||
enable = true;
|
||||
enable = false;
|
||||
mount = {
|
||||
device = "/dev/nvme0n1p2";
|
||||
mountPoint = "/mnt/windows";
|
||||
|
@ -79,8 +80,6 @@ in {
|
|||
allowedUDPPorts = [ 61377 1701 9001 ];
|
||||
};
|
||||
};
|
||||
# GPU passthrough
|
||||
boot.kernelParams = [ "amd_iommu=on" ];
|
||||
|
||||
# Setup home manager
|
||||
home-manager.users.nathan = import ./home.nix;
|
||||
|
|
|
@ -19,12 +19,12 @@
|
|||
|
||||
# Hyprland outputs
|
||||
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
|
||||
misc {
|
||||
vrr = 1
|
||||
}
|
||||
monitor=DP-1,preferred,auto,1.4
|
||||
monitor=DP-3,preferred,auto,1.4
|
||||
input {
|
||||
sensitivity = -0.8
|
||||
# accel_profile = flat
|
||||
|
@ -40,7 +40,7 @@
|
|||
xdg.configFile."hypr/hyprpaper.conf" = {
|
||||
text = ''
|
||||
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";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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 -" ];
|
||||
}
|
|
@ -78,5 +78,14 @@ with lib; {
|
|||
MaxRetentionSec=7day
|
||||
'';
|
||||
}
|
||||
# Partitioning tools
|
||||
(mkIf config.nathan.config.isDesktop {
|
||||
environment.systemPackages = with pkgs; [
|
||||
parted
|
||||
gparted
|
||||
xorg.xhost
|
||||
nvme-cli
|
||||
];
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ in with lib; {
|
|||
# Enable the kernel modules
|
||||
boot.kernelModules = [ "kvm-amd" "kvm-intel" ];
|
||||
# Enable libvirt
|
||||
programs.dconf.enable = true;
|
||||
virtualisation.libvirtd.enable = true;
|
||||
# Install virt-manager
|
||||
environment.systemPackages = with pkgs; [ virtmanager virt-viewer ];
|
||||
|
|
Loading…
Reference in New Issue