From dcd6b194cb76bb02eb1a355f3f83716235899025 Mon Sep 17 00:00:00 2001 From: Toast Date: Sat, 30 Dec 2023 14:57:05 +0100 Subject: [PATCH 1/7] Desktop/keepassxc: enable favicon downloader --- roles/desktop/programs/keepassxc.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/roles/desktop/programs/keepassxc.nix b/roles/desktop/programs/keepassxc.nix index 22858fc..637818c 100644 --- a/roles/desktop/programs/keepassxc.nix +++ b/roles/desktop/programs/keepassxc.nix @@ -19,7 +19,10 @@ let # monochrome-light, monochrome-dark or colorful TrayIconAppearance = "monochrome-light"; }; - Security.HideNotes = true; + Security = { + HideNotes = true; + IconDownloadFallback = true; + }; SSHAgent.Enabled = true; }; in From 63062475e2d2690228d865e0c5daa8b23fab3ca1 Mon Sep 17 00:00:00 2001 From: Toast Date: Sat, 30 Dec 2023 14:57:20 +0100 Subject: [PATCH 2/7] Desktop/keepassxc: install using home-manager --- roles/desktop/programs/keepassxc.nix | 48 +++++++++++++++------------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/roles/desktop/programs/keepassxc.nix b/roles/desktop/programs/keepassxc.nix index 637818c..7b42daf 100644 --- a/roles/desktop/programs/keepassxc.nix +++ b/roles/desktop/programs/keepassxc.nix @@ -28,33 +28,35 @@ let in { - users.users.toast.packages = [ pkgs.keepassxc ]; home-manager = { extraSpecialArgs = { kpxcSettings = kpxcSettings; }; users.toast = { config, pkgs, kpxcSettings, ... }: { # No module for KeePassXC config :( - home.file = { - ".config/keepassxc/keepassxc.ini".text = kpxcSettings; - # For some reason the autostart .desktop is not the same as the regular one - ".config/autostart/org.keepassxc.KeePassXC.desktop".text = '' - [Desktop Entry] - Name=KeePassXC - GenericName=Password Manager - Exec=keepassxc - TryExec=keepassxc - Icon=keepassxc - StartupWMClass=keepassxc - StartupNotify=true - Terminal=false - Type=Application - Version=1.0 - Categories=Utility;Security;Qt; - MimeType=application/x-keepass2; - X-GNOME-Autostart-enabled=true - X-GNOME-Autostart-Delay=2 - X-KDE-autostart-after=panel - X-LXQt-Need-Tray=true - ''; + home = { + packages = [ pkgs.keepassxc ]; + file = { + ".config/keepassxc/keepassxc.ini".text = kpxcSettings; + # For some reason the autostart .desktop is not the same as the regular one + ".config/autostart/org.keepassxc.KeePassXC.desktop".text = '' + [Desktop Entry] + Name=KeePassXC + GenericName=Password Manager + Exec=keepassxc + TryExec=keepassxc + Icon=keepassxc + StartupWMClass=keepassxc + StartupNotify=true + Terminal=false + Type=Application + Version=1.0 + Categories=Utility;Security;Qt; + MimeType=application/x-keepass2; + X-GNOME-Autostart-enabled=true + X-GNOME-Autostart-Delay=2 + X-KDE-autostart-after=panel + X-LXQt-Need-Tray=true + ''; + }; }; }; }; From b20181aec5304622bd910bf81dd8f17ac1fa33b1 Mon Sep 17 00:00:00 2001 From: Toast Date: Sat, 30 Dec 2023 20:39:21 +0100 Subject: [PATCH 3/7] Gaming/retroarch: init --- roles/gaming/programs/default.nix | 1 + roles/gaming/programs/retroarch.nix | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 roles/gaming/programs/retroarch.nix diff --git a/roles/gaming/programs/default.nix b/roles/gaming/programs/default.nix index 4bba376..8e5776f 100755 --- a/roles/gaming/programs/default.nix +++ b/roles/gaming/programs/default.nix @@ -5,6 +5,7 @@ ./steam.nix ./mangohud.nix ./rpcs3.nix + ./retroarch.nix ]; environment.systemPackages = with pkgs; [ heroic diff --git a/roles/gaming/programs/retroarch.nix b/roles/gaming/programs/retroarch.nix new file mode 100644 index 0000000..106659a --- /dev/null +++ b/roles/gaming/programs/retroarch.nix @@ -0,0 +1,18 @@ +{ pkgs, ... }: +{ + home-manager.users.toast = { + home = { + packages = [( + pkgs.retroarch.override { + cores = with pkgs.libretro; [ + snes9x + ]; + settings = { + video_driver = "vulkan"; + video_fullscreen = "true"; + }; + } + )]; + }; + }; +} From 1f281357aa6a5c75a057874e1a883fdcc0493442 Mon Sep 17 00:00:00 2001 From: Toast Date: Sat, 30 Dec 2023 20:40:59 +0100 Subject: [PATCH 4/7] Gaming/retroarch: add snes roms --- roles/gaming/programs/retroarch.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/roles/gaming/programs/retroarch.nix b/roles/gaming/programs/retroarch.nix index 106659a..1a02b90 100644 --- a/roles/gaming/programs/retroarch.nix +++ b/roles/gaming/programs/retroarch.nix @@ -1,4 +1,14 @@ { pkgs, ... }: +let + actraiser = pkgs.fetchzip { + url = "https://myrient.erista.me/files/No-Intro/Nintendo%20-%20Super%20Nintendo%20Entertainment%20System/ActRaiser%20%28USA%29.zip"; + hash = "sha256-yxIL5Pqlp8xsx7wvNO1MlB8ffDjS0xpE+yrEfMj61As="; + }; + kirby-super-star = pkgs.fetchzip { + url = "https://myrient.erista.me/files/No-Intro/Nintendo%20-%20Super%20Nintendo%20Entertainment%20System/Kirby%20Super%20Star%20%28USA%29.zip"; + hash = "sha256-NX5OjCthf4ZiAhamclRBRk8GiMjZX3JLeShm8sQdDfc="; + }; +in { home-manager.users.toast = { home = { @@ -13,6 +23,10 @@ }; } )]; + file."Games/Roms/SNES/".source = pkgs.symlinkJoin { + name = "snes-roms"; + paths = [ actraiser kirby-super-star ]; + }; }; }; } From 3ee043ab137b7440656e3323bdfcb0cb1580a0bb Mon Sep 17 00:00:00 2001 From: Toast Date: Sun, 31 Dec 2023 01:09:45 +0100 Subject: [PATCH 5/7] Gaming/retroarch: store roms in list --- roles/gaming/programs/retroarch.nix | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/roles/gaming/programs/retroarch.nix b/roles/gaming/programs/retroarch.nix index 1a02b90..b50c00b 100644 --- a/roles/gaming/programs/retroarch.nix +++ b/roles/gaming/programs/retroarch.nix @@ -1,13 +1,16 @@ { pkgs, ... }: let - actraiser = pkgs.fetchzip { + snes-roms = [ + # ActRaiser + ( pkgs.fetchzip { url = "https://myrient.erista.me/files/No-Intro/Nintendo%20-%20Super%20Nintendo%20Entertainment%20System/ActRaiser%20%28USA%29.zip"; hash = "sha256-yxIL5Pqlp8xsx7wvNO1MlB8ffDjS0xpE+yrEfMj61As="; - }; - kirby-super-star = pkgs.fetchzip { + } ) + # Kirby Super Star + ( pkgs.fetchzip { url = "https://myrient.erista.me/files/No-Intro/Nintendo%20-%20Super%20Nintendo%20Entertainment%20System/Kirby%20Super%20Star%20%28USA%29.zip"; hash = "sha256-NX5OjCthf4ZiAhamclRBRk8GiMjZX3JLeShm8sQdDfc="; - }; + } ) in { home-manager.users.toast = { @@ -23,9 +26,14 @@ in }; } )]; - file."Games/Roms/SNES/".source = pkgs.symlinkJoin { + file."Games/Roms/SNES/" = { + onChange = '' + ${pkgs.retroarch}/bin/retroarch --scan "/home/toast/Games/Roms/SNES" + ''; + source = pkgs.symlinkJoin { name = "snes-roms"; - paths = [ actraiser kirby-super-star ]; + paths = [ snes-roms ]; + }; }; }; }; From 30a39ec7b08e868ad54d0762738d792efb055513 Mon Sep 17 00:00:00 2001 From: Toast Date: Sun, 31 Dec 2023 01:10:07 +0100 Subject: [PATCH 6/7] Gaming/retroarch: add super mario kart --- roles/gaming/programs/retroarch.nix | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/roles/gaming/programs/retroarch.nix b/roles/gaming/programs/retroarch.nix index b50c00b..83ab80a 100644 --- a/roles/gaming/programs/retroarch.nix +++ b/roles/gaming/programs/retroarch.nix @@ -3,14 +3,20 @@ let snes-roms = [ # ActRaiser ( pkgs.fetchzip { - url = "https://myrient.erista.me/files/No-Intro/Nintendo%20-%20Super%20Nintendo%20Entertainment%20System/ActRaiser%20%28USA%29.zip"; - hash = "sha256-yxIL5Pqlp8xsx7wvNO1MlB8ffDjS0xpE+yrEfMj61As="; + url = "https://myrient.erista.me/files/No-Intro/Nintendo%20-%20Super%20Nintendo%20Entertainment%20System/ActRaiser%20%28USA%29.zip"; + hash = "sha256-yxIL5Pqlp8xsx7wvNO1MlB8ffDjS0xpE+yrEfMj61As="; } ) # Kirby Super Star ( pkgs.fetchzip { - url = "https://myrient.erista.me/files/No-Intro/Nintendo%20-%20Super%20Nintendo%20Entertainment%20System/Kirby%20Super%20Star%20%28USA%29.zip"; - hash = "sha256-NX5OjCthf4ZiAhamclRBRk8GiMjZX3JLeShm8sQdDfc="; + url = "https://myrient.erista.me/files/No-Intro/Nintendo%20-%20Super%20Nintendo%20Entertainment%20System/Kirby%20Super%20Star%20%28USA%29.zip"; + hash = "sha256-NX5OjCthf4ZiAhamclRBRk8GiMjZX3JLeShm8sQdDfc="; } ) + # Super Mario Kart + ( pkgs.fetchzip { + url = "https://myrient.erista.me/files/No-Intro/Nintendo%20-%20Super%20Nintendo%20Entertainment%20System/Super%20Mario%20Kart%20%28USA%29.zip"; + hash = "sha256-RLBxPBmBrXCuPdnWE07KamBNgGJ5IntQVUPeij+2HUI="; + } ) + ]; in { home-manager.users.toast = { @@ -31,7 +37,7 @@ in ${pkgs.retroarch}/bin/retroarch --scan "/home/toast/Games/Roms/SNES" ''; source = pkgs.symlinkJoin { - name = "snes-roms"; + name = "snes-roms"; paths = [ snes-roms ]; }; }; From b924128f7c4445abca1b28bacb4a5ec0c72e5c93 Mon Sep 17 00:00:00 2001 From: Toast Date: Sun, 31 Dec 2023 01:46:40 +0100 Subject: [PATCH 7/7] Gaming/retroarch: sync retroarch folder with syncthing --- roles/gaming/programs/retroarch.nix | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/roles/gaming/programs/retroarch.nix b/roles/gaming/programs/retroarch.nix index 83ab80a..e247954 100644 --- a/roles/gaming/programs/retroarch.nix +++ b/roles/gaming/programs/retroarch.nix @@ -42,5 +42,28 @@ in }; }; }; + # Add a syncthing ignore file to the retroarch folder + xdg.configFile."retroarch-stignore" = { + target = "retroarch/.stignore"; + text = '' + !saves + !states + !database + !playlists + + // Ignore everything except stuff above + * + ''; + }; + }; + + # Sync saves and some other stuff + services.syncthing.settings.folders = { + "retroarch" = { + label = "RetroArch"; + id = "jxuou-2yjnu"; + devices = [ "steamdeck" "pc" ]; + path = "~/.config/retroarch"; + }; }; }