1
0
forked from extern/nix-config
donovanglover-nix-config/containers/obsidian.nix
2023-06-22 12:46:20 -04:00

42 lines
846 B
Nix

{ 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"
];
};
};
}