Merge branch 'master' of ssh://ssh.nx2.site:50022/nx2/dotfiles

This commit is contained in:
Lennart J. Kurzweg (Nx2)
2025-01-27 22:29:12 +01:00
20 changed files with 451 additions and 121 deletions

View File

@@ -31,6 +31,7 @@
./system-modules/nvidia.nix ./system-modules/nvidia.nix
./system-modules/ollama.nix ./system-modules/ollama.nix
./system-modules/qmk.nix ./system-modules/qmk.nix
./system-modules/scanning.nix
./system-modules/sops.nix ./system-modules/sops.nix
./system-modules/sound.nix ./system-modules/sound.nix
./system-modules/sshd.nix ./system-modules/sshd.nix

View File

@@ -1,13 +1,13 @@
{ {
"base": { "base": {
"foreground": "#eedce2", "foreground": "#dddddd",
"background": "#221016" "background": "#000000"
}, },
"to_alter": { "to_alter": {
"accent": "#ac5271", "accent": "#8888ff",
"secondary": "#f20c5b", "secondary": "#4444ff",
"tertiary": "#d5a287", "tertiary": "#44ff88",
"special": "#51ac8d", "special": "#ff6666",
"weird": "#0cf2a3" "weird": "#ff66ff"
} }
} }

View File

@@ -1,81 +1,98 @@
{ config, lib, user, secrets, domain, ... }: let { pkgs, lib, user, secrets, domain, ... }: let
calendars = [ calendars = [
{ {
name = "Preservation"; name = "Preservation";
primary = true; primary = true;
url = "https://dav.${domain}/nx2/preservation/"; url = "https://dav.${domain}/${user}/preservation/";
color = "#dddddd"; color = "#dddddd";
} }
{ {
name = "Effort"; name = "Effort";
primary = false; url = "https://dav.${domain}/${user}/effort/";
url = "https://dav.${domain}/nx2/effort/";
color = "#dd2222"; color = "#dd2222";
} }
{ {
name = "Experience"; name = "Experience";
primary = false; url = "https://dav.${domain}/${user}/experience/";
url = "https://dav.${domain}/nx2/experience/";
color = "#2222dd"; color = "#2222dd";
} }
{ {
name = "Exposure"; name = "Exposure";
primary = false; url = "https://dav.${domain}/${user}/exposure/";
url = "https://dav.${domain}/nx2/exposure/";
color = "#22aa22"; color = "#22aa22";
} }
{ {
name = "Engagement"; name = "Engagement";
primary = false; url = "https://dav.${domain}/${user}/engagement/";
url = "https://dav.${domain}/nx2/engagement/";
color = "#8800CC"; color = "#8800CC";
} }
{
name = "Sleep as Android";
url = secrets.calendar.sleep-as-android-url;
color = "#111111";
read-only = true;
type = "ics";
}
{
name = "LEC";
url = "https://zlypher.github.io/lol-events/cal/league-of-legends-lec.ical";
color = "#A87000";
read-only = true;
type = "ics";
}
{
name = "Handball Männer";
url = "http://i.cal.to/ical/108/dhb/handball-nationalmannschaft/c687e97f.bc7c3eb6-11a0e356.ics";
color = "#880023";
read-only = true;
type = "ics";
}
]; ];
default_set = {
# name =
# url =
color = "#777777";
read-only = false;
primary = false;
type = "caldav";
};
in { in {
home.packages = with pkgs; [
gnome-calendar
thunderbird
];
accounts.calendar.accounts = let accounts.calendar.accounts = let
makeCalendar = url: primary: color: { transform_caledar_set = calendar_set: with calendar_set; { # transform set for accounts.calendar.accounts endpoint
inherit primary; inherit primary;
remote = { remote = {
type = "caldav"; inherit url name;
userName = user; userName = user; # my globally set username
inherit url;
}; };
}; };
m = cc: lib.attrsets.mergeAttrsList ( map (c: { "${c.name}" = makeCalendar c.url c.primary c.color;}) cc );
in m calendars;
# TODO: Replace this once https://github.com/nix-community/home-manager/pull/5484 is merged.
# Make sure it works, though, including the order of calendars.
programs.thunderbird.settings = let
makeThunderbirdCalendar = cal: let
calendarAccountSafeName = (builtins.replaceStrings ["."] ["-"]) cal.name;
in {
"calendar.registry.${calendarAccountSafeName}.cache.enabled" = true;
"calendar.registry.${calendarAccountSafeName}.calendar-main-default" = cal.primary;
"calendar.registry.${calendarAccountSafeName}.calendar-main-in-composite" = true;
"calendar.registry.${calendarAccountSafeName}.color" = cal.color;
"calendar.registry.${calendarAccountSafeName}.name" = cal.name;
"calendar.registry.${calendarAccountSafeName}.type" = "caldav";
"calendar.registry.${calendarAccountSafeName}.uri" = config.accounts.calendar.accounts.${cal.name}.remote.url;
"calendar.registry.${calendarAccountSafeName}.username" = config.accounts.calendar.accounts.${cal.name}.remote.userName;
};
in lib.attrsets.mergeAttrsList ( in lib.attrsets.mergeAttrsList (
map (cal: makeThunderbirdCalendar cal) calendars map (calendar: {
"${calendar.name}" = transform_caledar_set ( default_set // calendar );
}) calendars
);
programs.thunderbird.settings = let
to_safe_name = name: (builtins.replaceStrings ["."] ["-"]) name;
in (lib.attrsets.mergeAttrsList (
map (calendar: with ( default_set // calendar ); {
"calendar.registry.${to_safe_name calendar.name}.cache.enabled" = true;
"calendar.registry.${to_safe_name calendar.name}.calendar-main-default" = primary;
"calendar.registry.${to_safe_name calendar.name}.calendar-main-in-composite" = true;
"calendar.registry.${to_safe_name calendar.name}.color" = color;
"calendar.registry.${to_safe_name calendar.name}.name" = name;
"calendar.registry.${to_safe_name calendar.name}.type" = type;
"calendar.registry.${to_safe_name calendar.name}.uri" = url;
"calendar.registry.${to_safe_name calendar.name}.username" = user;
"calendar.registry.${to_safe_name calendar.name}.readOnly" = read-only;
}) calendars
) // { ) // {
"calendar.list.sortOrder" = lib.fold (calendar: acc: calendar.name + " " + acc) "" calendars;
"calendar.registry.sleep-as-android.cache.enabled" = true;
"calendar.registry.sleep-as-android.calendar-main-in-composite" = true;
"calendar.registry.sleep-as-android.color" = "#222233";
"calendar.registry.sleep-as-android.name" = "Sleep As Android";
"calendar.registry.sleep-as-android.type" = "ics";
"calendar.registry.sleep-as-android.readOnly" = true;
"calendar.registry.sleep-as-android.uri" = secrets.calendar.sleep-as-android-url;
"calendar.list.sortOrder" = lib.fold (cal: acc: cal.name + " " + acc) "" calendars;
# Keep these after removing the above.
"calendar.week.start" = 1; "calendar.week.start" = 1;
}; });
} }

