reorganization
This commit is contained in:
parent
bc44678dac
commit
91b5421848
46 changed files with 47 additions and 51 deletions
14
home/modules/aichat.nix
Normal file
14
home/modules/aichat.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
aichat
|
||||
glow
|
||||
];
|
||||
|
||||
programs.fish.shellAliases = {
|
||||
vibe = "aichat -c";
|
||||
clank = "aichat -e";
|
||||
slop = "aichat";
|
||||
};
|
||||
}
|
||||
138
home/modules/calendars.nix
Normal file
138
home/modules/calendars.nix
Normal file
|
|
@ -0,0 +1,138 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
|
||||
myRemote = slug: {
|
||||
passwordCommand = [ "pass" "accounts/ktiu-radicale" ];
|
||||
userName = "ktiu";
|
||||
type = "caldav";
|
||||
url = "https://kalender.ktiu.net/ktiu/${slug}";
|
||||
};
|
||||
|
||||
calDefaults = {
|
||||
khal.type = "calendar";
|
||||
local = {
|
||||
type = "filesystem";
|
||||
fileExt = ".ics";
|
||||
};
|
||||
vdirsyncer = {
|
||||
enable = true;
|
||||
conflictResolution = "local wins";
|
||||
};
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
services.vdirsyncer.enable = true;
|
||||
programs.vdirsyncer.enable = true;
|
||||
|
||||
programs.khal = {
|
||||
enable = true;
|
||||
locale = {
|
||||
timeformat = "%H:%M";
|
||||
dateformat = "%d %b";
|
||||
longdateformat = "%d %b %Y";
|
||||
datetimeformat = "%d %b %H:%M";
|
||||
longdatetimeformat = "%d %b %Y %H:%M";
|
||||
weeknumbers = "left";
|
||||
};
|
||||
settings = {
|
||||
default = {
|
||||
timedelta = "5d";
|
||||
print_new = "event";
|
||||
};
|
||||
keybindings.external_edit = "ctrl e";
|
||||
view = {
|
||||
agenda_event_format = "{calendar-color}{cancelled}{start-end-time-style} {title}{repeat-symbol} {location} {url}{reset}";
|
||||
event_format = "{calendar-color}{cancelled}{start}-{end} {title}{repeat-symbol} {location} {url}{reset}";
|
||||
"blank_line_before_day" = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
accounts.calendar.basePath = "${config.xdg.dataHome}/calendars";
|
||||
accounts.calendar.accounts = {
|
||||
|
||||
till = calDefaults // {
|
||||
khal.enable = true;
|
||||
primary = true;
|
||||
khal.color = "light blue";
|
||||
remote = myRemote "personal";
|
||||
};
|
||||
|
||||
mitlisa = calDefaults // {
|
||||
khal.enable = true;
|
||||
khal.color = "light magenta";
|
||||
remote = myRemote "lisa-und-till";
|
||||
};
|
||||
|
||||
family = calDefaults // {
|
||||
khal.enable = true;
|
||||
khal.color = "dark magenta";
|
||||
remote = myRemote "family";
|
||||
};
|
||||
|
||||
bdays = calDefaults // {
|
||||
khal.enable = true;
|
||||
khal.color = "yellow";
|
||||
remote = myRemote "geburtstage";
|
||||
};
|
||||
|
||||
polit = calDefaults // {
|
||||
khal.enable = true;
|
||||
khal.color = "dark gray";
|
||||
remote = myRemote "polit";
|
||||
};
|
||||
|
||||
ihg = calDefaults // {
|
||||
khal.enable = true;
|
||||
khal.color = "dark cyan";
|
||||
remote = {
|
||||
type = "http";
|
||||
url = "https://geocom.uni-frankfurt.de/radicale/ihg/5012a739-dbaf-334b-f093-8db1860bc26e/";
|
||||
};
|
||||
};
|
||||
|
||||
"eintracht_m" = calDefaults // {
|
||||
khal.enable = true;
|
||||
khal.color = "light red";
|
||||
remote = {
|
||||
type = "http";
|
||||
url = "http://i.cal.to/ical/257/eintrachtfrankfurt/spielplan/28ae0d30.f781380b-e6f28bd4.ics";
|
||||
};
|
||||
};
|
||||
|
||||
"eintracht_f" = calDefaults // {
|
||||
khal.enable = true;
|
||||
khal.color = "dark red";
|
||||
remote = {
|
||||
type = "http";
|
||||
url = "http://i.cal.to/ical/5940/eintrachtfrankfurt/spielplan-frauen-profis/28ae0d30.f781380b-1763bff2.ics";
|
||||
};
|
||||
};
|
||||
|
||||
"feiertage" = calDefaults // {
|
||||
khal.enable = true;
|
||||
khal.color = "dark green";
|
||||
remote = {
|
||||
type = "http";
|
||||
url = "https://ics.tools/Feiertage/hessen.ics";
|
||||
};
|
||||
};
|
||||
|
||||
"grid" = calDefaults // {
|
||||
khal.enable = true;
|
||||
khal.color = "light green";
|
||||
remote = {
|
||||
type = "caldav";
|
||||
# url = "https://cloud.gridisnotajournal.de/remote.php/dav/calendars/till/grid/";
|
||||
# passwordCommand = [ "pass" "uni/grid-caldav-nextcloud" ];
|
||||
# userName = "till";
|
||||
url = "https://kalender.humangeographie.de/grid/96dedda9-cc91-c2fe-3bd8-020296904489/";
|
||||
userName = "grid";
|
||||
passwordCommand = [ "pass" "uni/grid-kalender-radicale" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
13
home/modules/devel.nix
Normal file
13
home/modules/devel.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.file.".npmrc".text = ''
|
||||
prefix = ${config.xdg.dataHome}/npm/packages
|
||||
'';
|
||||
|
||||
home.packages = with pkgs; [
|
||||
nodejs
|
||||
];
|
||||
|
||||
programs.direnv.enable = true;
|
||||
}
|
||||
156
home/modules/firefox.nix
Normal file
156
home/modules/firefox.nix
Normal file
|
|
@ -0,0 +1,156 @@
|
|||
{ config, pkgs, inputs, osConfig, ... }:
|
||||
|
||||
{
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
policies = {
|
||||
DisableFirefoxAccounts = true;
|
||||
DisablePocket = true;
|
||||
DisableTelemetry = true;
|
||||
DownloadDirectory = "${config.home.homeDirectory}/tmp";
|
||||
NoDefaultBookmarks = true;
|
||||
OfferToSaveLogins = false;
|
||||
OfferToSaveLoginsDefault = false;
|
||||
PasswordManagerEnabled = false;
|
||||
EnableTrackingProtection = {
|
||||
Value = true;
|
||||
Cryptomining = true;
|
||||
Fingerprinting = true;
|
||||
};
|
||||
FirefoxHome = {
|
||||
Search = true;
|
||||
Pocket = false;
|
||||
Snippets = false;
|
||||
TopSites = true;
|
||||
Highlights = false;
|
||||
};
|
||||
UserMessaging = {
|
||||
ExtensionRecommendations = false;
|
||||
SkipOnboarding = true;
|
||||
};
|
||||
};
|
||||
profiles = {
|
||||
${config.home.username} = {
|
||||
name = config.home.username;
|
||||
isDefault = true;
|
||||
extensions.packages = with inputs.firefox-addons.packages.${pkgs.stdenv.hostPlatform.system}; [
|
||||
auto-tab-discard
|
||||
keepassxc-browser
|
||||
passff
|
||||
# tampermonkey
|
||||
ublock-origin
|
||||
web-archives
|
||||
zotero-connector
|
||||
];
|
||||
search = {
|
||||
force = true;
|
||||
default = "ddg";
|
||||
engines = {
|
||||
"Nix Packages" = {
|
||||
urls = [{
|
||||
template = "https://search.nixos.org/packages";
|
||||
params = [
|
||||
{ name = "type"; value = "packages"; }
|
||||
{ name = "query"; value = "{searchTerms}"; }
|
||||
];
|
||||
}];
|
||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||
definedAliases = [ "@np" ];
|
||||
};
|
||||
"NixOS Wiki" = {
|
||||
urls = [{ template = "https://nixos.wiki/index.php?search={searchTerms}"; }];
|
||||
icon = "https://nixos.wiki/favicon.png";
|
||||
updateInterval = 24 * 60 * 60 * 1000;
|
||||
definedAliases = [ "@nw" ];
|
||||
};
|
||||
"NixOS Options" = {
|
||||
urls = [{ template = "https://search.nixos.org/options?channel=${osConfig.system.nixos.release}&query={searchTerms}"; }];
|
||||
icon = "https://nixos.org/favicon.png";
|
||||
updateInterval = 24 * 60 * 60 * 1000;
|
||||
definedAliases = [ "@no" ];
|
||||
};
|
||||
"Home manager options" = {
|
||||
urls = [{ template = "https://home-manager-options.extranix.com/?query={searchTerms}&release=release-${osConfig.system.nixos.release}"; }];
|
||||
icon = "https://mipmip.github.io/home-manager-option-search/images/favicon.png";
|
||||
updateInterval = 24 * 60 * 60 * 1000;
|
||||
definedAliases = [ "@hm" ];
|
||||
};
|
||||
"Google maps" = {
|
||||
urls = [{ template = "http://maps.google.com/?q={searchTerms}"; }];
|
||||
icon = "https://www.google.com/images/branding/product/ico/maps15_bnuw3a_32dp.ico";
|
||||
updateInterval = 24 * 60 * 60 * 1000;
|
||||
definedAliases = [ "@gm" ];
|
||||
};
|
||||
"Google scholar" = {
|
||||
urls = [{ template = "https://scholar.google.com/scholar?q={searchTerms}"; }];
|
||||
icon = "https://scholar.google.com/favicon.ico";
|
||||
updateInterval = 24 * 60 * 60 * 1000;
|
||||
definedAliases = [ "@gs" ];
|
||||
};
|
||||
"UB" = {
|
||||
urls = [{ template = "https://ubffm.hds.hebis.de/Search/Results?lookfor={searchTerms}"; }];
|
||||
icon = "https://ubffm.hds.hebis.de/themes/ubffm/images/favicon.ico";
|
||||
updateInterval = 24 * 60 * 60 * 1000;
|
||||
definedAliases = [ "@ub" ];
|
||||
};
|
||||
"SciHub" = {
|
||||
urls = [{ template = "https://libgen.is/search.php?req={searchTerms}"; }];
|
||||
icon = "https://libgen.is/favicon.ico";
|
||||
updateInterval = 24 * 60 * 60 * 1000;
|
||||
definedAliases = [ "@lg" ];
|
||||
};
|
||||
"Libgen" = {
|
||||
urls = [{ template = "https://libgen.is/search.php?req={searchTerms}"; }];
|
||||
icon = "https://libgen.is/favicon.ico";
|
||||
updateInterval = 24 * 60 * 60 * 1000;
|
||||
definedAliases = [ "@lg" ];
|
||||
};
|
||||
"Urban Dictionary" = {
|
||||
urls = [{ template = "https://www.urbandictionary.com/define.php?term={searchTerms}"; }];
|
||||
icon = "https://www.urbandictionary.com/favicon-32x32.png";
|
||||
updateInterval = 24 * 60 * 60 * 1000;
|
||||
definedAliases = [ "@ud" ];
|
||||
};
|
||||
"Leo" = {
|
||||
urls = [{ template = "https://dict.leo.org/englisch-deutsch/{searchTerms}"; }];
|
||||
icon = "https://dict.leo.org/img/favicons/ende-32.png";
|
||||
updateInterval = 24 * 60 * 60 * 1000;
|
||||
definedAliases = [ "@leo" ];
|
||||
};
|
||||
"Wikipedia".metaData.alias = "@wiki";
|
||||
"bing".metaData.hidden = true;
|
||||
"Amazon.de".metaData.hidden = true;
|
||||
};
|
||||
};
|
||||
extraConfig = ''
|
||||
user_pref("app.shield.optoutstudies.enabled", false);
|
||||
user_pref("browser.aboutConfig.showWarning", false);
|
||||
user_pref("browser.bookmarks.addedImportButton", true);
|
||||
user_pref("browser.migrate.content-modal.import-all.enabled", false);
|
||||
user_pref("browser.newtabpage.activity-stream.showSponsoredTopSites", false);
|
||||
user_pref("browser.startup.page", 3);
|
||||
user_pref("browser.tabs.firefox-view", false);
|
||||
user_pref("browser.urlbar.showSearchSuggestionsFirst", false);
|
||||
user_pref("browser.warnOnQuitShortcut", false);
|
||||
user_pref("dom.security.https_only_mode", true);
|
||||
user_pref("extensions.formautofill.creditCards.enabled", false);
|
||||
user_pref("extensions.pocket.enabled", false);
|
||||
user_pref("intl.accept_languages", "de-de,en-us,en");
|
||||
user_pref("intl.regional_prefs.use_os_locales", true);
|
||||
user_pref("media.eme.enabled", true);
|
||||
user_pref("network.trr.custom_uri", "https://dns.quad9.net/dns-query");
|
||||
user_pref("network.trr.mode", 2);
|
||||
user_pref("network.trr.uri", "https://dns.quad9.net/dns-query");
|
||||
user_pref("permissions.default.desktop-notification", 2);
|
||||
user_pref("privacy.annotate_channels.strict_list.enabled", true);
|
||||
user_pref("privacy.donottrackheader.enabled", true);
|
||||
user_pref("privacy.globalprivacycontrol.enabled", true);
|
||||
user_pref("signon.rememberSignons", false);
|
||||
user_pref("toolkit.telemetry.enabled", false);
|
||||
user_pref("toolkit.telemetry.server", "");
|
||||
user_pref("widget.gtk.libadwaita-colors.enabled", false);
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
78
home/modules/fish.nix
Normal file
78
home/modules/fish.nix
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
|
||||
interactiveShellInit = "fish_add_path ${config.xdg.dataHome}/npm/packages/bin";
|
||||
|
||||
shellInit = ''
|
||||
set -gx EDITOR "nvim"
|
||||
set -gx VISUAL "nvim"
|
||||
|
||||
function fish_greeting;
|
||||
echo (set_color magenta)fish $version(set_color normal)
|
||||
end
|
||||
|
||||
function brief;
|
||||
khal list today 1d --day-format=
|
||||
echo ""
|
||||
task rc.verbose=nothing rc.report.foo.columns:id,description.count rc.report.foo.sort:urgency- foo +READY limit:5
|
||||
echo ""
|
||||
tree --noreport -L 1 ~/desktop
|
||||
end
|
||||
|
||||
fzf --fish | source
|
||||
|
||||
function startrloft --description 'Starts R with custom environment'
|
||||
set -lx R_ENVIRON_USER "~/.config/rloft/RLoft_environ"
|
||||
R -q
|
||||
end
|
||||
|
||||
function vd --wraps vim --description 'vim with date in filename'
|
||||
nvim (ymd)_$argv.md
|
||||
end
|
||||
|
||||
function note --description 'Create a new note'
|
||||
if count $argv > /dev/null
|
||||
nvim -c "call CreateNote('$argv')"
|
||||
else
|
||||
nvim ~/notes/(ls ~/notes/ | fzf)
|
||||
end
|
||||
end
|
||||
|
||||
function diary --description 'Create or edit today\'s diary entry'
|
||||
nvim -c "call Diary()"
|
||||
end
|
||||
|
||||
set -U fish_prompt_pwd_dir_length 0
|
||||
|
||||
function fish_prompt --description "Write out the prompt"
|
||||
echo -s (set_color green) (whoami) (set_color brblack) @ (set_color yellow) (hostname) (set_color brblack) : (prompt_pwd) '$ ' (set_color normal)
|
||||
end
|
||||
|
||||
function fish_right_prompt --description "Display info to the right of the prompt"
|
||||
echo -s (__fish_git_prompt)
|
||||
end
|
||||
|
||||
function fish_mode_prompt; end
|
||||
|
||||
set fish_cursor_default line blink
|
||||
|
||||
set __fish_git_prompt_showdirtystate 'yes'
|
||||
set __fish_git_prompt_showstashstate 'yes'
|
||||
set __fish_git_prompt_showuntrackedfiles 'yes'
|
||||
set __fish_git_prompt_showupstream 'yes'
|
||||
set __fish_git_prompt_color_upstream_ahead green
|
||||
set __fish_git_prompt_color_upstream_behind red
|
||||
set __fish_git_prompt_char_dirtystate '*'
|
||||
set __fish_git_prompt_char_stagedstate '→'
|
||||
set __fish_git_prompt_char_untrackedfiles '☡'
|
||||
set __fish_git_prompt_char_stashstate '↩'
|
||||
set __fish_git_prompt_char_upstream_ahead '+'
|
||||
set __fish_git_prompt_char_upstream_behind '-'
|
||||
|
||||
test -f ${config.xdg.configHome}/alias.fish && source ${config.xdg.configHome}/alias.fish
|
||||
'';
|
||||
};
|
||||
}
|
||||
34
home/modules/fonts.nix
Normal file
34
home/modules/fonts.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
anonymousPro
|
||||
cantarell-fonts
|
||||
cascadia-code
|
||||
charis-sil
|
||||
cm_unicode
|
||||
corefonts
|
||||
dejavu_fonts
|
||||
dotcolon-fonts
|
||||
freefont_ttf
|
||||
gyre-fonts
|
||||
hack-font
|
||||
hubot-sans
|
||||
liberation_ttf
|
||||
libertine
|
||||
libertinus
|
||||
merriweather
|
||||
mona-sans
|
||||
monaspace
|
||||
noto-fonts
|
||||
open-sans
|
||||
poppins
|
||||
roboto
|
||||
rubik
|
||||
source-sans-pro
|
||||
source-serif-pro
|
||||
stix-two
|
||||
textfonts
|
||||
tlwg
|
||||
];
|
||||
}
|
||||
58
home/modules/foot.nix
Normal file
58
home/modules/foot.nix
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.foot = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
||||
main = {
|
||||
shell = "${pkgs.fish}/bin/fish -c 'tmux attach'";
|
||||
pad = "34x34";
|
||||
font = "JetBrains Mono:size=14";
|
||||
# font = "Adwaita Mono:size=17";
|
||||
# font-bold = "Adwaita Mono:size=17:weight=bold";
|
||||
# font-italic = "Adwaita Mono:size=17:slant=italic";
|
||||
# font-bold-italic = "Adwaita Mono:size=17:weight=boldslant=italic";
|
||||
# initial-window-mode = "maximized";
|
||||
# initial-color-theme = "dark";
|
||||
};
|
||||
|
||||
mouse.hide-when-typing = "yes";
|
||||
cursor = {
|
||||
style = "beam";
|
||||
blink = true;
|
||||
};
|
||||
|
||||
csd.size = "0";
|
||||
|
||||
colors = {
|
||||
cursor = "eeeeee 1c1c1c";
|
||||
alpha = "1.0";
|
||||
background = "eeeeee";
|
||||
foreground = "1c1c1c";
|
||||
regular0 = "1c1c1c"; # black
|
||||
bright0 = "585858"; # bright black
|
||||
regular1 = "af0000"; # red
|
||||
bright1 = "d70000"; # bright red
|
||||
regular2 = "008700"; # green
|
||||
bright2 = "5faf5f"; # bright green
|
||||
regular3 = "d75f00"; # yellow
|
||||
bright3 = "ffaf00"; # bright yellow
|
||||
regular4 = "005faf"; # blue
|
||||
bright4 = "0087af"; # bright blue
|
||||
regular5 = "d70087"; # magenta
|
||||
bright5 = "ff5faf"; # bright magenta
|
||||
regular6 = "005f87"; # cyan
|
||||
bright6 = "00afaf"; # bright cyan
|
||||
regular7 = "ffffff"; # white
|
||||
bright7 = "bcbcbc"; # bright white
|
||||
};
|
||||
|
||||
key-bindings = {
|
||||
show-urls-launch = "Control+Shift+g";
|
||||
show-urls-copy = "Control+Shift+y";
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
12
home/modules/git.nix
Normal file
12
home/modules/git.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{...}:
|
||||
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
settings = {
|
||||
pull.rebase = true;
|
||||
extraConfig.init.defaultBranch = "main";
|
||||
};
|
||||
lfs.enable = true;
|
||||
};
|
||||
}
|
||||
114
home/modules/gnome.nix
Normal file
114
home/modules/gnome.nix
Normal file
|
|
@ -0,0 +1,114 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
home.pointerCursor = {
|
||||
name = "Adwaita";
|
||||
package = pkgs.adwaita-icon-theme;
|
||||
size = 32;
|
||||
};
|
||||
|
||||
home.packages = with pkgs.gnomeExtensions; [
|
||||
run-or-raise
|
||||
removable-drive-menu
|
||||
];
|
||||
|
||||
dconf.settings = {
|
||||
"org/gnome-shell" = {
|
||||
enabled-extensions = [
|
||||
"run-or-raise@edvard.cz"
|
||||
];
|
||||
};
|
||||
"org/gnome/shell/keybindings" = {
|
||||
toggle-quick-settings = ["<Super>comma"];
|
||||
toggle-message-tray = ["<Super>n"];
|
||||
toggle-overview = ["<Super>a"];
|
||||
};
|
||||
"org/gnome/desktop/peripherals/touchpad" = {
|
||||
speed = 0.5;
|
||||
};
|
||||
"org/gnome/desktop/session" = {
|
||||
idle-delay = 0;
|
||||
};
|
||||
"org/gnome/desktop/interface" = {
|
||||
cursor-theme = "Adwaita";
|
||||
icon-theme = "Adwaita";
|
||||
gtk-theme = "Adwaita";
|
||||
};
|
||||
"org/gnome/desktop/background" = {
|
||||
picture-options = "zoom";
|
||||
};
|
||||
"org/gnome/desktop/wm/keybindings" = {
|
||||
move-to-monitor-down = [];
|
||||
move-to-monitor-left = [];
|
||||
move-to-monitor-right = [];
|
||||
move-to-monitor-up = [];
|
||||
move-to-workspace-last = [];
|
||||
switch-applications = ["<Super>Tab"];
|
||||
switch-applications-backward = ["<Shift><Super>Tab"];
|
||||
cycle-panels = [];
|
||||
cycle-panels-backward = [];
|
||||
cycle-group = [];
|
||||
cycle-group-backward = [];
|
||||
cycle-windows = [];
|
||||
cycle-windows-backward = [];
|
||||
focus-active-notification = [];
|
||||
switch-panels = [];
|
||||
switch-panels-backward = [];
|
||||
switch-to-workspace-last = [];
|
||||
switch-group = ["<Alt>Tab"];
|
||||
switch-group-backward = ["<Shift><Alt>Tab"];
|
||||
minimize = ["<Super>space"];
|
||||
maximize = ["<Super>k"];
|
||||
unmaximize = ["<Super>j"];
|
||||
toggle-tiled-left = ["<Super>h"];
|
||||
toggle-tiled-right = ["<Super>l"];
|
||||
close = ["<Super>w"];
|
||||
screensaver = ["<Super>BackSpace"];
|
||||
switch-input-source = ["<Alt><Super>space"];
|
||||
switch-input-source-backward = ["<Shift><Alt><Super>space"];
|
||||
move-to-workspace-1 = ["<Shift><Super>1"];
|
||||
move-to-workspace-2 = ["<Shift><Super>2"];
|
||||
move-to-workspace-3 = ["<Shift><Super>3"];
|
||||
move-to-workspace-4 = ["<Shift><Super>4"];
|
||||
move-to-workspace-left = ["<Shift><Super>Left"];
|
||||
move-to-workspace-right = ["<Shift><Super>Right"];
|
||||
switch-to-workspace-1 = ["<Super>1"];
|
||||
switch-to-workspace-2 = ["<Super>2"];
|
||||
switch-to-workspace-3 = ["<Super>3"];
|
||||
switch-to-workspace-4 = ["<Super>4"];
|
||||
switch-to-workspace-left = ["<Super>Left"];
|
||||
switch-to-workspace-right = ["<Super>Right"];
|
||||
switch-to-application-1 = [];
|
||||
switch-to-application-2 = [];
|
||||
switch-to-application-3 = [];
|
||||
switch-to-application-4 = [];
|
||||
toggle-fullscreen = ["<Shift><Super>f"];
|
||||
begin-resize = ["<Super>r"];
|
||||
};
|
||||
"org/gnome/mutter" = {
|
||||
dynamic-workspaces = true;
|
||||
};
|
||||
"org/gnome/mutter/keybindings" = {
|
||||
switch-monitor = ["XF86Display"];
|
||||
};
|
||||
"org/gnome/settings-daemon/plugins/media-keys" = {
|
||||
screenreader = [];
|
||||
magnifier = ["<Super>z"];
|
||||
magnifier-zoom-in = [];
|
||||
magnifier-zoom-out = [];
|
||||
help = [];
|
||||
logout = ["<Super>q"];
|
||||
};
|
||||
"org/gnome/settings-daemon/plugins/power" = {
|
||||
sleep-inactive-battery-timeout = 1200;
|
||||
};
|
||||
};
|
||||
|
||||
xdg.configFile."run-or-raise/shortcuts.conf".text = ''
|
||||
<Super>b,firefox,,
|
||||
<Super>f,nautilus,,
|
||||
<Super>g:always-run,tmux new-window -n vifm vifm ~/desktop,foot,
|
||||
<Super>return,foot,,
|
||||
<Super>p,keepassxc,,,
|
||||
'';
|
||||
}
|
||||
34
home/modules/gpg.nix
Normal file
34
home/modules/gpg.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
home.packages = with pkgs; [
|
||||
pinentry-all
|
||||
];
|
||||
|
||||
# moved to system
|
||||
|
||||
# services.gpg-agent = {
|
||||
# enable = true;
|
||||
# pinentry.package = pkgs.pinentry-all;
|
||||
# pinentry.program = "pinentry";
|
||||
# # enableSshSupport = true;
|
||||
# };
|
||||
|
||||
programs.gpg = {
|
||||
enable = true;
|
||||
settings = {
|
||||
no-emit-version = true;
|
||||
no-comments = true;
|
||||
keyserver = "hkps://keys.openpgp.org/";
|
||||
keyserver-options = [
|
||||
"no-honor-keyserver-url"
|
||||
"include-revoked"
|
||||
];
|
||||
personal-cipher-preferences = "AES256 AES192 AES CAST5";
|
||||
personal-digest-preferences = "SHA512 SHA384 SHA256 SHA224";
|
||||
cert-digest-algo = "SHA512";
|
||||
default-preference-list = "SHA512 SHA384 SHA256 SHA224 AES256 AES192 AES CAST5 ZLIB BZIP2 ZIP Uncompressed";
|
||||
};
|
||||
};
|
||||
}
|
||||
7
home/modules/hyprland.nix
Normal file
7
home/modules/hyprland.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
wayland.windowManager.hyprland = {
|
||||
systemd.enable = false;
|
||||
};
|
||||
}
|
||||
29
home/modules/khard-dump.nix
Normal file
29
home/modules/khard-dump.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
systemd.user.timers = {
|
||||
khard-dump = {
|
||||
Unit = {
|
||||
Description = "Timer to run khard-dump service";
|
||||
};
|
||||
Timer = {
|
||||
OnCalendar = "*:00/10";
|
||||
Unit = "khard-dump.service";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.services = {
|
||||
khard-dump = {
|
||||
Unit = {
|
||||
Description = "Dumps contact info to custom cache file";
|
||||
};
|
||||
Service = {
|
||||
ExecStart = "${pkgs.writeScript "khard-dump" ''
|
||||
#! ${pkgs.stdenv.shell}
|
||||
${pkgs.khard.outPath}/bin/khard email --parsable --remove-first-line | awk 'BEGIN{FS=OFS="\t"}{print $2, $1}\' > ${config.xdg.cacheHome}/khard-dump
|
||||
''}";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
16
home/modules/mail/bindings.neomuttrc
Normal file
16
home/modules/mail/bindings.neomuttrc
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
|
||||
# compose
|
||||
|
||||
macro index,pager go "<shell-escape>mbsync $my_account && notmuch new<enter>" "Sync this account"
|
||||
macro index,pager gO "<shell-escape>mbsync -a && notmuch new<enter>" "Sync all accounts"
|
||||
|
||||
bind index,pager / noop
|
||||
macro index,pager // "<vfolder-from-query-readonly>folder:/$my_account/" "Find in account"
|
||||
macro index,pager g/ "<vfolder-from-query-readonly>" "Find in all accounts"
|
||||
macro index,pager /! "<vfolder-from-query-readonly>folder:+$my_account/$my_nm_spoolfile" "Find in inbox"
|
||||
macro index,pager /< "<vfolder-from-query-readonly>folder:+$my_account/$my_nm_record" "Find in sent"
|
||||
macro index,pager /> "<vfolder-from-query-readonly>folder:+$my_account/$my_nm_mbox" "Find in archive"
|
||||
macro index,pager /d "<vfolder-from-query-readonly>folder:+$my_account/$my_nm_postponed" "Find in drafts"
|
||||
macro index,pager /t "<vfolder-from-query-readonly>folder:+$my_account/$my_nm_trash" "Find in trash"
|
||||
macro index,pager /j "<vfolder-from-query-readonly>folder:+$my_account/$my_nm_junk" "Find in junk"
|
||||
|
||||
73
home/modules/mail/config.neomuttrc
Normal file
73
home/modules/mail/config.neomuttrc
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
# Alias
|
||||
|
||||
set alias_file = ~/.local/share/neomutt/aliases.neomuttrc
|
||||
source $alias_file
|
||||
|
||||
# External
|
||||
|
||||
set my_download_folder = ~/tmp
|
||||
|
||||
# Status bar
|
||||
|
||||
set status_chars = "✔↻٪A"
|
||||
unset help
|
||||
|
||||
# Index
|
||||
|
||||
set index_format = "%-25.25F %<[y?%<[7d?%<[d?%[ %H:%M]&%[%a %H:%M]>&%[%d.%m. %Hh]>&%[%d.%m.%Y]> %Z %?X?▼ &?%s"
|
||||
set strict_threads
|
||||
set send_charset = "utf-8:iso-8859-1:us-ascii"
|
||||
set charset = "utf-8"
|
||||
|
||||
# Pager view
|
||||
|
||||
set pager_index_lines = 10
|
||||
set pager_context = 3
|
||||
set pager_stop
|
||||
set smart_wrap
|
||||
set menu_scroll
|
||||
set tilde
|
||||
unset markers
|
||||
ignore *
|
||||
unignore from: to: cc: bcc: date: subject:
|
||||
unhdr_order *
|
||||
hdr_order from: to: cc: bcc: date: subject:
|
||||
alternative_order text/plain text/enriched text/html
|
||||
auto_view text/html
|
||||
|
||||
# Attachments
|
||||
|
||||
set rfc2047_parameters
|
||||
set attach_save_dir = $my_download_folder
|
||||
|
||||
# Colors
|
||||
|
||||
color indicator brightwhite brightblack
|
||||
color index_flags brightmagenta default '.*'
|
||||
color index_date cyan default
|
||||
color index brightblack default '~N'
|
||||
color header brightblack default ".*"
|
||||
color header brightgreen default "^(Subject)"
|
||||
color header yellow default "^(From|To|CC|BCC)"
|
||||
color header blue default "^Date"
|
||||
color message cyan default
|
||||
color error red default
|
||||
color tilde black default
|
||||
color normal default default
|
||||
color attachment brightblack default
|
||||
color search black yellow
|
||||
color quoted green default
|
||||
color quoted1 blue default
|
||||
color quoted2 cyan default
|
||||
color quoted3 yellow default
|
||||
color quoted4 red default
|
||||
color quoted5 brightred default
|
||||
color signature cyan default
|
||||
color underline black default
|
||||
color body blue default "[\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+" # Email addresses
|
||||
color body blue default "(https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+" # URL
|
||||
color body red default "(BAD signature)"
|
||||
color body green default "(Good signature)"
|
||||
color body brightblack default "^gpg: .*"
|
||||
color body green default "^gpg: Good signature .*"
|
||||
color body red default "^gpg: BAD signature from.*"
|
||||
282
home/modules/mail/default.nix
Normal file
282
home/modules/mail/default.nix
Normal file
|
|
@ -0,0 +1,282 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
|
||||
makeConfig = accountName:
|
||||
''
|
||||
unset reverse_name
|
||||
unset crypt_auto_pgp
|
||||
unset crypt_auto_smime
|
||||
set my_account='${ accountName }'
|
||||
macro index,pager / "<vfolder-from-query>tag:${ accountName } "
|
||||
unalternates *
|
||||
set nm_record_tags = "+sent -inbox -unread +${ accountName }";
|
||||
set my_signature = ${ pkgs.writeText "signature.txt" config.accounts.email.accounts.${accountName}.signature.text }
|
||||
set status_format = "— [ %r ] $my_account %f (%lB) %>— %m messages%?n? [ %n new ]?%?d? [ %d to delete ]?%?t? [ %t tagged ]? —"
|
||||
'';
|
||||
|
||||
makeAccount = accountName: {
|
||||
signature.showSignature = "append";
|
||||
smtp.tls.useStartTls = true;
|
||||
msmtp.enable = true;
|
||||
|
||||
mbsync = {
|
||||
enable = true;
|
||||
create = "maildir";
|
||||
expunge = "both";
|
||||
};
|
||||
|
||||
neomutt = {
|
||||
enable = true;
|
||||
sendMailCommand = "${lib.getExe pkgs.msmtp} -a ${ accountName }";
|
||||
};
|
||||
|
||||
notmuch = {
|
||||
enable = true;
|
||||
neomutt = {
|
||||
virtualMailboxes = [
|
||||
{ name = "Inbox"; query = "tag:${ accountName } and tag:inbox"; }
|
||||
{ name = "Archive"; query = "tag:${ accountName } and not tag:sent and not tag:draft"; }
|
||||
{ name = "Sent"; query = "tag:${ accountName } and tag:sent"; }
|
||||
{ name = "Drafts"; query = "tag:${ accountName } and tag:draft"; }
|
||||
{ name = "Spam"; query = "tag:${ accountName } and tag:spam"; }
|
||||
{ name = "Trash"; query = "tag:${ accountName } and tag:trash"; }
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
mailcap_path = pkgs.writeText "neomutt_mailcap" ''
|
||||
application/pdf; zathura %s
|
||||
multipart; xdg-open %s
|
||||
text/html; firefox %s; description=HTML Text; nametemplate=%s.html; needsterminal
|
||||
text/html; w3m -v -F -T text/html -dump %s; copiousoutput
|
||||
text/calendar; khal import %s
|
||||
text; neomutt %s
|
||||
application; xdg-open %s
|
||||
image; xdg-open %s
|
||||
video; xdg-open %s
|
||||
audio; xdg-open %s
|
||||
message; xdg-open %s
|
||||
model; xdg-open %s
|
||||
'';
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
programs.mu.enable = true;
|
||||
|
||||
accounts.email = {
|
||||
maildirBasePath = "${config.xdg.dataHome}/mail";
|
||||
accounts = {
|
||||
gu = { name, ... }: lib.attrsets.recursiveUpdate (makeAccount name) {
|
||||
primary = true;
|
||||
address = "straube@geo.uni-frankfurt.de";
|
||||
realName = "Till Straube";
|
||||
imap.host = "imap.server.uni-frankfurt.de";
|
||||
smtp.host = "smtpauth.rz.uni-frankfurt.de";
|
||||
userName = "tstraube";
|
||||
passwordCommand = "pass uni/hrz";
|
||||
signature = {
|
||||
text = ''
|
||||
Dr. Till Straube (he/him)
|
||||
Dept. of Human Geography
|
||||
Goethe University Frankfurt
|
||||
'';
|
||||
};
|
||||
neomutt = {
|
||||
extraConfig = makeConfig name + ''
|
||||
color status blue default
|
||||
alternates ^tstraube@(em|rz)?.uni-frankfurt.de$
|
||||
set crypt_auto_smime
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
t9e = { name, ... }: lib.attrsets.recursiveUpdate (makeAccount name) {
|
||||
address = "till.straube@t9e.me";
|
||||
realName = "Till Straube";
|
||||
imap.host = "arielle.ktiu.net";
|
||||
smtp.host = "arielle.ktiu.net";
|
||||
userName = "till.straube@t9e.me";
|
||||
signature.text = ''
|
||||
Till Straube (he/him)
|
||||
PGP key: https://keys.openpgp.org/search?q=till.straube@t9e.me
|
||||
'';
|
||||
neomutt = {
|
||||
extraConfig = makeConfig name + ''
|
||||
color status green default
|
||||
alternates @t9e.me$ @ktiu.net$ ^(tillkowski|till.straube)@gmail.com$
|
||||
set reverse_name
|
||||
set crypt_auto_pgp
|
||||
'';
|
||||
};
|
||||
msmtp.extraConfig.port = "587";
|
||||
passwordCommand = "pass accounts/ktiu-imap";
|
||||
};
|
||||
|
||||
ksh = { name, ... }: lib.attrsets.recursiveUpdate (makeAccount name) {
|
||||
address = "kein_schlussstrich_hessen@systemli.org";
|
||||
realName = "Kein Schlussstrich Hessen";
|
||||
imap.host = "mail.systemli.org";
|
||||
smtp.host = "mail.systemli.org";
|
||||
userName = "kein_schlussstrich_hessen@systemli.org";
|
||||
signature.text = ''
|
||||
Kein Schlussstrich Hessen
|
||||
PGP Key: https://keys.openpgp.org/search?q=kein_schlussstrich_hessen@systemli.org
|
||||
'';
|
||||
neomutt = {
|
||||
extraConfig = makeConfig name + ''
|
||||
color status red default
|
||||
set crypt_auto_pgp
|
||||
'';
|
||||
};
|
||||
passwordCommand = "pass ksh/systemli";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.msmtp.enable = true;
|
||||
|
||||
programs.mbsync.enable = true;
|
||||
|
||||
programs.notmuch = {
|
||||
enable = true;
|
||||
search.excludeTags = [ "trash" "spam" ];
|
||||
new.tags = [ "new" "unread" ];
|
||||
hooks = {
|
||||
preNew = ''
|
||||
notmuch tag +draft -- 'folder:"/\/Drafts$/"'
|
||||
mbsync --all
|
||||
'';
|
||||
postNew = ''
|
||||
notmuch tag +gu -- tag:new path:gu/**
|
||||
notmuch tag +t9e -- tag:new path:t9e/**
|
||||
notmuch tag +ksh -- tag:new path:ksh/**
|
||||
notmuch tag +inbox -- tag:new 'folder:"/\/Inbox$/"'
|
||||
notmuch tag +sent -unread -- tag:new 'folder:"/\/Sent$/"'
|
||||
notmuch tag +trash -unread -- tag:new 'folder:"/\/Trash$/"'
|
||||
notmuch tag +draft -unread -- tag:new 'folder:"/\/Drafts$/"'
|
||||
notmuch tag +spam -- tag:new 'folder:"/\/Spam$/"'
|
||||
notmuch tag +spam -- tag:new 'folder:"/\/Junk$/"'
|
||||
notmuch tag -new -- tag:new
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
programs.neomutt = {
|
||||
enable = true;
|
||||
|
||||
vimKeys = true;
|
||||
changeFolderWhenSourcingAccount = true;
|
||||
editor = "nvim -c 'call woof#init#Init()'";
|
||||
sort = "reverse-date-received";
|
||||
unmailboxes = true;
|
||||
|
||||
settings = {
|
||||
abort_noattach = "ask-yes";
|
||||
abort_noattach_regex = "\"(attach|enclosed|anbei|anhängen|angehängt|anhang|anhänge|hängt an)\"";
|
||||
auto_edit = "yes";
|
||||
beep = "no";
|
||||
confirm_append = "no";
|
||||
crypt_auto_sign = "yes";
|
||||
crypt_replyencrypt = "yes";
|
||||
crypt_replysign = "yes";
|
||||
crypt_replysignencrypted = "yes";
|
||||
crypt_verify_sig = "yes";
|
||||
edit_headers = "yes";
|
||||
forward_attachments = "yes";
|
||||
forward_format = "\"Fwd: %s\"";
|
||||
forward_quote = "yes";
|
||||
help = "no";
|
||||
include = "yes";
|
||||
mail_check_stats = "yes";
|
||||
mailcap_path = "${ mailcap_path }";
|
||||
mark_old = "no";
|
||||
markers = "no";
|
||||
mbox_type = "Maildir";
|
||||
menu_scroll = "yes";
|
||||
mime_type_query_command = "\"file -b --mime-type %s\"";
|
||||
nm_record = "yes";
|
||||
pager_context = "3";
|
||||
pager_index_lines = "5";
|
||||
pager_stop = "yes";
|
||||
query_command= "\"khard email --parsable '%s'\"";
|
||||
recall = "no";
|
||||
resume_draft_files = "yes";
|
||||
reverse_real_name = "no";
|
||||
shell = "/bin/sh";
|
||||
sleep_time = "0";
|
||||
smart_wrap = "yes";
|
||||
status_chars = "✔↻٪A";
|
||||
tilde = "yes";
|
||||
use_envelope_from = "yes";
|
||||
virtual_spool_file = "yes";
|
||||
wait_key = "no";
|
||||
};
|
||||
|
||||
binds = [
|
||||
{ key = "m"; map = [ "index" "pager" ]; action = "noop"; }
|
||||
{ key = "k"; map = [ "pager" ]; action = "previous-entry"; }
|
||||
{ key = "j"; map = [ "pager" ]; action = "next-entry"; }
|
||||
{ key = "<return>"; map = [ "index" ]; action = "display-message"; }
|
||||
{ key = "<space>"; map = "index"; action = "entire-thread"; }
|
||||
{ key = "gf"; map = [ "index" "pager" ]; action = "change-folder"; }
|
||||
{ key = "<Tab>"; map = [ "editor" ]; action = "complete-query"; }
|
||||
{ key = "P"; map = [ "compose" ]; action = "pgp-menu"; }
|
||||
{ key = "p"; map = [ "compose" ]; action = "postpone-message"; }
|
||||
];
|
||||
|
||||
macros = [
|
||||
{ key = "gu"; map = [ "index" "pager" ]; action = "<vfolder-from-query>tag:dummy<enter>:source ${config.xdg.configHome}/neomutt/gu<enter>g!"; }
|
||||
{ key = "gm"; map = [ "index" "pager" ]; action = "<vfolder-from-query>tag:dummy<enter>:source ${config.xdg.configHome}/neomutt/t9e<enter>g!"; }
|
||||
{ key = "gk"; map = [ "index" "pager" ]; action = "<vfolder-from-query>tag:dummy<enter>:source ${config.xdg.configHome}/neomutt/ksh<enter>g!"; }
|
||||
|
||||
{ key = "Y"; map = [ "index" "pager" ]; action = "<modify-labels-then-hide>"; }
|
||||
{ key = "y"; map = [ "index" "pager" ]; action = "<modify-labels-then-hide>-inbox -unread -spam -trash<enter><sync-mailbox>"; }
|
||||
{ key = "J"; map = [ "index" "pager" ]; action = "<modify-labels-then-hide>+spam -inbox -unread -trash<enter><sync-mailbox>"; }
|
||||
{ key = "I"; map = [ "index" "pager" ]; action = "<modify-labels-then-hide>+inbox -old -spam -trash<enter><sync-mailbox>"; }
|
||||
{ key = "Y"; map = [ "index" "pager" ]; action = "<modify-labels-then-hide>"; }
|
||||
{ key = "dd"; map = [ "index" "pager" ]; action = "<modify-labels-then-hide>+trash -inbox -unread -spam<enter><sync-mailbox>"; }
|
||||
|
||||
{ key = "g!"; map = [ "index" "pager" ]; action = "<change-vfolder>Inbox<enter>"; }
|
||||
{ key = "g<"; map = [ "index" "pager" ]; action = "<change-vfolder>Sent<enter>"; }
|
||||
{ key = "g>"; map = [ "index" "pager" ]; action = "<change-vfolder>Archive<enter>"; }
|
||||
{ key = "gj"; map = [ "index" "pager" ]; action = "<change-vfolder>Spam<enter>"; }
|
||||
{ key = "gd"; map = [ "index" "pager" ]; action = "<change-vfolder>Drafts<enter>"; }
|
||||
{ key = "gt"; map = [ "index" "pager" ]; action = "<change-vfolder>Trash<enter>"; }
|
||||
|
||||
{ key = "go"; map = [ "index" "pager" ]; action = "<shell-escape>notmuch new<enter>"; }
|
||||
{ key = "V"; map = ["index" "pager"]; action = "<view-attachments><search>html<enter><view-mailcap><exit>"; }
|
||||
{ key = "mar"; map = [ "index" "pager" ]; action = "<tag-pattern>new<enter><tag-prefix-cond><clear-flag>n<enter><tag-prefix-cond><clear-flag>*<enter>"; }
|
||||
{ key = "A"; map = [ "index" "pager" ]; action = "<pipe-message>khard add-email --vcard-version=4.0<return>"; }
|
||||
{ key = "S"; map = [ "index" "pager" ]; action = "<pipe-message>ripmime -i - -d ~/tmp && rm ~/tmp/textfile*"; }
|
||||
{ key = "gb"; map = [ "index" "pager" ]; action = "<pipe-message>urlscan<enter>"; }
|
||||
{ key = "I"; map = [ "compose" ]; action = "<attach-file>`tmpfile=$(mktemp -u --suffix .png -t XXXXXXXXXXXX -p ~/tmp) && wl-paste -t image/png > \"$tmpfile\" && echo \"$tmpfile\"`<enter>"; }
|
||||
{ key = "p"; map = [ "compose" ]; action = "<postpone-message>"; }
|
||||
|
||||
{ key = "c"; map = [ "index" "pager" ]; action = "<enter-command>set signature=$my_signature<enter><mail>"; }
|
||||
{ key = "r"; map = [ "index" "pager" ]; action = "<enter-command>unset signature<enter><reply>"; }
|
||||
{ key = "a"; map = [ "index" "pager" ]; action = "<enter-command>unset signature<enter><group-reply>"; }
|
||||
{ key = "f"; map = [ "index" "pager" ]; action = "<enter-command>unset signature<enter><forward-message>"; }
|
||||
{ key = "l"; map = [ "index" "pager" ]; action = "<enter-command>unset signature<enter><list-reply>"; }
|
||||
];
|
||||
|
||||
extraConfig = builtins.readFile ./config.neomuttrc;
|
||||
};
|
||||
|
||||
xdg.configFile."neomutt/bindings.neomuttrc".source = ./bindings.neomuttrc;
|
||||
|
||||
programs.neovim.plugins = with pkgs.vimPlugins; [
|
||||
{
|
||||
plugin = vim-pathogen;
|
||||
config = "execute pathogen#infect()";
|
||||
}
|
||||
];
|
||||
|
||||
xdg.configFile."nvim/bundle/woof-vim" = {
|
||||
source = config.lib.file.mkOutOfStoreSymlink "/home/till/devel/woof-vim";
|
||||
recursive = true;
|
||||
};
|
||||
|
||||
}
|
||||
14
home/modules/media.nix
Normal file
14
home/modules/media.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
castget
|
||||
feh
|
||||
ffmpeg
|
||||
nicotine-plus
|
||||
qbittorrent
|
||||
vlc
|
||||
yt-dlp
|
||||
zathura
|
||||
];
|
||||
}
|
||||
9
home/modules/messaging.nix
Normal file
9
home/modules/messaging.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
signal-desktop
|
||||
# telegram-desktop
|
||||
simplex-chat-desktop
|
||||
];
|
||||
}
|
||||
62
home/modules/nvim/config.vim
Normal file
62
home/modules/nvim/config.vim
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
let mapleader=" "
|
||||
let maplocalleader="\\"
|
||||
|
||||
set colorcolumn=+1
|
||||
set expandtab
|
||||
set ignorecase
|
||||
set iskeyword+=-,ä,Ä,ö,Ö,ü,Ü,ß
|
||||
set linebreak
|
||||
set list listchars=tab:»\ ,trail:·,nbsp:~
|
||||
set number
|
||||
set relativenumber
|
||||
set scrolloff=7
|
||||
set shell=/bin/sh
|
||||
set shiftwidth=2
|
||||
set shortmess=FfmnxoTIc
|
||||
set signcolumn=no
|
||||
set smartcase
|
||||
set softtabstop=2
|
||||
set spelllang=en_us,de_20
|
||||
set spellfile=~/.local/share/nvim/site/spell/till.utf-8.add
|
||||
set splitbelow
|
||||
set splitright
|
||||
set tabstop=2
|
||||
set updatetime=300
|
||||
|
||||
set foldmethod=expr
|
||||
set foldexpr=nvim_treesitter#foldexpr()
|
||||
|
||||
let g:netrw_liststyle = 3
|
||||
let g:netrw_fastbrowse = 0
|
||||
|
||||
nnoremap Y y$
|
||||
|
||||
nnoremap gF :edit <cfile><return>
|
||||
nnoremap gx :! xdg-open <cfile><return>
|
||||
|
||||
nnoremap <silent> <tab> :bnext<return>
|
||||
nnoremap <silent> <S-tab> :bnext<return>
|
||||
nnoremap <silent> Q :bdelete<return>
|
||||
nnoremap <c-q> :hide<return>
|
||||
|
||||
nnoremap <leader>m :make<return>
|
||||
|
||||
tnoremap <esc> <c-\><c-n>
|
||||
|
||||
xnoremap il g_o^
|
||||
onoremap <silent> il :normal vil<return>
|
||||
xnoremap al $o0
|
||||
onoremap <silent> al :normal val<return>
|
||||
xnoremap i% GoggV
|
||||
onoremap <silent> i% :normal vi%<return>
|
||||
|
||||
" highlight Normal guibg=NONE
|
||||
|
||||
function CreateNote(title)
|
||||
execute "VimwikiIndex"
|
||||
execute "VimwikiGoto " . a:title
|
||||
endfunction
|
||||
|
||||
function Diary()
|
||||
execute "VimwikiMakeDiaryNote"
|
||||
endfunction
|
||||
238
home/modules/nvim/default.nix
Normal file
238
home/modules/nvim/default.nix
Normal file
|
|
@ -0,0 +1,238 @@
|
|||
{ pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
astro-language-server
|
||||
marksman
|
||||
nil
|
||||
tree-sitter
|
||||
typescript-language-server
|
||||
vim-language-server
|
||||
];
|
||||
|
||||
programs.neovim = {
|
||||
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
|
||||
extraConfig = builtins.readFile ./config.vim;
|
||||
|
||||
plugins = with pkgs.vimPlugins;
|
||||
|
||||
[
|
||||
cmp-buffer
|
||||
cmp-cmdline
|
||||
cmp-emoji
|
||||
cmp-fish
|
||||
cmp-nvim-lsp
|
||||
cmp-nvim-ultisnips
|
||||
cmp-path
|
||||
|
||||
{
|
||||
plugin = fugitive;
|
||||
type = "lua";
|
||||
config = ''
|
||||
vim.api.nvim_set_keymap("n", "<Leader>g", ":Git<CR>", { noremap = true, silent = true })
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
plugin = fzf-vim;
|
||||
type = "lua";
|
||||
config = ''
|
||||
vim.api.nvim_set_keymap('i', '<c-x><c-f>', '<Plug>(fzf-complete-path)', { silent = true })
|
||||
vim.api.nvim_set_keymap('i', '<c-x><c-k>', '<Plug>(fzf-complete-word)', { silent = true })
|
||||
vim.api.nvim_set_keymap('i', '<c-x><c-l>', '<Plug>(fzf-complete-line)', { silent = true })
|
||||
|
||||
vim.api.nvim_set_keymap('n', '<localleader><tab>', '<Plug>(fzf-maps-n)', { silent = true })
|
||||
vim.api.nvim_set_keymap('x', '<localleader><tab>', '<Plug>(fzf-maps-x)', { silent = true })
|
||||
vim.api.nvim_set_keymap('o', '<localleader><tab>', '<Plug>(fzf-maps-o)', { silent = true })
|
||||
|
||||
vim.api.nvim_set_keymap('n', '<leader>b', ':Buffers<return>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<leader>o', ':Files<return>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<leader>O', ':Files ~/', { noremap = true })
|
||||
vim.api.nvim_set_keymap('n', '<leader>r', ':Read<return>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<leader>R', ':Read ~/', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<leader>a', ':Ag<return>', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<leader>A', ':Ag ~/', { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<leader>.', ':Files ~/devel/omniflake/<return>', { noremap = true, silent = true })
|
||||
|
||||
vim.api.nvim_create_user_command(
|
||||
'Read',
|
||||
'call fzf#run(fzf#wrap({\'sink\': \'read\', \'dir\': <q-args>}))',
|
||||
{ nargs = '?', complete = 'dir' }
|
||||
)
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
plugin = goyo;
|
||||
config = ''
|
||||
nnoremap <silent> yog :Goyo<CR>
|
||||
nnoremap <silent> [og :Goyo 80<return>
|
||||
nnoremap <silent> ]og :Goyo!<return>
|
||||
'';
|
||||
}
|
||||
{
|
||||
plugin = limelight-vim;
|
||||
config = ''
|
||||
set termguicolors
|
||||
let g:limelight_conceal_ctermfg = 'darkgray'
|
||||
|
||||
nnoremap yof :Limelight!!<return>
|
||||
nnoremap [of :Limelight<return>
|
||||
nnoremap ]of :Limelight!<return>
|
||||
'';
|
||||
}
|
||||
|
||||
nabla-nvim
|
||||
|
||||
{
|
||||
plugin = nvim-cmp;
|
||||
type = "lua";
|
||||
config = builtins.readFile ./nvim-cmp.lua;
|
||||
}
|
||||
|
||||
{
|
||||
plugin = nvim-colorizer-lua;
|
||||
config = "lua require 'colorizer'.setup()";
|
||||
}
|
||||
|
||||
{
|
||||
plugin = nvim-lspconfig;
|
||||
type = "lua";
|
||||
config = ''
|
||||
vim.lsp.enable('astro')
|
||||
vim.lsp.enable('marksman')
|
||||
vim.lsp.enable('nil_ls')
|
||||
vim.lsp.enable('r_language_server')
|
||||
vim.lsp.enable('rust-analyzer')
|
||||
vim.lsp.enable('texlab')
|
||||
vim.lsp.enable('ts_ls')
|
||||
vim.lsp.enable('vimls')
|
||||
|
||||
vim.api.nvim_del_keymap('i', '<c-s>')
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
plugin = (nvim-treesitter.withPlugins (p: [ p.nix p.lua p.r p.typescript ]));
|
||||
type = "lua";
|
||||
config = ''
|
||||
vim.api.nvim_create_autocmd('FileType', {
|
||||
pattern = { 'nix', 'markdown', 'lua', 'r' },
|
||||
callback = function()
|
||||
-- Enable Tree-sitter-based folding
|
||||
vim.o.foldexpr = 'v:lua.vim.treesitter.foldexpr()'
|
||||
vim.o.foldmethod = 'expr'
|
||||
-- Optional: configure fold behavior
|
||||
vim.o.foldlevel = 99
|
||||
vim.o.foldlevelstart = 99
|
||||
end,
|
||||
})
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
plugin = papercolor-theme;
|
||||
config = ''
|
||||
set background=light
|
||||
colorscheme PaperColor
|
||||
'';
|
||||
}
|
||||
|
||||
typescript-vim
|
||||
|
||||
{
|
||||
plugin = ultisnips;
|
||||
type = "lua";
|
||||
config = ''
|
||||
vim.api.nvim_set_keymap('n', '<leader>se', ':UltiSnipsEdit!<return>', { noremap = true, silent = true })
|
||||
'';
|
||||
}
|
||||
|
||||
vifm-vim
|
||||
|
||||
{
|
||||
plugin = vim-astro;
|
||||
config = ''
|
||||
let g:astro_typescript = 'enable'
|
||||
'';
|
||||
}
|
||||
|
||||
vim-commentary
|
||||
|
||||
{
|
||||
plugin = vim-easy-align;
|
||||
config = ''
|
||||
xmap ga <Plug>(EasyAlign)
|
||||
nmap ga <Plug>(EasyAlign)
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
plugin = vim-fish;
|
||||
}
|
||||
|
||||
vim-nix
|
||||
|
||||
{
|
||||
plugin = vim-pandoc;
|
||||
config = ''
|
||||
let g:pandoc#modules#disabled = ["completion", "command", "menu"]
|
||||
'';
|
||||
}
|
||||
|
||||
vim-pandoc-syntax
|
||||
vim-repeat
|
||||
|
||||
{
|
||||
plugin = vim-slime;
|
||||
config = ''
|
||||
let g:slime_target = "tmux"
|
||||
let g:slime_default_config = {"socket_name": get(split($TMUX, ","), 0), "target_pane": ":.1"}
|
||||
let g:slime_no_mappings = 1
|
||||
let g:slime_dont_ask_default = 1
|
||||
xmap s <plug>SlimeRegionSend
|
||||
nmap s <plug>SlimeMotionSend
|
||||
nmap ss <plug>SlimeLineSend
|
||||
nnoremap s: :SlimeSend1
|
||||
'';
|
||||
}
|
||||
|
||||
vim-snippets
|
||||
vim-speeddating
|
||||
vim-surround
|
||||
|
||||
{
|
||||
plugin = vim-unimpaired;
|
||||
config = ''
|
||||
nnoremap =p <Nop>
|
||||
nnoremap =P <Nop>
|
||||
nnoremap =s <Nop>
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
plugin = vimwiki;
|
||||
config = ''
|
||||
let g:vimwiki_list = [ { 'path': '~/notes/', 'syntax': 'markdown', 'ext': '.md' } ]
|
||||
nnoremap <Leader>wt <Nop>
|
||||
nnoremap <Leader>w<Leader>t <Nop>
|
||||
nmap <C-j> <Plug>VimwikiNextLink
|
||||
nmap <C-k> <Plug>VimwikiPrevLink
|
||||
let g:vimwiki_key_mappings = { 'headers': 0, 'text_objs': 0, 'lists': 0, 'lists_return': 0, 'html': 0 }
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
xdg.configFile."nvim" = {
|
||||
source = ./dotfiles;
|
||||
recursive = true;
|
||||
};
|
||||
|
||||
home.shellAliases.v = "nvim";
|
||||
}
|
||||
1
home/modules/nvim/dotfiles/after/ftplugin/markdown.vim
Normal file
1
home/modules/nvim/dotfiles/after/ftplugin/markdown.vim
Normal file
|
|
@ -0,0 +1 @@
|
|||
setlocal shiftwidth=2
|
||||
11
home/modules/nvim/dotfiles/autocommands.vim
Normal file
11
home/modules/nvim/dotfiles/autocommands.vim
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
augroup markdown
|
||||
autocmd!
|
||||
autocmd BufNewFile,BufRead *.Rmd,*.rmd set ft=rmd
|
||||
autocmd BufNewFile,BufRead *.md,*.markdown set ft=markdown
|
||||
autocmd BufNewFile,BufRead *.md,*.markdown set syntax=rmd
|
||||
augroup end
|
||||
|
||||
augroup netrw
|
||||
autocmd!
|
||||
autocmd FileType netrw setl bufhidden=wipe
|
||||
augroup end
|
||||
42
home/modules/nvim/dotfiles/ftplugin/markdown.vim
Normal file
42
home/modules/nvim/dotfiles/ftplugin/markdown.vim
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
setlocal spell
|
||||
setlocal textwidth=0
|
||||
setlocal syntax=rmd
|
||||
setlocal breakat-=@
|
||||
|
||||
setlocal makeprg=Rscript\ -e\ 'publishR::render(\\"%\\")'
|
||||
|
||||
nnoremap <localleader>oh :! xdg-open %:r.html<cr>
|
||||
nnoremap <localleader>op :! xdg-open %:r.pdf<cr>
|
||||
nnoremap <localleader>ow :! xdg-open %:r.docx<cr>
|
||||
|
||||
nnoremap <leader>t :TOC<cr>
|
||||
|
||||
xnoremap <silent> ic :<c-u>call InnerChunk()<cr>
|
||||
onoremap <silent> ic :<c-u>call InnerChunk()<cr>
|
||||
xnoremap <silent> ac :<c-u>call OuterChunk()<cr>
|
||||
onoremap <silent> ac :<c-u>call OuterChunk()<cr>
|
||||
|
||||
function OuterChunk()
|
||||
let chunk = FindChunk()
|
||||
execute "normal! " . chunk.start . "GV" . chunk.end . "G"
|
||||
endfunction
|
||||
|
||||
function InnerChunk()
|
||||
let chunk = FindChunk()
|
||||
execute "normal! " . chunk.start . "GjV" . chunk.end . "Gk"
|
||||
endfunction
|
||||
|
||||
function FindChunk()
|
||||
let view = winsaveview()
|
||||
normal! j
|
||||
?\v^ *```(\{.*\})=$
|
||||
let startFence = line(".")
|
||||
/\v^ *``` *
|
||||
let endFence = line(".")
|
||||
if startFence <= view.lnum && endFence >= view.lnum
|
||||
return {"start": startFence, "end": endFence}
|
||||
else
|
||||
echoerr "Not inside a chunk"
|
||||
endif
|
||||
call winrestview(view)
|
||||
endfunction
|
||||
1
home/modules/nvim/dotfiles/ftplugin/nix.vim
Normal file
1
home/modules/nvim/dotfiles/ftplugin/nix.vim
Normal file
|
|
@ -0,0 +1 @@
|
|||
setlocal makeprg=nixos-rebuild\ dry-build
|
||||
6
home/modules/nvim/dotfiles/ftplugin/r.vim
Normal file
6
home/modules/nvim/dotfiles/ftplugin/r.vim
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
nnoremap <localleader>i :! R CMD INSTALL `git rev-parse --show-toplevel`<cr>
|
||||
nnoremap <localleader>d :! R -e "devtools::document()"<cr>
|
||||
nnoremap <localleader>t :! R -e "devtools::test()"<cr>
|
||||
|
||||
" nnoremap <localleader>rl :vsplit \| :terminal R<cr><c-w><c-w>
|
||||
nnoremap <localleader>rl :silent exec "! tmux source-file ~/.config/tmux/rloft.conf"<cr>
|
||||
43
home/modules/nvim/dotfiles/ftplugin/rmd.vim
Normal file
43
home/modules/nvim/dotfiles/ftplugin/rmd.vim
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
runtime ftplugin/markdown.vim
|
||||
runtime ftplugin/r.vim
|
||||
|
||||
" let g:slime_cell_delimiter = "```"
|
||||
nmap <silent> snc <plug>SlimeMotionSendic/```{<cr>:noh<cr>j
|
||||
|
||||
nmap <silent> <localleader>pd :execute 'SlimeSend1 datapasta::tribble_construct() \|> clipr::write_clip()'<cr>:sleep500ms<cr>"*p
|
||||
nmap <silent> <localleader>pv :execute 'SlimeSend1 datapasta::vector_construct() \|> clipr::write_clip()'<cr>:sleep500ms<cr>"*p
|
||||
|
||||
nmap sc :set opfunc=SendAndPaste<CR>g@
|
||||
nmap sc<cr> ^:set opfunc=SendAndPaste<CR>g@$
|
||||
vmap sc :<C-U>call SendAndPaste(visualmode(), 1)<CR>
|
||||
|
||||
function! SendAndPaste(type, ...)
|
||||
|
||||
let v = winsaveview()
|
||||
let sel_save = &selection
|
||||
let &selection = "inclusive"
|
||||
let reg_save = @@
|
||||
|
||||
if a:0 " Invoked from Visual mode, use gv command.
|
||||
silent exe "normal! gvy"
|
||||
elseif a:type == 'line'
|
||||
silent exe "normal! '[V']y"
|
||||
else
|
||||
silent exe "normal! `[v`]y"
|
||||
endif
|
||||
|
||||
call slime#send(trim(@@) . " |> capture.output() |> clipr::write_clip()\r")
|
||||
|
||||
/```
|
||||
call append(line("."), ["", "```{r}", "```"])
|
||||
/```{r}
|
||||
sleep 500m
|
||||
let @*=substitute(@*, '\e\[[0-9;]*m', '', 'g')
|
||||
:put*
|
||||
call winrestview(v)
|
||||
let &selection = sel_save
|
||||
let @@ = reg_save
|
||||
endfunction
|
||||
|
||||
|
||||
:UltiSnipsAddFiletypes rmd.r.markdown
|
||||
2
home/modules/nvim/dotfiles/ftplugin/tex.vim
Normal file
2
home/modules/nvim/dotfiles/ftplugin/tex.vim
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
setlocal makeprg=xelatex\ %
|
||||
nnoremap <localleader>op :! xdg-open %:r.pdf<cr>
|
||||
1
home/modules/nvim/dotfiles/ftplugin/typescript.vim
Normal file
1
home/modules/nvim/dotfiles/ftplugin/typescript.vim
Normal file
|
|
@ -0,0 +1 @@
|
|||
setlocal makeprg=tsx\ %
|
||||
4
home/modules/nvim/dotfiles/syntax/rmd.vim
Normal file
4
home/modules/nvim/dotfiles/syntax/rmd.vim
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
syn region math start=/\$\$/ end=/\$\$/
|
||||
syn match math_block '\$[^$].\{-}\$'
|
||||
hi link math Statement
|
||||
hi link math_block Statement
|
||||
6
home/modules/nvim/lsp.lua
Normal file
6
home/modules/nvim/lsp.lua
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
vim.lsp.enable('astro')
|
||||
vim.lsp.enable('marksman')
|
||||
vim.lsp.enable('nil_ls')
|
||||
vim.lsp.enable('r_language_server')
|
||||
vim.lsp.enable('texlab')
|
||||
vim.lsp.enable('ts_ls')
|
||||
54
home/modules/nvim/nvim-cmp.lua
Normal file
54
home/modules/nvim/nvim-cmp.lua
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
local cmp = require'cmp'
|
||||
|
||||
cmp.setup({
|
||||
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users.
|
||||
end,
|
||||
},
|
||||
|
||||
mapping = cmp.mapping.preset.insert(
|
||||
{
|
||||
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
['<C-e>'] = cmp.mapping.abort(),
|
||||
['<Tab>'] = cmp.mapping.confirm({ select = false }),
|
||||
}
|
||||
),
|
||||
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'cmp_pandoc' },
|
||||
{ name = 'emoji' },
|
||||
{ name = 'fish' },
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'path' },
|
||||
{ name = 'ultisnips' },
|
||||
}, {
|
||||
{ name = 'buffer' },
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
-- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore).
|
||||
cmp.setup.cmdline({ '/', '?' }, {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = {
|
||||
{ name = 'buffer' }
|
||||
}
|
||||
})
|
||||
|
||||
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
|
||||
cmp.setup.cmdline(':', {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'path' }
|
||||
}, {
|
||||
{ name = 'cmdline' }
|
||||
}),
|
||||
matching = { disallow_symbol_nonprefix_matching = false }
|
||||
})
|
||||
|
||||
-- Set up lspconfig.
|
||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
32
home/modules/office-cli.nix
Normal file
32
home/modules/office-cli.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./khard-dump.nix
|
||||
./tasks.nix
|
||||
./calendars.nix
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
bat
|
||||
ghostscript
|
||||
hunspell
|
||||
hunspellDicts.de_DE
|
||||
hunspellDicts.en_US
|
||||
hunspellDicts.th_TH
|
||||
hyphen
|
||||
hyphenDicts.de_DE
|
||||
hyphenDicts.en_US
|
||||
imagemagick
|
||||
khal
|
||||
khard
|
||||
msmtp
|
||||
notmuch
|
||||
openssl
|
||||
pandoc
|
||||
pdftk
|
||||
ripmime
|
||||
urlscan
|
||||
w3m
|
||||
];
|
||||
}
|
||||
21
home/modules/office-gui.nix
Normal file
21
home/modules/office-gui.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
chromium
|
||||
eduvpn-client
|
||||
gimp
|
||||
gnome-solanum
|
||||
inkscape
|
||||
libreoffice
|
||||
lorem
|
||||
nyxt
|
||||
pdfpc
|
||||
poppler-utils
|
||||
typst
|
||||
xournalpp
|
||||
zotero
|
||||
];
|
||||
|
||||
programs.obs-studio.enable = true;
|
||||
}
|
||||
29
home/modules/password-store.nix
Normal file
29
home/modules/password-store.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.password-store = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PASSWORD_STORE_DIR = "${config.xdg.dataHome}/crypto/password-store";
|
||||
};
|
||||
};
|
||||
|
||||
programs.firefox.nativeMessagingHosts = [
|
||||
pkgs.passff-host
|
||||
];
|
||||
|
||||
services.gnome-keyring.enable = false;
|
||||
|
||||
services.pass-secret-service = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
xdg.configFile."scdaemon" = {
|
||||
text = ''
|
||||
disable-ccid
|
||||
pcsc-shared
|
||||
'';
|
||||
target = "../.gnupg/scdaemon.conf";
|
||||
};
|
||||
|
||||
}
|
||||
5
home/modules/plasma.nix
Normal file
5
home/modules/plasma.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
services.kdeconnect.enable = true;
|
||||
}
|
||||
60
home/modules/r.nix
Normal file
60
home/modules/r.nix
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
customPackages = with pkgs.rPackages; [
|
||||
catmaply
|
||||
clipr
|
||||
DAAG
|
||||
devtools
|
||||
dplyr
|
||||
eurostat
|
||||
extrafont
|
||||
ggplot2
|
||||
ggridges
|
||||
jsonlite
|
||||
kableExtra
|
||||
knitr
|
||||
languageserver
|
||||
magrittr
|
||||
mapproj
|
||||
openxlsx
|
||||
osmdata
|
||||
plotly
|
||||
progress
|
||||
purrr
|
||||
qrcode
|
||||
RColorBrewer
|
||||
readODS
|
||||
revealjs
|
||||
rlist
|
||||
rmarkdown
|
||||
rnaturalearth
|
||||
rnaturalearthdata
|
||||
roxygen2
|
||||
rvest
|
||||
sf
|
||||
stringr
|
||||
testthat
|
||||
tidyr
|
||||
tidyverse
|
||||
tmap
|
||||
xlsx
|
||||
yaml
|
||||
];
|
||||
|
||||
R-packed = pkgs.rWrapper.override { packages = customPackages; };
|
||||
RStudio-packed = pkgs.rstudioWrapper.override { packages = customPackages; };
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
R-packed
|
||||
RStudio-packed
|
||||
];
|
||||
|
||||
home.shellAliases = {
|
||||
r = "R --no-save --no-restore";
|
||||
R = "R --no-save --no-restore";
|
||||
};
|
||||
}
|
||||
22
home/modules/tasks.nix
Normal file
22
home/modules/tasks.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
taskopen
|
||||
];
|
||||
|
||||
programs.taskwarrior = {
|
||||
enable = true;
|
||||
package = pkgs.taskwarrior3;
|
||||
dataLocation = "${config.xdg.dataHome}/taskwarrior/tasks";
|
||||
colorTheme = "light-256";
|
||||
config = {
|
||||
report.list.columns = ["id" "depends.indicator" "priority" "project" "recur.indicator" "scheduled.countdown" "due" "until.age" "status.short" "description.count" "tags"];
|
||||
report.list.labels= ["ID" "D" "Prio" "Proj" "R" "Scheduled" "Due" "Until" "S" "Description" "Tags"];
|
||||
};
|
||||
extraConfig = "
|
||||
hooks.location=${config.xdg.dataHome}/taskwarrior/hooks
|
||||
verbose=affected,context,edit,label,header,new-id,project,special,sync,recur
|
||||
";
|
||||
};
|
||||
}
|
||||
69
home/modules/tex.nix
Normal file
69
home/modules/tex.nix
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
tex = (pkgs.texlive.combine {
|
||||
inherit (pkgs.texlive)
|
||||
adjustbox
|
||||
arydshln
|
||||
bbding
|
||||
blindtext
|
||||
changepage
|
||||
csquotes
|
||||
currfile
|
||||
dashrule
|
||||
enotez
|
||||
enumitem
|
||||
environ
|
||||
footmisc
|
||||
framed
|
||||
gensymb
|
||||
graphbox
|
||||
hanging
|
||||
idxlayout
|
||||
ifmtarg
|
||||
imakeidx
|
||||
lastpage
|
||||
lipsum
|
||||
ltablex
|
||||
ly1
|
||||
makecell
|
||||
multirow
|
||||
needspace
|
||||
nowidow
|
||||
pdfcol
|
||||
pdfpages
|
||||
pdfx
|
||||
pgf
|
||||
qrcode
|
||||
scheme-medium
|
||||
sourcesanspro
|
||||
stringstrings
|
||||
svg
|
||||
tabu
|
||||
tabulary
|
||||
tcolorbox
|
||||
threeparttable
|
||||
threeparttablex
|
||||
tikzfill
|
||||
titlesec
|
||||
titling
|
||||
tocloft
|
||||
translations
|
||||
transparent
|
||||
was
|
||||
wrapfig
|
||||
xmpincl
|
||||
xpatch
|
||||
xstring
|
||||
xtab
|
||||
xurl
|
||||
zref
|
||||
;
|
||||
});
|
||||
in
|
||||
{ # home-manager
|
||||
home.packages = with pkgs; [
|
||||
texlab
|
||||
tex
|
||||
];
|
||||
}
|
||||
61
home/modules/tmux.nix
Normal file
61
home/modules/tmux.nix
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
escapeTime = 0;
|
||||
mouse = true;
|
||||
newSession = true;
|
||||
shell = "${pkgs.fish}/bin/fish";
|
||||
extraConfig = ''
|
||||
# Key bindings
|
||||
bind C-l next-window
|
||||
bind C-h previous-window
|
||||
bind C-b last-window
|
||||
bind n new-window
|
||||
bind C-n new-window -c '#{pane_current_path}'
|
||||
bind v split-window -h
|
||||
bind C-v split-window -hc '#{pane_current_path}'
|
||||
bind s split-window -v
|
||||
bind C-s split-window -vc '#{pane_current_path}'
|
||||
bind h select-pane -L
|
||||
bind j select-pane -D
|
||||
bind k select-pane -U
|
||||
bind l select-pane -R
|
||||
bind -r H resize-pane -L 5
|
||||
bind -r J resize-pane -D 5
|
||||
bind -r K resize-pane -U 5
|
||||
bind -r L resize-pane -R 5
|
||||
bind c command-prompt -I "#{b:pane_current_path}" "rename-window '%%'"
|
||||
bind C-c command-prompt -I "#{b:pane_current_path}" "rename-window '%%'"
|
||||
|
||||
# Layouts
|
||||
bind f new-window -c '#{pane_current_path}' vifm
|
||||
bind R source ${ pkgs.writeText "tmux-rloft" ''
|
||||
split-window -c '#{pane_current_path}' -h R -q --no-save --no-restore;
|
||||
select-pane -l
|
||||
''}
|
||||
|
||||
# Unbind
|
||||
unbind p
|
||||
unbind '"'
|
||||
unbind %
|
||||
|
||||
# Eye candy
|
||||
set-option -g status-right ""
|
||||
set-option -g status-left ""
|
||||
set-option -g status-justify "centre"
|
||||
set-option -g status-style fg=magenta
|
||||
set-option -g pane-border-style fg=brightwhite
|
||||
set-option -g pane-active-border-style fg=magenta
|
||||
set-option -g window-status-current-style bg=brightwhite
|
||||
|
||||
# Some more specifics
|
||||
set-option -g focus-events on
|
||||
set -g base-index 1
|
||||
setw -g pane-base-index 1
|
||||
set -g default-terminal "tmux-256color"
|
||||
set -as terminal-features ",xterm-256color:RGB"
|
||||
'';
|
||||
};
|
||||
}
|
||||
17
home/modules/user-dirs.nix
Normal file
17
home/modules/user-dirs.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
xdg.userDirs = {
|
||||
enable = true;
|
||||
createDirectories = true;
|
||||
desktop = "${config.home.homeDirectory}/desktop";
|
||||
documents = "${config.home.homeDirectory}/misc";
|
||||
download = "${config.home.homeDirectory}/tmp";
|
||||
music = "${config.home.homeDirectory}/media/music";
|
||||
pictures = "${config.home.homeDirectory}/media/img";
|
||||
publicShare = "${config.home.homeDirectory}/box";
|
||||
templates = "${config.xdg.dataHome}/templates";
|
||||
videos = "${config.home.homeDirectory}/media/vid";
|
||||
};
|
||||
|
||||
}
|
||||
30
home/modules/vifm.nix
Normal file
30
home/modules/vifm.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.vifm = {
|
||||
enable = true;
|
||||
extraConfig = "
|
||||
colorscheme light
|
||||
set vicmd=nvim
|
||||
filetype * xdg-open
|
||||
";
|
||||
};
|
||||
xdg.configFile."vifm/colors/light.vifm".text = ''
|
||||
highlight clear
|
||||
highlight Win cterm=none ctermfg=black ctermbg=default
|
||||
highlight Directory cterm=none ctermfg=cyan ctermbg=default
|
||||
highlight Link cterm=none ctermfg=yellow ctermbg=default
|
||||
highlight BrokenLink cterm=none ctermfg=white ctermbg=red
|
||||
highlight Socket cterm=none ctermfg=red ctermbg=default
|
||||
highlight Device cterm=none ctermfg=red ctermbg=default
|
||||
highlight Fifo cterm=none ctermfg=black ctermbg=cyan
|
||||
highlight Executable cterm=none ctermfg=green ctermbg=default
|
||||
highlight Selected cterm=bold ctermfg=magenta ctermbg=default
|
||||
highlight CurrLine cterm=bold ctermfg=white ctermbg=magenta
|
||||
highlight TopLine cterm=bold ctermfg=magenta ctermbg=default
|
||||
highlight TopLineSel cterm=bold ctermfg=magenta ctermbg=white
|
||||
highlight StatusLine cterm=bold ctermfg=magenta ctermbg=white
|
||||
highlight CmdLine cterm=bold ctermfg=magenta ctermbg=default
|
||||
highlight Border cterm=none ctermfg=default ctermbg=default
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue