Update references and folder names
This commit is contained in:
parent
4cafc51f01
commit
d402b1c806
82 changed files with 88 additions and 88 deletions
3
system/services/globalprotect.nix
Normal file
3
system/services/globalprotect.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
services.globalprotect.enable = true;
|
||||
}
|
23
system/services/mpd.nix
Normal file
23
system/services/mpd.nix
Normal 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}";
|
||||
};
|
||||
}
|
22
system/services/openssh.nix
Normal file
22
system/services/openssh.nix
Normal 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" ];
|
||||
};
|
||||
};
|
||||
}
|
8
system/services/sunshine.nix
Normal file
8
system/services/sunshine.nix
Normal 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
21
system/services/udev.nix
Normal 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];
|
||||
};
|
||||
}
|
39
system/services/virtualisation.nix
Normal file
39
system/services/virtualisation.nix
Normal 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 -"
|
||||
];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue