nix-config/containers/obsidian.nix
Donovan Glover 0aaba9a591
meta: Remove variables from containers
Modules solve the variable problem in a nicer way.
2023-06-22 11:44:35 -04:00

70 lines
1.4 KiB
Nix

{ 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, ... }: {
users = {
mutableUsers = false;
allowNoPasswordLogin = true;
users.user = {
isNormalUser = true;
home = "/home/user";
};
};
environment = {
variables = {
TERM = "xterm-kitty";
};
defaultPackages = [ ];
};
environment.systemPackages = with pkgs; [
kitty
obsidian
];
environment.sessionVariables = {
WAYLAND_DISPLAY = "wayland-1";
QT_QPA_PLATFORM = "wayland";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
SDL_VIDEODRIVER = "wayland";
CLUTTER_BACKEND = "wayland";
MOZ_ENABLE_WAYLAND = "1";
XDG_RUNTIME_DIR = "/run/user/1000";
DISPLAY = ":0";
};
services.xserver.enable = true;
nixpkgs.config.allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) [
"obsidian"
];
system.stateVersion = "22.11";
};
};
}