mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-12-29 10:09:30 +01:00
containers: Add obsidian
Mainly a proof of concept. Eventually I'll devise an easy way to view notes in a pretty way and edit them with neovim (likely through your typical web framework tools).
This commit is contained in:
parent
798aa35edf
commit
42699b6985
73
containers/obsidian.nix
Normal file
73
containers/obsidian.nix
Normal file
@ -0,0 +1,73 @@
|
||||
{ lib, ... }:
|
||||
let VARIABLES = import ../src/variables.nix; in {
|
||||
containers.obsidian = {
|
||||
privateNetwork = true;
|
||||
ephemeral = true;
|
||||
|
||||
bindMounts = {
|
||||
"/mnt" = {
|
||||
hostPath = "/home/${VARIABLES.username}/containers/obsidian";
|
||||
isReadOnly = false;
|
||||
};
|
||||
|
||||
waylandDisplay = rec {
|
||||
hostPath = "/run/user/1000";
|
||||
mountPoint = hostPath;
|
||||
};
|
||||
|
||||
x11Display = rec {
|
||||
hostPath = "/tmp/.X11-unix";
|
||||
mountPoint = hostPath;
|
||||
isReadOnly = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = { pkgs, ... }: {
|
||||
i18n.defaultLocale = VARIABLES.defaultLocale;
|
||||
i18n.supportedLocales = VARIABLES.supportedLocales;
|
||||
|
||||
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 = VARIABLES.stateVersion;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user