From 0a36b0acb528c7c73e5b2bdcdd3cb51062eaf565 Mon Sep 17 00:00:00 2001 From: "Alexander \"PapaTutuWawa" Date: Tue, 18 Oct 2022 20:04:39 +0200 Subject: [PATCH] lol --- hosts/nishimiya.nix | 8 +++++++ hosts/wrapper.nix | 37 ++++++++++++++++++++++++++++++ lib/baseSystem.nix | 9 +++++++- modules/desktop/plasma.nix | 4 ++-- modules/programs/gnome/default.nix | 2 +- 5 files changed, 56 insertions(+), 4 deletions(-) create mode 100644 hosts/wrapper.nix diff --git a/hosts/nishimiya.nix b/hosts/nishimiya.nix index 39ad5e8..e2285b0 100644 --- a/hosts/nishimiya.nix +++ b/hosts/nishimiya.nix @@ -128,6 +128,14 @@ environment.systemPackages = with pkgs; [ ansible gnumake + + (pkgs.callPackage ./wrapper.nix { + inherit (pkgs) retroarch; + cores = with pkgs.libretro; [ + mgba mupen64plus melonds desmume dolphin + ]; + }) + ]; programs = { diff --git a/hosts/wrapper.nix b/hosts/wrapper.nix new file mode 100644 index 0000000..b3797c9 --- /dev/null +++ b/hosts/wrapper.nix @@ -0,0 +1,37 @@ +{ stdenv, lib, makeWrapper, retroarch, cores ? [ ] }: + +stdenv.mkDerivation { + pname = "retroarch"; + version = lib.getVersion retroarch; + + nativeBuildInputs = [ makeWrapper ]; + + buildCommand = '' + mkdir -p $out/lib + for coreDir in $cores + do + ln -s $coreDir/* $out/lib/. + done + + ln -s -t $out ${retroarch}/share + + if [ -d ${retroarch}/Applications ]; then + ln -s -t $out ${retroarch}/Applications + fi + + makeWrapper ${retroarch}/bin/retroarch $out/bin/retroarch \ + --suffix-each LD_LIBRARY_PATH ':' "$cores" \ + --add-flags "-L $out/lib/" \ + ''; + + cores = map (x: x + x.libretroCore) cores; + preferLocalBuild = true; + + meta = with retroarch.meta; { + inherit changelog description homepage license maintainers platforms; + longDescription = + "RetroArch is the reference frontend for the libretro API. The following cores are included: " + + lib.concatStringsSep ", " (map (x: "${x.name}") cores) + + "."; + }; +} diff --git a/lib/baseSystem.nix b/lib/baseSystem.nix index 8fab5a0..f596b37 100644 --- a/lib/baseSystem.nix +++ b/lib/baseSystem.nix @@ -33,7 +33,14 @@ in { }; networking = { useDHCP = false; # Done by the network manager - networkmanager.enable = true; + networkmanager = { + enable = true; + plugins = with pkgs; [ + networkmanager-vpnc + networkmanager-openvpn + networkmanager-openconnect + ]; + }; #interfaces.*.useDHCP = false; diff --git a/modules/desktop/plasma.nix b/modules/desktop/plasma.nix index 38e9354..25c738b 100644 --- a/modules/desktop/plasma.nix +++ b/modules/desktop/plasma.nix @@ -14,7 +14,7 @@ in { description = "Ignore NixOS 'recommendations' and use the Wayland session by default"; }; }; - sddm = { + /*sddm = { backgroundImage = lib.mkOption { default = "${pkgs.sddm-sugar-dark}/usr/share/sddm/themes/sugar-dark/Background.jpg"; description = "The background image to use with sddm-sugar-dark"; @@ -27,7 +27,7 @@ in { default = 1080; description = "Width of the screen"; }; - }; + };*/ }; config = lib.mkIf cfg.enable { diff --git a/modules/programs/gnome/default.nix b/modules/programs/gnome/default.nix index 332adf6..52992cc 100644 --- a/modules/programs/gnome/default.nix +++ b/modules/programs/gnome/default.nix @@ -83,7 +83,7 @@ in { xdg.portal = { enable = true; #extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; - gtkUsePortal = true; + #gtkUsePortal = true; }; qt5 = {