Files
nix-dotfiles/flake.nix
T
emmatherockandClaude Sonnet 5 ed36775cf0 fix: pin Flatpak to 1.16.6 to work around sandbox env leak bug
Flatpak >=1.18.0 leaks the NixOS host environment into the sandbox,
breaking glycin-svg icon loading (e.g. OpenDeck). Pin services.flatpak.package
to a nixpkgs-flatpak input locked to a revision with Flatpak 1.16.6, scoped
to the Flatpak service only, until flatpak/flatpak#6721 lands in nixpkgs.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-10 23:29:34 -03:00

68 lines
2.4 KiB
Nix

{
description = "NixOS configuration for my homelab";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
apple-fonts.url = "github:Lyndeno/apple-fonts.nix";
sidra ={
url = "github:wimpysworld/sidra";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-flatpak = {
url = "github:gmodena/nix-flatpak/?ref=latest";
};
vscode-server.url = "github:nix-community/nixos-vscode-server";
llm-agents.url = "github:numtide/llm-agents.nix";
nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions";
# TEMPORARY: pinned to the last nixpkgs revision known to ship Flatpak 1.16.6.
# Flatpak >=1.18.0 leaks the NixOS host environment into the sandbox and breaks
# glycin-svg icon loading (e.g. OpenDeck). Remove this input, the overlay-less
# services.flatpak.package override below, and this comment once
# https://github.com/flatpak/flatpak/issues/6721 is fixed upstream and merged
# into nixpkgs (see also flatpak/flatpak#6717, NixOS/nixpkgs#534376).
nixpkgs-flatpak.url = "github:NixOS/nixpkgs/51effaf9783e0226281ad10e95a4af6c8a145316";
};
outputs = { self, nixpkgs, apple-fonts, home-manager, sidra, vscode-server, nix-vscode-extensions, ... }@inputs: {
nixosConfigurations = {
miku-homelab = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit apple-fonts inputs; };
modules = [
./hosts/miku-homelab
home-manager.nixosModules.home-manager
inputs.nix-flatpak.nixosModules.nix-flatpak
vscode-server.nixosModules.default
{
nixpkgs.overlays = [
inputs.nix-vscode-extensions.overlays.default
];
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = { inherit inputs; };
home-manager.users.emmatherock = import ./home/emmatherock/home.nix;
}
];
};
};
};
nixConfig = {
extra-substituters = [
"https://cache.nixos.org"
"https://cache.numtide.com"
"https://nix-community.cachix.org"
];
extra-trusted-public-keys = [
"niks3.numtide.com-1:DTx8wZduET09hRmMtKdQDxNNthLQETkc/yaX7M4qK0g="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
};
}