nix-config/nixos/common/optional/persist.nix
♥ Minnie ♥ fe95e44a07
feat: add support for flatpak in NixOS configuration
Added the necessary configurations and dependencies to enable Flatpak in the Fuchsia module.
This includes enabling the xdg portal for default settings and adding the flatpak service.
2025-02-23 18:26:58 +08:00

34 lines
810 B
Nix

{inputs, ...}: {
imports = [
inputs.impermanence.nixosModules.impermanence
];
# Files and directories we with to keep between reboots
environment.persistence."/persist" = {
hideMounts = true;
directories = [
"/var/log"
"/var/lib/bluetooth"
"/var/lib/docker"
"/var/lib/flatpak"
"/var/lib/nixos"
"/var/lib/systemd/coredump"
"/etc/NetworkManager/system-connections"
# Directories that require mode other than 0755
{
directory = "/var/lib/private";
mode = "0700";
}
];
files = [
"/etc/machine-id"
"/etc/ssh/ssh_host_rsa_key"
"/etc/ssh/ssh_host_rsa_key.pub"
"/etc/ssh/ssh_host_ed25519_key"
"/etc/ssh/ssh_host_ed25519_key.pub"
];
};
programs.fuse.userAllowOther = true;
}