View File

@@ -5,7 +5,6 @@ lib.mkIf (host != "NxACE")
thunderbird thunderbird
]; ];
programs.thunderbird = let programs.thunderbird = let
inherit (lib.generators) toJSON; inherit (lib.generators) toJSON;
extensions = toJSON {} { extensions = toJSON {} {
@@ -41,20 +40,56 @@ lib.mkIf (host != "NxACE")
"mailnews.headers.showUserAgent" = true; "mailnews.headers.showUserAgent" = true;
"toolkit.legacyUserProfileCustomizations.stylesheets" = true; "toolkit.legacyUserProfileCustomizations.stylesheets" = true;
}; };
# userChrome = with rice.color; /* css */ '' userChrome = with rice.color; /* css */ ''
# * { body,
# color: ${foreground} !important; #navigation-toolbox,
# background-color: rgba(${rice.lib.hex-to-rgb-comma-string background},${builtins.toString 0.1}) !important; #calendarContent,
# border: none !important; #calSidebar,
# -moz-appearance: none !important; #tabpanelcontainer,
# } #spacesToolbar,
# ''; #tabs-toolbar,
#calMinimonth,
#primaryButtonSidePanel *,
.minimonth-week,
.multiday-header-corner, .day-column-heading, calendar-header-container, calendar-event-column, .multiday-hour-box,
#view-box,
#tabs-toolbar,
#status-bar,
.calview-toggle,
#calview-toggle-item,
#folderPaneHeaderBar,
#folderPane,
#threadPaneHeaderBar,
#threadTree,
#tabs-toolbar {
color: ${foreground} !important;
font-family: ${rice.font.base.name} !important;
background-color: transparent !important;
background-image: none !important;
border: none !important;
-moz-appearance: none !important;
}
.minimonth-nav-section {
background-color: rgba(${rice.lib.hex-to-rgb-comma-string background},${builtins.toString rice.transparency}) !important;
border: ${builtins.toString rice.border-width}px solid ${border};
}
.button,
.button-primary,
.tab-content[selected] {
background-color: ${accent.base};
color: ${background};
background-image: none;
}
html {
background-color: rgba(${rice.lib.hex-to-rgb-comma-string background},${builtins.toString rice.transparency}) !important;
}
'';
}; };
}; };
}; };
accounts.email.accounts = let accounts.email.accounts = let
OAuth2Settings = id: { OAuth2Settings = id: {
"mail.smtpserver.smtp_${id}.authMethod" = 10; "mail.smtpserver.smtp_${id}.authMethod" = 10;
"mail.server.server_${id}.authMethod" = 10; "mail.server.server_${id}.authMethod" = 10;

View File

@@ -100,6 +100,10 @@
end end
''; '';
functions = { functions = {
take = /* bash */ ''
mkdir $argv
cd $argv
'';
# gpg = ''; # gpg = '';
# set bold \e[1m # set bold \e[1m
# set green \e[32m # set green \e[32m

View File

@@ -6,6 +6,7 @@
# nil # nix language server # nil # nix language server
# nixd # specified in nixd.nix # nixd # specified in nixd.nix
gopls gopls
delve
python311Packages.python-lsp-server python311Packages.python-lsp-server
jdt-language-server jdt-language-server
ruff ruff
@@ -33,45 +34,175 @@
# theme = "base16_terminal"; # theme = "base16_terminal";
theme = "base16"; theme = "base16";
editor = { editor = {
scrolloff = 5;
mouse = true;
# default-yank-register = "\"";
middle-click-paste = false;
scroll-lines = 3;
shell = ["sh" "-c"];
line-number = "relative";
cursorline = true;
cursorcolumn = true;
# continue-comments = false;
auto-completion = true;
# path-completion = true;
auto-format = false;
idle-timeout = 250;
completion-timeout = 5;
preview-completion-insert = true;
completion-trigger-len = 1;
auto-info = true;
true-color = false; # is detected automatically if set to false
undercurl = false; # is detected automatically if set to false
rulers = [];
bufferline = "always";
color-modes = true;
text-width = 120;
workspace-lsp-roots = [];
default-line-ending = "native";
insert-final-newline = false;
popup-border = "all";
indent-heuristic = "hybrid";
jump-label-alphabet = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
# clip-board-provider = # selected automatically
# end-of-line-diagnostics = "hint";
statusline = {
left = [ "mode"
"spinner"
"file-name"
"read-only-indicator"
"file-type"
"version-control"
];
center = [
"position-percentage"
"total-line-numbers"
"register"
];
right = [
"spinner"
"diagnostics"
"selections"
"primary-selection-length"
"register"
"position"
"file-encoding"
];
# separator = " ";
mode = {
normal = "NORMAL";
insert = "INSERT";
select = "SELECT";
};
};
lsp = {
enable = true;
display-messages = false;
auto-signature-help = true;
display-inlay-hints = true;
};
cursor-shape = { cursor-shape = {
normal = "block"; normal = "block";
insert = "bar"; insert = "bar";
select = "underline"; select = "underline";
}; };
soft-wrap = { file-picker = {
enable = true; hidden = false; # Enables ignoring hidden files
follow-symlinks = true; # Follow symlinks instead of ignoring them
deduplicate-links = true; # Ignore symlinks that point at files already shown in the picker
parents = true; # Enables reading ignore files from parent directories
ignore = true; # Enables reading .ignore files
git-ignore = true; # Enables reading .gitignore files
git-global = true; # Enables reading global .gitignore, whose path is specified in git's config: core.excludesfile option
git-exclude = true; # Enables reading .git/info/exclude files
# max-depth unset = ; # Set with an integer value for maximum depth to recurse
};
auto-pairs = {
"(" = ")";
"{" = "}";
"[" = "]";
"\"" = "\"";
"`" = "`";
"<" = ">";
# "/* " = " */";
};
auto-save = {
focus-lost = false;
after-delay = {
enable = false;
timeout = 3000;
};
};
search = {
smart-case = true;
wrap-around = true;
};
whitespace = {
render = {
skip-levels = "none";
space = "none";
nbsp = "none";
nnbsp = "none";
tab = "none";
newline = "none";
tabpad = "none";
};
characters = {
skip-levels = 1;
space = "·";
nbsp = "";
nnbsp = "";
tab = "";
newline = "";
tabpad = "·";
};
}; };
line-number = "relative";
color-modes = true;
bufferline = "always";
popup-border = "all";
completion-trigger-len = 1;
completion-timeout = 5;
file-picker.hidden = false;
middle-click-paste = false;
cursorline = true;
indent-guides = { indent-guides = {
render = true; render = true;
character = ""; character = "";
skip-levels = 0;
}; };
lsp.display-inlay-hints = true; gutters = [
statusline.center = [ "position-percentage" ]; "diagnostics"
true-color = true; "spacer"
whitespace.characters = { "line-numbers"
newline = ""; "spacer"
tab = ""; "diff"
skip-levels = 1; ];
# line-numbers = {};
# layout.minwidth = 3;
# diagnostics = {};
# diff = {};
# spacer = {};
soft-wrap = {
enable = true;
max-wrap = 20;
max-indent-retain = 40;
wrap-indicator = "";
wrap-at-text-width = false;
}; };
smart-tab = {
enable = false;
supersend-menu = false;
};
# inline-diagnostics = {
# cursor-line = "hint";
# other-lines = "disable";
# prefix-len = 1;
# # max-wrap = set above
# max-diagnostics = 20;
# };
}; };
keys.normal = { keys = {
"C-g" = [ ":new" ":insert-output lazygit" ":buffer-close!" ":redraw" ]; normal = {
"A-`" = [ "no_op" ]; "C-g" = [ ":new" ":insert-output lazygit" ":buffer-close!" ":redraw" ];
"`" = [ "no_op" ]; "A-`" = [ "no_op" ];
}; "`" = [ "no_op" ];
keys.normal."ö" = { "ö" = { "s" = [ "switch_case" ]; "u" = [ "switch_to_uppercase" ]; "l" = [ "switch_to_lowercase" ]; };
"s" = [ "switch_case" ]; };
"u" = [ "switch_to_uppercase" ]; select = {
"l" = [ "switch_to_lowercase" ]; "ö" = { "s" = [ "switch_case" ]; "u" = [ "switch_to_uppercase" ]; "l" = [ "switch_to_lowercase" ]; };
};
}; };
}; };
languages = { languages = {
@@ -94,7 +225,6 @@
file-types = [ "md" "MD" ]; file-types = [ "md" "MD" ];
scope = "text.<name>"; scope = "text.<name>";
} }
{ {
name = "python"; name = "python";
language-servers = [ "pyright" "ruff" ]; language-servers = [ "pyright" "ruff" ];
@@ -173,7 +303,7 @@
base16 = with rice.color; { base16 = with rice.color; {
"attributes" = foreground; "attributes" = foreground;
"comment" = { "comment" = {
"fg" = white.dark; "fg" = black.bright;
"modifiers" = [ "italic" ]; "modifiers" = [ "italic" ];
}; };
"constant" = accent.bright; "constant" = accent.bright;
@@ -319,8 +449,8 @@
"fg" = black.bright; "fg" = black.bright;
}; };
"ui.virtual.inlay-hint" = { "ui.virtual.inlay-hint" = {
"fg" = weird.bright; "fg" = weird.dark;
"bg" = weird.dark; "bg" = weird.base;
}; };
"ui.virtual.ruler" = { "ui.virtual.ruler" = {
"bg" = background; "bg" = background;

View File

@@ -47,6 +47,7 @@
"VirtualBox Machine" = "" "VirtualBox Machine" = ""
"VirtualBox Manager" = "" "VirtualBox Manager" = ""
"VSCodium" = "󰨞" "VSCodium" = "󰨞"
"Xsane" = "󰈈"
"zathura" = "󰈦" "zathura" = "󰈦"
"zoom" = "󰬡" "zoom" = "󰬡"
''; '';

View File

@@ -9,13 +9,13 @@ let
main = { main = {
name = "eDP-1"; name = "eDP-1";
resolution = "1920x1200"; resolution = "1920x1200";
position = "0x0"; position = "0x1080";
scale = "1.0"; scale = "1.0";
}; };
second = { second = {
name = "DP-3"; name = "DP-2";
resolution = "1920x1080"; resolution = "1920x1080";
position = "1920x0"; position = "0x0";
scale = "1.0"; scale = "1.0";
}; };
}; };

51
home-modules/nxgs.nix Normal file
View File

@@ -0,0 +1,51 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
ghostscript
(writeShellApplication rec {
name = "nxgs";
text = /* bash */ ''
print_help() {
echo "Usage: ${name} {flip <file(s)>|rotate <file(s)>|merge <Out File Name> <files>}"
}
if [ $# -lt 1 ]; then
print_help; exit 1;
fi
case "$1" in
flip)
for FILE in "''${@:2}"; do
NXGSTEMP=$(mktemp)
gs -o "$NXGSTEMP" -sDEVICE=pdfwrite -c "<</Orientation 2>> setpagedevice" -f "$FILE"
mv "$NXGSTEMP" "$FILE"
done
;;
rotate)
for FILE in "''${@:2}"; do
NXGSTEMP=$(mktemp)
gs -o "$NXGSTEMP" -sDEVICE=pdfwrite -c "<</Orientation 1>> setpagedevice" -f "$FILE"
mv "$NXGSTEMP" "$FILE"
done
;;
merge)
gs -dBATCH -dNOPAUSE -q -sOUTPUTFILE="$3" -sDEVICE=pdfwrite "''${@:3}"
;;
interactive-merge)
echo -n "Enter Name of the merged file without extension: "; read -r MERGED
NXGSTEMP=$(mktemp)
echo "''${@:2}" | tr " " "\n" > "$NXGSTEMP"
$EDITOR "$NXGSTEMP"
mapfile -t FILES < "$NXGSTEMP"
gs -dBATCH -dNOPAUSE -q -sOUTPUTFILE="''${MERGED}.pdf" -sDEVICE=pdfwrite "''${FILES[@]}"
rm "$NXGSTEMP"
;;
*)
echo "Error: Unknown command '$1'"
print_help
exit 1
;;
esac
exit 0
'';
})
];
}

