# Everyday desktop applications (home-manager). Firefox, mpv, imv and zathura # are configured programs; mpv and zathura are also themed by Stylix # (theme/stylix.nix). Firefox is not: Stylix would need a declared profile, and # a declared profile would replace the existing one. Its settings are enterprise # policies instead, which need no profile. { flake.modules.homeManager.apps = { pkgs, ... }: let vintagestory = pkgs.vintagestoryPackages.v1-22-7.overrideAttrs (old: { # Put the actual executable in the game directory. postInstall = (old.postInstall or "") + '' install -Dm755 ${./PlayVintageStory} \ "$out/share/vintagestory/PlayVintageStory" ''; postFixup = (old.postFixup or "") + '' # Create another launcher with the same environment as # the original vintagestory launcher. makeWrapper \ "$out/share/vintagestory/PlayVintageStory" \ "$out/bin/PlayVintageStory" \ --prefix PATH : "${pkgs.lib.makeBinPath [ pkgs.dotnet-runtime_10 ]}" \ --prefix LD_LIBRARY_PATH : \ "${pkgs.lib.makeLibraryPath old.runtimeLibs}" \ --set DOTNET_ROOT \ "${pkgs.dotnet-runtime_10.unwrapped}/share/dotnet" \ --set DOTNET_ROOT_X64 \ "${pkgs.dotnet-runtime_10.unwrapped}/share/dotnet" \ --set-default mesa_glthread true \ --run "cd $out/share/vintagestory" # Change only the main game's desktop entry. # The original bin/vintagestory remains intact. substituteInPlace \ "$out/share/applications/vintagestory.desktop" \ --replace-fail \ 'Exec=vintagestory' \ "Exec=$out/bin/PlayVintageStory" ''; }); in { programs = { firefox = { enable = true; policies = { # Reopen the windows and tabs of the last session. Not locked, so # the startup setting in about:preferences still works. Homepage.StartPage = "previous-session"; Preferences = { # Website appearance: dark (0; 1 is light, 2 follows the system). # A default, not a lock: it can still be changed in # about:preferences. Type is explicit: Firefox may read a # plain 0 or 1 as a boolean. "layout.css.prefers-color-scheme.content-override" = { Value = 0; Type = "number"; Status = "default"; }; }; }; }; mpv.enable = true; imv.enable = true; zathura.enable = true; }; home.packages = with pkgs; [ vesktop # Discord client with working screen sharing on Wayland telegram-desktop file-roller teamspeak6-client spotify loupe # image viewer zenity procps vscode networkmanager-openvpn vintagestory ]; }; }