Update references and folder names

This commit is contained in:
jimjam4real 2024-09-23 11:41:28 -04:00
parent 4cafc51f01
commit d402b1c806
82 changed files with 88 additions and 88 deletions

View file

@ -0,0 +1,3 @@
{
services.globalprotect.enable = true;
}

23
system/services/mpd.nix Normal file
View file

@ -0,0 +1,23 @@
{
config,
pkgs,
...
}: {
# Enable MPD
services.mpd = {
enable = true;
user = "jimbo";
group = "users";
musicDirectory = "/home/jimbo/JimboNFS/Music";
playlistDirectory = "/home/jimbo/JimboNFS/Music/Playlists";
extraConfig = ''
audio_output {
type "pipewire"
name "Local Pipewire"
}
'';
};
systemd.services.mpd.environment = {
XDG_RUNTIME_DIR = "/run/user/${toString config.users.users.jimbo.uid}";
};
}

View file

@ -0,0 +1,22 @@
{
# Enable SSH
services = {
openssh = {
enable = true;
settings = {
PermitRootLogin = "no";
PrintLastLog = "no";
PasswordAuthentication = false;
UsePAM = false;
};
};
# Block nefarious SSH connections
fail2ban = {
enable = true;
maxretry = 5;
bantime = "5m";
ignoreIP = [ "10.0.0.0/24" ];
};
};
}

View file

@ -0,0 +1,8 @@
{
# Enable Sunshine as a service
services.sunshine = {
enable = true;
settings.port = 57989;
autoStart = false;
};
}

21
system/services/udev.nix Normal file
View file

@ -0,0 +1,21 @@
{pkgs, ...}: {
# Make udev rules to make PDP controller and Oculus Rift CV1 work
services.udev = let
oculusRules = pkgs.writeTextFile {
name = "10-oculus.rules";
text = ''
KERNEL=="hidraw*", ATTRS{idVendor}=="0e6f", ATTRS{idProduct}=="0184", MODE="0660", TAG+="uaccess"
'';
destination = "/etc/udev/rules.d/10-oculus.rules";
};
pdpRules = pkgs.writeTextFile {
name = "10-pdp.rules";
text = ''
SUBSYSTEM=="usb", ATTR{idVendor}=="2833", MODE="0666"
'';
destination = "/etc/udev/rules.d/10-pdp.rules";
};
in {
packages = [oculusRules pdpRules];
};
}

View file

@ -0,0 +1,39 @@
{
config,
pkgs,
...
}: {
# Enable virtualization
virtualisation = {
libvirtd = {
enable = true;
onBoot = "ignore";
onShutdown = "shutdown";
qemu = {
ovmf = {
enable = true;
packages = [
pkgs.OVMFFull.fd
pkgs.pkgsCross.aarch64-multiplatform.OVMF.fd
];
};
swtpm.enable = true;
};
};
spiceUSBRedirection.enable = true;
};
# Install programs system-wide
environment.systemPackages = with pkgs; [
virt-manager
virtiofsd
dnsmasq
spice-vdagent
looking-glass-client
];
# Allow Looking-Glass permissions
systemd.tmpfiles.rules = [
"f /dev/shm/looking-glass 0660 jimbo libvirtd -"
];
}