move flatpaks to programs file

This commit is contained in:
William 2025-06-02 15:43:17 -03:00
parent afc7385c95
commit f5adb9d6d7
4 changed files with 29 additions and 46 deletions

View file

@ -15,10 +15,6 @@
}; };
disko = { 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"; url = "github:nix-community/disko?ref=v1.11.0";
inputs.nixpkgs.follows = "nixpkgs-stable"; inputs.nixpkgs.follows = "nixpkgs-stable";
}; };
@ -33,6 +29,8 @@
inputs.nixpkgs.follows = "nixpkgs-stable"; inputs.nixpkgs.follows = "nixpkgs-stable";
}; };
nix-minecraft.url = "github:Infinidoge/nix-minecraft";
nix-flatpak.url = "github:gmodena/nix-flatpak/latest"; nix-flatpak.url = "github:gmodena/nix-flatpak/latest";
impermanence.url = "github:nix-community/impermanence"; impermanence.url = "github:nix-community/impermanence";
@ -46,11 +44,11 @@
home-manager, home-manager,
home-manager-stable, home-manager-stable,
disko, disko,
disko-stable,
agenix, agenix,
deploy-rs, deploy-rs,
impermanence, nix-minecraft,
nix-flatpak, nix-flatpak,
impermanence,
... ...
}: }:
{ {
@ -66,7 +64,6 @@
let let
pkgs = if type == "server" then nixpkgs-stable else nixpkgs; pkgs = if type == "server" then nixpkgs-stable else nixpkgs;
hm = if type == "server" then home-manager-stable else home-manager; hm = if type == "server" then home-manager-stable else home-manager;
diskoInput = if type == "server" then disko-stable else disko;
hostTypeFlags = { hostTypeFlags = {
isServer = type == "server"; isServer = type == "server";
isWorkstation = type == "workstation"; isWorkstation = type == "workstation";
@ -74,7 +71,7 @@
defaultModules = [ defaultModules = [
./hosts/${hostname}.nix ./hosts/${hostname}.nix
agenix.nixosModules.default agenix.nixosModules.default
diskoInput.nixosModules.default disko.nixosModules.default
hm.nixosModules.default hm.nixosModules.default
impermanence.nixosModules.impermanence impermanence.nixosModules.impermanence
nix-flatpak.nixosModules.nix-flatpak nix-flatpak.nixosModules.nix-flatpak
@ -92,7 +89,9 @@
} }
]; ];
serverModules = [ serverModules = [
self.nixosModules.qbittorrent nixpkgs.overlays = [
self.overlays.serverOverlay
];
]; ];
typeModules = if type == "server" then serverModules else workstationModules; typeModules = if type == "server" then serverModules else workstationModules;
allModules = defaultModules ++ typeModules ++ extraModules; allModules = defaultModules ++ typeModules ++ extraModules;
@ -118,11 +117,13 @@
alexandria = mkHost { alexandria = mkHost {
hostname = "alexandria"; hostname = "alexandria";
type = "server"; type = "server";
extraModules = [ self.nixosModules.qbittorrent ];
}; };
trantor = mkHost { trantor = mkHost {
hostname = "trantor"; hostname = "trantor";
type = "server"; type = "server";
system = "aarch64-linux"; system = "aarch64-linux";
extraModules = [ nix-minecraft.nixosModules.default ];
}; };
}; };

View file

@ -5,7 +5,6 @@
./boot.nix ./boot.nix
./console.nix ./console.nix
./desktop.nix ./desktop.nix
./flatpak.nix
./impermanence.nix ./impermanence.nix
./locale.nix ./locale.nix
./networking.nix ./networking.nix

View file

@ -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;
};
})
];
}

View file

@ -33,9 +33,10 @@
ls = "${pkgs.eza}/bin/eza --icons --group-directories-first"; ls = "${pkgs.eza}/bin/eza --icons --group-directories-first";
neofetch = "fastfetch"; neofetch = "fastfetch";
tree = "ls --tree"; 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"; syscleanup = "sudo nix-collect-garbage -d; sudo /run/current-system/bin/switch-to-configuration boot";
}; };
services.flatpak.enable = lib.mkForce false;
} }
# Server specific configuration # Server specific configuration
@ -133,6 +134,23 @@
roboto 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;
};
})) }))
]; ];
} }