From 607b9c080ba43520ce5ddf262ccabbbeacf99210 Mon Sep 17 00:00:00 2001 From: Gabriel Fontes Date: Wed, 2 Feb 2022 17:40:25 -0300 Subject: [PATCH] use flatpak on atlas --- hosts/atlas/default.nix | 1 + hosts/common/flatpak.nix | 8 ++++++++ users/misterio/features/games/default.nix | 7 +------ users/misterio/features/games/runescape.nix | 18 +----------------- .../misterio/features/persistence/default.nix | 2 ++ users/misterio/rice.nix | 2 +- users/misterio/system-wide.nix | 1 + 7 files changed, 15 insertions(+), 24 deletions(-) create mode 100644 hosts/common/flatpak.nix diff --git a/hosts/atlas/default.nix b/hosts/atlas/default.nix index fbf331fb..7fe24974 100644 --- a/hosts/atlas/default.nix +++ b/hosts/atlas/default.nix @@ -12,6 +12,7 @@ in ./hardware-configuration.nix ../common + ../common/flatpak.nix ../common/podman.nix ../common/misterio-greetd.nix ../common/pipewire.nix diff --git a/hosts/common/flatpak.nix b/hosts/common/flatpak.nix new file mode 100644 index 00000000..f622a12c --- /dev/null +++ b/hosts/common/flatpak.nix @@ -0,0 +1,8 @@ +{ + services.flatpak.enable = true; + environment.persistence."/data" = { + directories = [ + "/var/lib/flatpak" + ]; + }; +} diff --git a/users/misterio/features/games/default.nix b/users/misterio/features/games/default.nix index 30c760aa..14acfff8 100644 --- a/users/misterio/features/games/default.nix +++ b/users/misterio/features/games/default.nix @@ -1,8 +1,3 @@ { hostname, ... }: { - imports = [ ./lutris.nix ./steam.nix ./polymc.nix ] - ++ (if hostname == "atlas" then [ - ./osu.nix - # ./runescape.nix - ] else - [ ]); + imports = [ ./lutris.nix ./steam.nix ./polymc.nix ./runescape.nix ]; } diff --git a/users/misterio/features/games/runescape.nix b/users/misterio/features/games/runescape.nix index a52da542..eab0e17c 100644 --- a/users/misterio/features/games/runescape.nix +++ b/users/misterio/features/games/runescape.nix @@ -1,12 +1,11 @@ { pkgs, features, lib, ... }: { - home.packages = with pkgs; [ runelite nur.repos.misterio.runescape-launcher ]; + home.packages = with pkgs; [ runelite ]; home.persistence = lib.mkIf (builtins.elem "persistence" features) { "/data/games/misterio".directories = [ "Jagex" ]; }; # Override .desktop for changing OSRS cache dir - # TODO: better way other than retyping the entire file? xdg.desktopEntries = { RuneLite = { categories = [ "Game" ]; @@ -20,19 +19,4 @@ type = "Application"; }; }; - - # Override .desktop for adding gamemoderun - # TODO: better way other than retyping the entire file? - xdg.desktopEntries = { - runescape-launcher = { - categories = [ "Game" ]; - comment = "RuneScape - A Free MMORPG from Jagex Ltd."; - exec = "gamemoderun runescape-launcher %u"; - genericName = "RuneScape"; - icon = "runescape"; - name = "RuneScape"; - terminal = false; - type = "Application"; - }; - }; } diff --git a/users/misterio/features/persistence/default.nix b/users/misterio/features/persistence/default.nix index 4ee55390..44092d4f 100644 --- a/users/misterio/features/persistence/default.nix +++ b/users/misterio/features/persistence/default.nix @@ -11,6 +11,8 @@ ".cabal" ".cargo" ".local/share/containers" + ".local/share/flatpak" + ".cache/flatpak" ]; allowOther = true; }; diff --git a/users/misterio/rice.nix b/users/misterio/rice.nix index a7c00ebb..06873b4d 100644 --- a/users/misterio/rice.nix +++ b/users/misterio/rice.nix @@ -3,7 +3,7 @@ with inputs.nix-colors.lib { inherit pkgs; }; let - currentScheme.atlas = null; + currentScheme.atlas = "atelier-sulphurpool"; currentScheme.pleione = "paraiso"; currentScheme.merope = "nord"; currentScheme.maia = "ashes"; diff --git a/users/misterio/system-wide.nix b/users/misterio/system-wide.nix index 9897eeb7..dd85f1fe 100644 --- a/users/misterio/system-wide.nix +++ b/users/misterio/system-wide.nix @@ -13,6 +13,7 @@ "minecraft" "mysql" "deluge" + "flatpak" ]; openssh.authorizedKeys.keys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDci4wJghnRRSqQuX1z2xeaUR+p/muKzac0jw0mgpXE2T/3iVlMJJ3UXJ+tIbySP6ezt0GVmzejNOvUarPAm0tOcW6W0Ejys2Tj+HBRU19rcnUtf4vsKk8r5PW5MnwS8DqZonP5eEbhW2OrX5ZsVyDT+Bqrf39p3kOyWYLXT2wA7y928g8FcXOZjwjTaWGWtA+BxAvbJgXhU9cl/y45kF69rfmc3uOQmeXpKNyOlTk6ipSrOfJkcHgNFFeLnxhJ7rYxpoXnxbObGhaNqn7gc5mt+ek+fwFzZ8j6QSKFsPr0NzwTFG80IbyiyrnC/MeRNh7SQFPAESIEP8LK3PoNx2l1M+MjCQXsb4oIG2oYYMRa2yx8qZ3npUOzMYOkJFY1uI/UEE/j/PlQSzMHfpmWus4o2sijfr8OmVPGeoU/UnVPyINqHhyAd1d3Iji3y3LMVemHtp5wVcuswABC7IRVVKZYrMCXMiycY5n00ch6XTaXBwCY00y8B3Mzkd7Ofq98YHc= (none)"