View File

@@ -0,0 +1,6 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
xsane
];
}

View File

@@ -1,4 +1,4 @@
{ lib, pkgs, user, rice, ... }: let { pkgs, rice, ... }: let
sep = " "; sep = " ";
in { in {
home.packages = home.packages =
@@ -207,7 +207,7 @@ in {
#workspaces button.active { #workspaces button.active {
color: rgb(${f background}); color: rgb(${f background});
background-color: rgba(${f accent.base},${builtins.toString rice.transparency}); background-color: rgb(${f accent.base});
} }
#workspaces button:hover { #workspaces button:hover {

View File

@@ -1,5 +1,4 @@
{ pkgs, lib, system, rice, inputs, ... }:
{ pkgs, system, rice, inputs, ... }:
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
# yazi # yazi
@@ -18,7 +17,7 @@
}; };
# initLua = /* lua */ '' ''; # initLua = /* lua */ '' '';
keymap = { keymap = {
keymap = [ manager.keymap = [
{ on = "<Esc>"; run = "escape"; desc = "Exit visual mode, clear selected, or cancel search"; } { on = "<Esc>"; run = "escape"; desc = "Exit visual mode, clear selected, or cancel search"; }
{ on = "q"; run = "quit"; desc = "Exit the process"; } { on = "q"; run = "quit"; desc = "Exit the process"; }
{ on = "Q"; run = "quit --no-cwd-file"; desc = "Exit the process without writing cwd-file"; } { on = "Q"; run = "quit --no-cwd-file"; desc = "Exit the process without writing cwd-file"; }
@@ -61,11 +60,12 @@
{ on = "K"; run = "seek -5"; desc = "Seek up 5 units in the preview"; } { on = "K"; run = "seek -5"; desc = "Seek up 5 units in the preview"; }
{ on = "J"; run = "seek 5"; desc = "Seek down 5 units in the preview"; } { on = "J"; run = "seek 5"; desc = "Seek down 5 units in the preview"; }
# Selection # Selection
{ on = "<Space>"; run = [ "select --state=none" "arrow 1" ]; desc = "Toggle the current selection state"; } { on = "<Space>"; run = [ "toggle --state=none" "arrow 1" ]; desc = "Toggle the current selection state"; }
{ on = "v"; run = "visual_mode"; desc = "Enter visual mode (selection mode)"; } { on = "v"; run = "visual_mode"; desc = "Enter visual mode (selection mode)"; }
{ on = "V"; run = "visual_mode --unset"; desc = "Enter visual mode (unset mode)"; } { on = "V"; run = "visual_mode --unset"; desc = "Enter visual mode (unset mode)"; }
{ on = "<C-a>"; run = "select_all --state=true"; desc = "Select all files"; } { on = "<C-a>"; run = "toggle_all --state=on"; desc = "Select all files"; }
{ on = "<C-r>"; run = "select_all --state=none"; desc = "Inverse selection of all files"; } { on = "<C-n>"; run = "toggle_all --state=off"; desc = "Deselect all files"; }
{ on = "<C-r>"; run = "toggle_all --state=none"; desc = "Inverse selection of all files"; }
# Operation # Operation
{ on = "o"; run = "open"; desc = "Open selected files"; } { on = "o"; run = "open"; desc = "Open selected files"; }
{ on = "O"; run = "open --interactive"; desc = "Open selected files interactively"; } { on = "O"; run = "open --interactive"; desc = "Open selected files interactively"; }
@@ -126,6 +126,7 @@
{ on = [ "," "S" ]; run = [ "sort size --reverse" "linemode size" ]; desc = "Sort by size (reverse)"; } { on = [ "," "S" ]; run = [ "sort size --reverse" "linemode size" ]; desc = "Sort by size (reverse)"; }
# Tab # Tab
{ on = "t"; run = "tab_create --current"; desc = "Create a new tab with CWD"; } { on = "t"; run = "tab_create --current"; desc = "Create a new tab with CWD"; }
{ on = "<C-w>"; run = "close"; desc = "Close the current tab"; }
{ on = "1"; run = "tab_switch 0"; desc = "Switch to the first tab"; } { on = "1"; run = "tab_switch 0"; desc = "Switch to the first tab"; }
{ on = "2"; run = "tab_switch 1"; desc = "Switch to the second tab"; } { on = "2"; run = "tab_switch 1"; desc = "Switch to the second tab"; }
{ on = "3"; run = "tab_switch 2"; desc = "Switch to the third tab"; } { on = "3"; run = "tab_switch 2"; desc = "Switch to the third tab"; }
@@ -135,14 +136,46 @@
{ on = "7"; run = "tab_switch 6"; desc = "Switch to the seventh tab"; } { on = "7"; run = "tab_switch 6"; desc = "Switch to the seventh tab"; }
{ on = "8"; run = "tab_switch 7"; desc = "Switch to the eighth tab"; } { on = "8"; run = "tab_switch 7"; desc = "Switch to the eighth tab"; }
{ on = "9"; run = "tab_switch 8"; desc = "Switch to the ninth tab"; } { on = "9"; run = "tab_switch 8"; desc = "Switch to the ninth tab"; }
{ on = "<C-1>"; run = "tab_swap 0"; desc = "Swap current tab with the first tab"; }
{ on = "<C-2>"; run = "tab_swap 1"; desc = "Swap current tab with the second tab"; }
{ on = "<C-3>"; run = "tab_swap 2"; desc = "Swap current tab with the third tab"; }
{ on = "<C-4>"; run = "tab_swap 3"; desc = "Swap current tab with the fourth tab"; }
{ on = "<C-5>"; run = "tab_swap 4"; desc = "Swap current tab with the fifth tab"; }
{ on = "<C-5>"; run = "tab_swap 4"; desc = "Swap current tab with "; }
{ on = "<C-6>"; run = "tab_swap 5"; desc = "Swap current tab with the sixth tab"; }
{ on = "<C-6>"; run = "tab_swap 5"; desc = "Swap current tab with "; }
{ on = "<C-7>"; run = "tab_swap 6"; desc = "Swap current tab with the seventh tab"; }
{ on = "<C-7>"; run = "tab_swap 6"; desc = "Swap current tab with tab"; }
{ on = "<C-8>"; run = "tab_swap 7"; desc = "Swap current tab with the eighth tab"; }
{ on = "<C-8>"; run = "tab_swap 7"; desc = "Swap current tab with b"; }
{ on = "<C-9>"; run = "tab_swap 8"; desc = "Swap current tab with the ninth tab"; }
{ on = "<C-9>"; run = "tab_swap 8"; desc = "Swap current tab with "; }
{ on = "["; run = "tab_switch -1 --relative"; desc = "Switch to the previous tab"; } { on = "["; run = "tab_switch -1 --relative"; desc = "Switch to the previous tab"; }
{ on = "["; run = "tab_switch -1 --relative"; desc = "Switch to thtab"; }
{ on = "]"; run = "tab_switch 1 --relative"; desc = "Switch to the next tab"; } { on = "]"; run = "tab_switch 1 --relative"; desc = "Switch to the next tab"; }
{ on = "]"; run = "tab_switch 1 --relative"; desc = "Switch ttab"; }
{ on = "{"; run = "tab_swap -1"; desc = "Swap current tab with previous tab"; } { on = "{"; run = "tab_swap -1"; desc = "Swap current tab with previous tab"; }
{ on = "{"; run = "tab_swap -1"; desc = "Swap current tab wittab"; }
{ on = "}"; run = "tab_swap 1"; desc = "Swap current tab with next tab"; } { on = "}"; run = "tab_swap 1"; desc = "Swap current tab with next tab"; }
# Task # Tasks
{ on = "w"; run = "tasks_show"; desc = "Show task manager"; } { on = "w"; run = "tasks_show"; desc = "Show task manager"; }
# Hel ];
tasks.keymap = [
# Task
{ on = "w"; run = "close"; desc = "Close Task View"; }
{ on = "q"; run = "close"; desc = "Close Task View"; }
{ on = "<Esc>"; run = "close"; desc = "Close Task View"; }
{ on = "c"; run = "cancel"; desc = "Cancel Task"; }
{ on = "i"; run = "inspect"; desc = "Inspect Task"; }
{ on = "j"; run = "arrow -1"; desc = "Up in list"; }
{ on = "k"; run = "arrow 1"; desc = "Down in list"; }
{ on = "u"; run = "arrow -5"; desc = "Up in list (fast)"; }
{ on = "d"; run = "arrow 5"; desc = "Down in list (fast)"; }
];
help = [
# Help
{ on = "~"; run = "help"; desc = "Open help"; } { on = "~"; run = "help"; desc = "Open help"; }
{ on = "?"; run = "help"; desc = "Open help"; }
{ on = "<F1>"; run = "help"; desc = "Open help"; } { on = "<F1>"; run = "help"; desc = "Open help"; }
]; ];
}; };
@@ -175,10 +208,12 @@
{ run = ''imv "$@"''; desc = "imv"; } { run = ''imv "$@"''; desc = "imv"; }
{ run = ''gimp "$@"''; desc = "gimp"; } { run = ''gimp "$@"''; desc = "gimp"; }
{ run = ''swww img --transition-type wipe --transition-angle 60 --transition-step 120 --transition-fps 120 "$@"''; desc = "swww wallpaper"; } { run = ''swww img --transition-type wipe --transition-angle 60 --transition-step 120 --transition-fps 120 "$@"''; desc = "swww wallpaper"; }
{ run = ''exiftool "$@"; echo "Press enter to exit"; read''; desc = "View Exif Data"; }
{ run = ''for f in "$@"; do magick "$f" -auto-orient "''${f%.*}.pdf"; done''; desc = "Convert to PDF"; }
]; ];
"svg" = [ "svg" = [
{ run = ''inkscape "$@"''; desc = "inkscape";} { run = ''inkscape "$@"''; desc = "inkscape";}
{ run = ''firefoc "$@"''; desc = "firefox";} { run = ''firefox "$@"''; desc = "firefox";}
]; ];
"font" = [ "font" = [
{ run = ''fontpreview "$@"''; desc = "fontpreview"; } { run = ''fontpreview "$@"''; desc = "fontpreview"; }
@@ -188,6 +223,9 @@
{ run = ''zathura "$@"''; desc = "zathura"; orphan = true; } { run = ''zathura "$@"''; desc = "zathura"; orphan = true; }
{ run = ''xournal "$@"''; desc = "xournal"; orphan = true; } { run = ''xournal "$@"''; desc = "xournal"; orphan = true; }
{ run = ''firefox "$@"''; desc = "firefox"; } { run = ''firefox "$@"''; desc = "firefox"; }
{ run = ''nxgs flip "$@"''; desc = "nxgs flip"; }
{ run = ''nxgs rotate "$@"''; desc = "nxgs rotate"; }
{ run = ''nxgs interactive-merge "$@"''; block = true; desc = "nxgs merge"; }
]; ];
"browser" = [ "browser" = [
{ run = ''firefox "$@"''; desc = "firefox"; } { run = ''firefox "$@"''; desc = "firefox"; }
@@ -203,7 +241,7 @@
"shell" = [ "shell" = [
{ run = ''bash -c "$@"''; desc = "bash -c"; } { run = ''bash -c "$@"''; desc = "bash -c"; }
{ run = ''fish -c "$@"''; desc = "fish -c"; } { run = ''fish -c "$@"''; desc = "fish -c"; }
{ run = ''sh -c "$@"''; desc = "sh -c"; } { run = ''sh -c "$@"''; desc = "sh -c"; }
]; ];
"python" = [ "python" = [
{ run = ''python "$@"''; desc = "python"; } { run = ''python "$@"''; desc = "python"; }

View File

@@ -1,17 +1,20 @@
{ pkgs, rice, ... }: { rice, ... }:
{ {
programs.zathura = { programs.zathura = {
enable = true; enable = true;
options = with rice.color; { options = let
f = rice.lib.hex-to-rgb-comma-string;
t = builtins.toString rice.transparency;
in with rice.color; {
completion-bg = background; completion-bg = background;
completion-fg = foreground; completion-fg = foreground;
completion-highlight-bg = background; completion-highlight-bg = background;
completion-highlight-fg = accent.base; completion-highlight-fg = accent.base;
default-bg = "rgba(${rice.lib.hex-to-rgb-comma-string background},${builtins.toString rice.transparency})"; default-bg = "rgba(${f background},${t})";
default-fg = foreground; default-fg = foreground;
highlight-active-color = "rgba(${rice.lib.hex-to-rgb-comma-string accent.base},0.5)"; highlight-active-color = "rgba(${f accent.base},0.5)";
highlight-color = "rgba(${rice.lib.hex-to-rgb-comma-string secondary.base},0.5)"; highlight-color = "rgba(${f secondary.base},0.5)";
highlight-fg = "rgba(${rice.lib.hex-to-rgb-comma-string secondary.base},0.5)"; highlight-fg = "rgba(${f secondary.base},0.5)";
index-fg = accent.bright; index-fg = accent.bright;
index-bg = black.dark; index-bg = black.dark;
index-active-fg = background; index-active-fg = background;
@@ -40,7 +43,7 @@
scroll-page-aware = true; scroll-page-aware = true;
smooth-scroll = true; smooth-scroll = true;
scroll-full-overlap = 0.01; scroll-full-overlap = 0.01;
scroll-step = 300; scroll-step = 100;
}; };
mappings = { mappings = {
h = ''feedkeys "<C-Left>"''; h = ''feedkeys "<C-Left>"'';

View File

@@ -32,6 +32,7 @@
./home-modules/nixd.nix ./home-modules/nixd.nix
./home-modules/nvidia.nix ./home-modules/nvidia.nix
./home-modules/nx2site.nix ./home-modules/nx2site.nix
./home-modules/nxgs.nix
# ./home-modules/nx-gcal-event.nix # ./home-modules/nx-gcal-event.nix
./home-modules/obs.nix ./home-modules/obs.nix
./home-modules/office.nix ./home-modules/office.nix
@@ -46,6 +47,7 @@
./home-modules/programming/python.nix ./home-modules/programming/python.nix
./home-modules/qt.nix ./home-modules/qt.nix
./home-modules/rofi.nix ./home-modules/rofi.nix
./home-modules/scanning.nix
./home-modules/sent.nix ./home-modules/sent.nix
./home-modules/sops.nix ./home-modules/sops.nix
./home-modules/ssh.nix ./home-modules/ssh.nix
@@ -91,6 +93,9 @@
cmake cmake
speedtest-go speedtest-go
imagemagick
qbittorrent
glib glib
pv pv

View File

@@ -1,6 +1,9 @@
{ host, lib, ... }: { pkgs, host, lib, ... }:
lib.mkIf (host != "NxACE") lib.mkIf (host != "NxACE")
{ {
environment.systemPackages = with pkgs; [
adbfs-rootless
];
programs.adb = { programs.adb = {
enable = true; enable = true;
}; };

View File

@@ -0,0 +1,5 @@
{ ... }:
{
programs.dconf.enable = true;
services.gnome.evolution-data-server.enable = true;
}

View File

@@ -192,7 +192,6 @@ let paperless-user = "paperless"; in
# PAPERLESS_EMAIL_HOST_PASSWORD = "". # PAPERLESS_EMAIL_HOST_PASSWORD = "".
# PAPERLESS_EMAIL_USE_TLS = false. # PAPERLESS_EMAIL_USE_TLS = false.
# PAPERLESS_EMAIL_USE_SSL = false. # PAPERLESS_EMAIL_USE_SSL = false.
}; };
}; };
}; };

View File

@@ -0,0 +1,20 @@
{ pkgs, ... }:
{
environment.systemPackages = [
(pkgs.mkYarnPackage {
name = "rallly";
src = pkgs.fetchFromGitHub {
owner = "lukevella";
repo = "rallly";
rev = "v3.11.2";
hash = "sha256-ej6Y0ouiheoH6dSBWsSIW6qt9UvsLh9ODDQA5Fqt3zs=";
};
packageJson = ./package.json;
yarnLock = ./yarn.lock;
yarnNix = ./yarn.nix;
# patchPhase = /* shell */ ''
# cp ........ ?
# '';
})
];
}

View File

@@ -0,0 +1,10 @@
{ ... }:
{
hardware.sane = {
enable = true;
};
services.avahi = {
enable = true;
nssmdns = true;
};
}

View File

@@ -11,6 +11,8 @@
"wheel" "wheel"
"audio" "audio"
"video" "video"
"lp"
"scanner"
"docker" "docker"
"libvirtd" "libvirtd"
"uinput" "uinput"