nix-config/containers/obsidian.nix

42 lines
846 B
Nix
Raw Normal View History

{ home-manager, stylix, lib, ... }:
{
containers.obsidian = {
privateNetwork = true;
ephemeral = true;
bindMounts = {
"/mnt" = {
hostPath = "/home/user/containers/obsidian";
isReadOnly = false;
};
waylandDisplay = rec {
hostPath = "/run/user/1000";
mountPoint = hostPath;
};
x11Display = rec {
hostPath = "/tmp/.X11-unix";
mountPoint = hostPath;
isReadOnly = true;
};
};
config = { pkgs, ... }: {
imports = [
home-manager.nixosModules.home-manager
stylix.nixosModules.stylix
../setup.nix
];
environment.systemPackages = with pkgs; [
obsidian
];
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"obsidian"
];
};
};
}