From f5adb9d6d774d342c8c37061e30df5da01af22e8 Mon Sep 17 00:00:00 2001 From: William Date: Mon, 2 Jun 2025 15:43:17 -0300 Subject: [PATCH] move flatpaks to programs file --- flake.nix | 19 ++++++++++--------- hosts/modules/default.nix | 1 - hosts/modules/flatpak.nix | 35 ----------------------------------- hosts/modules/programs.nix | 20 +++++++++++++++++++- 4 files changed, 29 insertions(+), 46 deletions(-) delete mode 100644 hosts/modules/flatpak.nix diff --git a/flake.nix b/flake.nix index d0f2039..92c3eeb 100644 --- a/flake.nix +++ b/flake.nix @@ -15,10 +15,6 @@ }; disko = { - url = "github:nix-community/disko?ref=v1.11.0"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - disko-stable = { url = "github:nix-community/disko?ref=v1.11.0"; inputs.nixpkgs.follows = "nixpkgs-stable"; }; @@ -33,6 +29,8 @@ inputs.nixpkgs.follows = "nixpkgs-stable"; }; + nix-minecraft.url = "github:Infinidoge/nix-minecraft"; + nix-flatpak.url = "github:gmodena/nix-flatpak/latest"; impermanence.url = "github:nix-community/impermanence"; @@ -46,11 +44,11 @@ home-manager, home-manager-stable, disko, - disko-stable, agenix, deploy-rs, - impermanence, + nix-minecraft, nix-flatpak, + impermanence, ... }: { @@ -66,7 +64,6 @@ let pkgs = if type == "server" then nixpkgs-stable else nixpkgs; hm = if type == "server" then home-manager-stable else home-manager; - diskoInput = if type == "server" then disko-stable else disko; hostTypeFlags = { isServer = type == "server"; isWorkstation = type == "workstation"; @@ -74,7 +71,7 @@ defaultModules = [ ./hosts/${hostname}.nix agenix.nixosModules.default - diskoInput.nixosModules.default + disko.nixosModules.default hm.nixosModules.default impermanence.nixosModules.impermanence nix-flatpak.nixosModules.nix-flatpak @@ -92,7 +89,9 @@ } ]; serverModules = [ - self.nixosModules.qbittorrent + nixpkgs.overlays = [ + self.overlays.serverOverlay + ]; ]; typeModules = if type == "server" then serverModules else workstationModules; allModules = defaultModules ++ typeModules ++ extraModules; @@ -118,11 +117,13 @@ alexandria = mkHost { hostname = "alexandria"; type = "server"; + extraModules = [ self.nixosModules.qbittorrent ]; }; trantor = mkHost { hostname = "trantor"; type = "server"; system = "aarch64-linux"; + extraModules = [ nix-minecraft.nixosModules.default ]; }; }; diff --git a/hosts/modules/default.nix b/hosts/modules/default.nix index c877354..bc290b2 100644 --- a/hosts/modules/default.nix +++ b/hosts/modules/default.nix @@ -5,7 +5,6 @@ ./boot.nix ./console.nix ./desktop.nix - ./flatpak.nix ./impermanence.nix ./locale.nix ./networking.nix diff --git a/hosts/modules/flatpak.nix b/hosts/modules/flatpak.nix deleted file mode 100644 index 39d57d9..0000000 --- a/hosts/modules/flatpak.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ - hostType, - lib, - ... -}: - -{ - config = lib.mkMerge [ - # Common configuration - { - } - - # Server specific configuration - (lib.mkIf hostType.isServer { - }) - - # Workstation specific configuration - (lib.mkIf hostType.isWorkstation { - services.flatpak = { - enable = true; - packages = [ - "com.github.k4zmu2a.spacecadetpinball" - "com.github.tchx84.Flatseal" - "com.steamgriddb.SGDBoop" - "app.zen_browser.zen" - "io.github.Foldex.AdwSteamGtk" - "io.itch.itch" - "org.freedesktop.Platform.VulkanLayer.MangoHud/x86_64/24.08" - ]; - uninstallUnmanaged = true; - update.auto.enable = true; - }; - }) - ]; -} diff --git a/hosts/modules/programs.nix b/hosts/modules/programs.nix index dee2478..09f1167 100644 --- a/hosts/modules/programs.nix +++ b/hosts/modules/programs.nix @@ -33,9 +33,10 @@ ls = "${pkgs.eza}/bin/eza --icons --group-directories-first"; neofetch = "fastfetch"; tree = "ls --tree"; - tsh = "ssh -o RequestTTY=yes $argv tmux -u -CC new -A -s tmux-main"; syscleanup = "sudo nix-collect-garbage -d; sudo /run/current-system/bin/switch-to-configuration boot"; }; + + services.flatpak.enable = lib.mkForce false; } # Server specific configuration @@ -133,6 +134,23 @@ roboto ]; }; + + services.flatpak = { + enable = true; + packages = [ + "com.boxy_svg.BoxySVG" + "com.github.k4zmu2a.spacecadetpinball" + "com.github.tchx84.Flatseal" + "com.steamgriddb.SGDBoop" + "app.zen_browser.zen" + "io.github.Foldex.AdwSteamGtk" + "io.itch.itch" + "io.mrarm.mcpelauncher" + "org.freedesktop.Platform.VulkanLayer.MangoHud/x86_64/24.08" + ]; + uninstallUnmanaged = true; + update.auto.enable = true; + }; })) ]; }