diff --git a/flake.lock b/flake.lock index abd53c4..cab28c8 100644 --- a/flake.lock +++ b/flake.lock @@ -1091,11 +1091,11 @@ }, "nur": { "locked": { - "lastModified": 1686858300, - "narHash": "sha256-puBTBN6pJXAZ7oI2MHHyj+GCnipqZwTF9PvGtouBXKA=", + "lastModified": 1688546999, + "narHash": "sha256-fW0BKoMIsukWt0C/K47gHuVe2M+UyqfOS/pmZUqCmYs=", "owner": "nix-community", "repo": "NUR", - "rev": "b3d13e358b2ec4caf73562492128a483b84970da", + "rev": "3d4890e8ed7d295a88d0e8951916a45bc19d2f7f", "type": "github" }, "original": { diff --git a/machines/AMD-Workstation/default.nix b/machines/AMD-Workstation/default.nix index 68b8882..3b3a901 100644 --- a/machines/AMD-Workstation/default.nix +++ b/machines/AMD-Workstation/default.nix @@ -11,6 +11,7 @@ nixosProfiles.hoyo nixosProfiles.sunshine nixosProfiles.attic + nixosProfiles.emulators ]; virtualisation.libvirt.guests = { diff --git a/profiles/applications/emulators.nix b/profiles/applications/emulators.nix new file mode 100644 index 0000000..8644a57 --- /dev/null +++ b/profiles/applications/emulators.nix @@ -0,0 +1,13 @@ +{ config, pkgs, lib, ... }: { + home-manager.users.${config.mainuser} = { + home.packages = with pkgs; [ + (retroarch.override { cores = with libretro; [ genesis-plus-gx dosbox ]; }) + pcsx2 rpcs3 + ]; + }; + persist.state.homeDirectories = [ + ".config/retroarch" + ".config/PCSX2" + ".config/rpcs3" + ]; +} \ No newline at end of file diff --git a/profiles/applications/packages.nix b/profiles/applications/packages.nix index 818ddc6..cc22e02 100644 --- a/profiles/applications/packages.nix +++ b/profiles/applications/packages.nix @@ -77,7 +77,6 @@ with config.deviceSpecific; { lutris moonlight-qt # reshade-shaders - # (retroarch.override { cores = [ libretro.genesis-plus-gx libretro.dosbox ]; }) # parsec protonhax protontricks diff --git a/profiles/security/user.nix b/profiles/security/user.nix index 46f421b..50e3d7d 100644 --- a/profiles/security/user.nix +++ b/profiles/security/user.nix @@ -16,6 +16,7 @@ "input" "kvm" "libvirtd" + "limits" "lp" "lxd" "networkmanager" @@ -42,9 +43,15 @@ config.users.users.${config.mainuser}.openssh.authorizedKeys.keys; }; programs.zsh.enable = true; - # Safe, because we using doas + # Safe, because we are using doas users.allowNoPasswordLogin = true; systemd.services."user@" = { serviceConfig = { Restart = "always"; }; }; services.getty.autologinUser = config.mainuser; + + users.groups.limits = {}; + security.pam.loginLimits = [ + { domain = "@limits"; item = "memlock"; type = "soft"; value = "unlimited"; } + { domain = "@limits"; item = "memlock"; type = "hard"; value = "unlimited"; } + ]; }