feat(rnote): Add Rnote module

This commit is contained in:
2025-09-14 01:12:04 -06:00
parent 0c069dc0aa
commit 059f1cdeaf
2 changed files with 61 additions and 0 deletions

View File

@@ -0,0 +1,60 @@
{ config, lib, pkgs, ... }:
let cfg = config.sydnix.users.crumb.rnote;
in {
options.sydnix.users.crumb.rnote = {
enable = lib.mkEnableOption "Rnote";
};
config = lib.mkIf cfg.enable {
home.packages = [
pkgs.rnote
];
# C.f. https://github.com/gepbird/dotfiles/blob/main/modules/rnote.nix.
# Browse options with
# dconf read /com/github/flxzt/rnote/engine-config \
# | sed -e # "s/'\(.*\)'/\1/" | jq
dconf.settings."com/github/flxzt/rnote" =
let
colour = r: g: b: a: { inherit r g b a; };
stylix = name: {
r = builtins.fromJSON config.lib.stylix.colors."${name}-dec-r";
g = builtins.fromJSON config.lib.stylix.colors."${name}-dec-g";
b = builtins.fromJSON config.lib.stylix.colors."${name}-dec-b";
a = 1.0;
};
weird-stylix = name: let c = stylix name;
in lib.gvariant.mkTuple [c.r c.g c.b c.a];
in {
active-stroke-color = weird-stylix "base06"; # Old White
active-fill-color = weird-stylix "base06"; # Old White
engine-config = builtins.toJSON {
penholder.shortcuts = {
stylus_secondary_button.change_pen_style = {
style = "selector";
mode = "toggle";
};
stylus_primary_button.change_pen_style = {
style = "tools";
mode = "toggle";
};
};
document.background = {
color = stylix "base00"; # Sumi Ink 1
pattern_color = stylix "base06"; # Old White
format = {
show_borders = false;
border_color = colour 0.0 0.0 0.0 0.0;
};
};
pens_config = {
brush_config = {
stroke_color = stylix "base06"; # Old White
fill_color = stylix "base06"; # Old White
};
};
};
};
};
}

View File

@@ -49,6 +49,7 @@
# Personal configurations.
users.crumb = {
age.enable = true;
rnote.enable = true;
default-applications.enable = true;
fcitx5.enable = true;
bash.enable = true;