diff --git a/flake.lock b/flake.lock index 4354c7b..97c4a34 100644 --- a/flake.lock +++ b/flake.lock @@ -8,11 +8,11 @@ }, "locked": { "dir": "pkgs/firefox-addons", - "lastModified": 1772596991, - "narHash": "sha256-awJJ4ATy9t8Svrx2z0zAftgXnUaGCFb2Ty0u036CnCQ=", + "lastModified": 1769054619, + "narHash": "sha256-LCc0gbSgjehdy41Gi1H5WNxEuW9PtRHFVaPXoFzslQU=", "owner": "rycee", "repo": "nur-expressions", - "rev": "cd2d0893966c0a5c27345a9a72d0418b42b7e36d", + "rev": "6509620630f68dc02ac3e99f15a67760778444ff", "type": "gitlab" }, "original": { @@ -29,11 +29,11 @@ ] }, "locked": { - "lastModified": 1772633058, - "narHash": "sha256-SO7JapRy2HPhgmqiLbfnW1kMx5rakPMKZ9z3wtRLQjI=", + "lastModified": 1767910483, + "narHash": "sha256-MOU5YdVu4DVwuT5ztXgQpPuRRBjSjUGIdUzOQr9iQOY=", "owner": "nix-community", "repo": "home-manager", - "rev": "080657a04188aca25f8a6c70a0fb2ea7e37f1865", + "rev": "82fb7dedaad83e5e279127a38ef410bcfac6d77c", "type": "github" }, "original": { @@ -45,11 +45,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1772598333, - "narHash": "sha256-YaHht/C35INEX3DeJQNWjNaTcPjYmBwwjFJ2jdtr+5U=", + "lastModified": 1768028080, + "narHash": "sha256-50aDK+8eLvsLK39TzQhKNq50/HcXyP4hyxOYoPoVxjo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "fabb8c9deee281e50b1065002c9828f2cf7b2239", + "rev": "d03088749a110d52a4739348f39a63f84bb0be14", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 581d289..5170f3d 100644 --- a/flake.nix +++ b/flake.nix @@ -25,31 +25,12 @@ specialArgs = { inherit inputs; }; modules = [ ./hosts/arielle - home-manager.nixosModules.home-manager { - home-manager = { - extraSpecialArgs = { inherit inputs; }; - useGlobalPkgs = true; - useUserPackages = true; - users = { - - till = { - imports = [ - ./home/minimal.nix - ./users/till/home.nix - ]; - }; - - }; - }; - } ]; }; homer = nixpkgs.lib.nixosSystem { specialArgs = { inherit inputs; }; - modules = [ - ./hosts/homer - ]; + modules = [ ./hosts/homer ]; }; mila = nixpkgs.lib.nixosSystem { @@ -62,7 +43,9 @@ nova = nixpkgs.lib.nixosSystem { specialArgs = { inherit inputs; }; modules = [ + ./hosts/nova + home-manager.nixosModules.home-manager { home-manager = { extraSpecialArgs = { inherit inputs; }; @@ -72,34 +55,29 @@ till = { imports = [ - ./home/profiles/desktop-full.nix + ./home/desktop-full.nix ./users/till/home.nix ]; }; alt = { imports = [ - ./home/profiles/desktop-slim.nix + ./home/desktop-slim.nix ./users/alt/home.nix ]; }; guest = { imports = [ - ./home/profiles/desktop-slim.nix + ./home/desktop-slim.nix ./users/guest/home.nix ]; }; }; }; } + { - - # firefox-addons.config.allowUnfreePredicate = pkg: - # builtins.elem (nixpkgs.lib.getName pkg) [ - # "tampermonkey" - # ]; - nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (nixpkgs.lib.getName pkg) [ "corefonts" @@ -107,7 +85,6 @@ "keymapp" "steam" "steam-unwrapped" - # "tampermonkey" ]; } ]; diff --git a/home/aichat.nix b/home/aichat.nix index cdbc120..e2a927a 100644 --- a/home/aichat.nix +++ b/home/aichat.nix @@ -5,10 +5,4 @@ aichat glow ]; - - programs.fish.shellAliases = { - vibe = "aichat -c"; - clank = "aichat -e"; - slop = "aichat"; - }; } diff --git a/home/calendars.nix b/home/calendars.nix index da4c27e..e645f50 100644 --- a/home/calendars.nix +++ b/home/calendars.nix @@ -3,7 +3,7 @@ let myRemote = slug: { - passwordCommand = [ "pass" "accounts/ktiu-radicale" ]; + passwordCommand = [ "pass" "ktiu/radicale" ]; userName = "ktiu"; type = "caldav"; url = "https://kalender.ktiu.net/ktiu/${slug}"; @@ -127,7 +127,7 @@ in remote = { type = "caldav"; url = "https://cloud.gridisnotajournal.de/remote.php/dav/calendars/till/grid/"; - passwordCommand = [ "pass" "uni/grid-caldav-nextcloud" ]; + passwordCommand = [ "pass" "grid/nextcloud" ]; userName = "till"; }; }; diff --git a/home/castget/castget.conf b/home/castget/castget.conf new file mode 100644 index 0000000..cd4f148 --- /dev/null +++ b/home/castget/castget.conf @@ -0,0 +1,53 @@ +# vim: set ft=conf + +[2.5admins] +url=https://2.5admins.com/feed/podcast + +[50plus2] +url=https://50plus2.podigee.io/feed/mp3 +album_tag=50+2 + +[drei90] +url=http://feeds.feedburner.com/Drei90 +album_tag=drei90 + +[efpodcast] +url=https://www.eintracht-podcast.de/feed/mp3 + +[latenightlinux] +url=https://latenightlinux.com/feed/mp3 + +[linuxafterdark] +url=https://linuxafterdark.net/feed/podcast + +[linuxdevtime] +url=https://latenightlinux.com/feed/extra + +[linuxmatters] +url=https://linuxmatters.sh/episode/index.xml + +[logbuchnetzpolitik] +url=https://feeds.metaebene.me/lnp/mp3 +album_tag=Logbuch Netzpolitik + +[schlusskonferenz] +url=https://schlusskonferenz.podigee.io/feed/mp3 + +[tribünengespräch] +url=https://tribuenengespraech.podigee.io/feed/mp3 + +[wettbrötchen] +url=https://www.wett-broetchen.de/feed/mp3 +album_tag=Wettbrötchen + +[edeltalk] +url=https://cdn.julephosting.de/podcasts/573-edeltalk-mit-dominik-kevin/feed.rss +album_tag=Edeltalk + +[youredeadtome] +url=https://podcasts.files.bbci.co.uk/p07mdbhg.rss + +[*] +genre_tag=Podcast +spool=/home/till/.local/share/podcasts +filename=%(channel_title)_%(date)_%(title).mp3 diff --git a/home/desktop-full.nix b/home/desktop-full.nix new file mode 100644 index 0000000..ea29f46 --- /dev/null +++ b/home/desktop-full.nix @@ -0,0 +1,15 @@ +{ pkgs, ... }: + +{ + imports = [ + ./desktop-slim.nix + + ./messaging.nix + ./r.nix + ./tex.nix + ./mail + ./office-gui.nix + ./office-cli.nix + ./aichat.nix + ]; +} diff --git a/home/profiles/desktop-slim.nix b/home/desktop-slim.nix similarity index 52% rename from home/profiles/desktop-slim.nix rename to home/desktop-slim.nix index c2936c4..9add985 100644 --- a/home/profiles/desktop-slim.nix +++ b/home/desktop-slim.nix @@ -1,17 +1,16 @@ -{ pkgs, ... }: +{ config, pkgs, inputs, lib, ... }: { imports = [ ./minimal.nix - ../devel.nix - ../firefox.nix - ../fonts.nix - # ../foot.nix - ../media.nix - ../user-dirs.nix - ../gpg.nix - ../password-store.nix + ./devel.nix + ./firefox.nix + ./fonts.nix + ./foot.nix + ./gnome + ./media.nix + ./user-dirs.nix ]; home.packages = with pkgs; [ @@ -26,5 +25,8 @@ zathura ]; + xdg.configFile."castget/castget.conf".source = ./castget/castget.conf; + services.syncthing.enable = true; + } diff --git a/home/devel.nix b/home/devel.nix index 27817b2..ba0cdca 100644 --- a/home/devel.nix +++ b/home/devel.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ config, pkgs, inputs, lib, ... }: { home.file.".npmrc".text = '' @@ -6,8 +6,12 @@ ''; home.packages = with pkgs; [ + bundler + bundix nodejs + yarn-berry + duckdb + tippecanoe + pmtiles ]; - - programs.direnv.enable = true; } diff --git a/home/firefox.nix b/home/firefox.nix index 43418ef..9d79fe2 100644 --- a/home/firefox.nix +++ b/home/firefox.nix @@ -1,6 +1,7 @@ { config, pkgs, inputs, osConfig, ... }: { + programs.firefox = { enable = true; policies = { @@ -148,7 +149,6 @@ user_pref("signon.rememberSignons", false); user_pref("toolkit.telemetry.enabled", false); user_pref("toolkit.telemetry.server", ""); - user_pref("widget.gtk.libadwaita-colors.enabled", false); ''; }; }; diff --git a/home/fish.nix b/home/fish.nix index 16997a5..6570f73 100644 --- a/home/fish.nix +++ b/home/fish.nix @@ -1,6 +1,7 @@ { config, ... }: { + home.shellAliases = { top = "btm --battery"; du = "dust"; @@ -12,6 +13,7 @@ }; programs.fish = { + enable = true; interactiveShellInit = "fish_add_path ${config.xdg.dataHome}/npm/packages/bin"; @@ -51,10 +53,6 @@ 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" diff --git a/home/foot.nix b/home/foot.nix index 10dc8aa..a0fadb4 100644 --- a/home/foot.nix +++ b/home/foot.nix @@ -8,13 +8,13 @@ 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"; + # font = "JetBrains Mono:size=16"; + 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"; diff --git a/home/gnome.nix b/home/gnome/default.nix similarity index 92% rename from home/gnome.nix rename to home/gnome/default.nix index b7b8c4b..4103a84 100644 --- a/home/gnome.nix +++ b/home/gnome/default.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ config, pkgs, ... }: { home.pointerCursor = { @@ -35,6 +35,7 @@ gtk-theme = "Adwaita"; }; "org/gnome/desktop/background" = { + picture-uri = "file://" + ./wallpaper_nix_paper_gray.svg; picture-options = "zoom"; }; "org/gnome/desktop/wm/keybindings" = { @@ -103,12 +104,5 @@ sleep-inactive-battery-timeout = 1200; }; }; - - xdg.configFile."run-or-raise/shortcuts.conf".text = '' - b,firefox,, - f,nautilus,, - g:always-run,tmux new-window -n vifm vifm ~/desktop,foot, - return,foot,, - p,keepassxc,,, - ''; + xdg.configFile."run-or-raise/shortcuts.conf".source = ./run-or-raise.conf; } diff --git a/home/gnome/run-or-raise.conf b/home/gnome/run-or-raise.conf new file mode 100644 index 0000000..b4bc39d --- /dev/null +++ b/home/gnome/run-or-raise.conf @@ -0,0 +1,25 @@ +b,firefox,, +f,nautilus,, +g:always-run,tmux new-window -n vifm vifm ~/desktop,foot, +return,foot,, +p,keepassxc,,, + +# You may use regular expression in title or wm_class. +# Just put the regular expression between slashes. +# E.g. to jump to pidgin conversation window you may use this line +# (that means any windows of wm_class Pidgin, not containing the title Buddy List)" +# KP_1,pidgin,Pidgin,/^((?!Buddy List).)*$/ + +# Have the mail always at numpad-click. +# KP_2,chromium-browser --app=https://mail.google.com/mail/u/0/#inbox + +# ============= +# Run only form +# ============= +# +# This line will launch notify-send command. +# h,notify-send Hello world + +# Blank lines are allowed. Line starting with "#" means a comment. +# Now delete these shortcuts and put here yours. +# How to know wm_class? Alt+f2, lg, "windows" tab (at least on Ubuntu 17.10) diff --git a/home/gnome/wallpaper_nix_paper_gray.svg b/home/gnome/wallpaper_nix_paper_gray.svg new file mode 100644 index 0000000..f729f2d --- /dev/null +++ b/home/gnome/wallpaper_nix_paper_gray.svg @@ -0,0 +1,128 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + diff --git a/home/gpg.nix b/home/gpg.nix index 43886ae..554398a 100644 --- a/home/gpg.nix +++ b/home/gpg.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ config, pkgs, ... }: { @@ -6,17 +6,16 @@ pinentry-all ]; -# moved to system - -# services.gpg-agent = { -# enable = true; -# pinentry.package = pkgs.pinentry-all; -# pinentry.program = "pinentry"; -# # enableSshSupport = true; -# }; + services.gpg-agent = { + enable = true; + pinentry.package = pkgs.pinentry-gnome3; + pinentry.program = "pinentry-gnome3"; + enableSshSupport = true; + }; programs.gpg = { enable = true; + # homedir = "${config.xdg.dataHome}/gnupg"; settings = { no-emit-version = true; no-comments = true; diff --git a/home/hyprland.nix b/home/hyprland.nix deleted file mode 100644 index 005d6a6..0000000 --- a/home/hyprland.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ ... }: - -{ - wayland.windowManager.hyprland = { - systemd.enable = false; - }; -} diff --git a/home/mail/bindings.neomuttrc b/home/mail/bindings.neomuttrc index 833af0d..92a2f00 100644 --- a/home/mail/bindings.neomuttrc +++ b/home/mail/bindings.neomuttrc @@ -1,16 +1,85 @@ +# Navigation +bind pager k previous-entry +bind pager j next-entry +# bind index,pager \Cu half-up +# bind index,pager \Cd half-down +# bind pager gg top +# bind index gg first-entry +# bind pager G bottom +# bind index G last-entry +# bind index,pager N search-opposite +bind index display-message +bind index collapse-thread +bind index,pager gf change-folder + +# Read HTML +bind index,pager V noop +macro index,pager V "html" # compose +bind compose p postpone-message +bind compose P pgp-menu +# macro compose I "`tmpfile=$(mktemp -u --suffix .png -t XXXXXXXXXXXX -p ~/tmp) && wl-paste -t image/png > "$tmpfile" && echo "$tmpfile"`" "attach image from clipboard" -macro index,pager go "mbsync $my_account && notmuch new" "Sync this account" -macro index,pager gO "mbsync -a && notmuch new" "Sync all accounts" +bind editor complete-query +bind editor ^T complete +bind index,pager a group-reply +bind index,pager m noop +macro index,pager mar "newn*" "Mark all read" -bind index,pager / noop -macro index,pager // "folder:/$my_account/" "Find in account" -macro index,pager g/ "" "Find in all accounts" -macro index,pager /! "folder:+$my_account/$my_nm_spoolfile" "Find in inbox" -macro index,pager /< "folder:+$my_account/$my_nm_record" "Find in sent" -macro index,pager /> "folder:+$my_account/$my_nm_mbox" "Find in archive" -macro index,pager /d "folder:+$my_account/$my_nm_postponed" "Find in drafts" -macro index,pager /t "folder:+$my_account/$my_nm_trash" "Find in trash" -macro index,pager /j "folder:+$my_account/$my_nm_junk" "Find in junk" +# compose with signature management +macro index,pager @ "set signature=$my_signature" "Compose to sender" +macro index,pager c "set signature=$my_signature" "Compose new message" +macro index,pager r "unset signature" "Reply to message" +macro index,pager a "unset signature" "Reply all" +macro index,pager f "unset signature" "Forward message" +# moving messages +macro index,pager J ":set resolve=no\nn:set resolve=yes\n$my_junk" \ + "Move to junk folder" +macro index,pager y ":set resolve=no\nn:set resolve=yes\n$mbox" \ + "Move message to the archive" +macro index,pager I "$spoolfile" "Move message to the inbox" + +# switch folders +macro index,pager g! "$spoolfile" "Go to inbox" +macro index,pager gd "$postponed" "Go to drafts" +macro index,pager g< "$record" "Go to sent" +macro index,pager ga "$mbox" "Go to archive" +macro index,pager g> "$mbox" "Go to archive" +macro index,pager gt "$trash" "Go to trash" +macro index,pager gj "$my_junk" "Go to junk" + +# accounts +macro index,pager gu "~/.local/share/mail/gu/Inbox" "Go to GU" +# macro index,pager gp "+systemli/IMAP/Inbox" "Go to Systemli" +macro index,pager gm "~/.local/share/mail/t9e/Inbox" "Go to t9e" +# macro index,pager gm "+gmail/IMAP/Inbox" "Go to Gmail" +macro index,pager gk "~/.local/share/mail/ksh/Inbox" "Go to KSH" +macro index,pager gi "~/.local/share/mail/ktiu/Inbox" "Go to ktiu" +# macro index,pager gf "~/.local/share/mail/dkg/Inbox" "Go to DKG" + +macro index,pager L "all\n" "Show all messages (undo limit)" + +# macro index,pager go "mbsync -c ~/.config/mbsync/mbsyncrc $my_mbsync_acct && notmuch new &" \ +# "Run mbsync to sync mail for this account" + +macro index,pager go "mbsync $my_mbsync_acct && notmuch new" \ + +macro index,pager g/ "" "find in nm" + +macro index,pager A \ + "khard add-email --vcard-version=4.0" \ + "add the sender email address to khard" + +macro index,pager S \ + " ripmime -i - -d ~/tmp && rm ~/tmp/textfile*" \ + "save all non-text attachments using ripmime" + +macro index,pager gb \ + " urlscan" \ + "extract URLs out of a message" + +macro index,pager gO \ + "mbsync -a && notmuch new" \ + "run mbsync to sync all mail" diff --git a/home/mail/config.neomuttrc b/home/mail/config.neomuttrc index da13972..870ebec 100644 --- a/home/mail/config.neomuttrc +++ b/home/mail/config.neomuttrc @@ -1,26 +1,89 @@ -# Alias - set alias_file = ~/.local/share/neomutt/aliases.neomuttrc source $alias_file -# External +set mailcap_path = ~/.config/neomutt/mailcap + +# source ./smime.neomuttrc set my_download_folder = ~/tmp -# Status bar +# Caching and tmp +set header_cache = $XDG_CACHE_HOME/neomutt/headers +set message_cachedir = $XDG_CACHE_HOME/neomutt/bodies +set header_cache_backend = "lmdb" +set tmpdir = $XDG_CACHE_HOME/neomutt/tmp +# Basic options +unset wait_key +set mbox_type = Maildir +# set delete +set mail_check_stats +unset confirm_append +unset beep +unset mark_old +set sleep_time = 0 +# set shell = /bin/bash + +# Sending +set use_envelope_from +unset reverse_realname + +# Searching +set nm_default_url = "notmuch:///home/till/.local/share/mail/" + +# Multi-account setup +# source ~/.config/neomutt/accounts/dkg.neomuttrc +# source ~/.config/neomutt/accounts/gu.neomuttrc +# bind index,pager g noop + +# folder-hook $folder/gu/ source ~/.config/neomutt/accounts/gu.neomuttrc +# folder-hook $folder/systemli/ source ~/.config/neomutt/accounts/systemli.neomuttrc +# folder-hook $folder/ks/ source ~/.config/neomutt/accounts/ks.neomuttrc +# folder-hook $folder/gmail/ source ~/.config/neomutt/accounts/gmail.neomuttrc +# folder-hook $folder/ktiu/ source ~/.config/neomutt/accounts/ktiu.neomuttrc +# folder-hook $folder/dkg/ source ~/.config/neomutt/accounts/dkg.neomuttrc +# folder-hook $folder/papa/ source ~/.config/neomutt/accounts/papa.neomuttrc + +folder-hook . source ~/.config/neomutt/bindings.neomuttrc + +# # Source config +# source ~/.config/neomutt/views.neomuttrc +# source ~/.config/neomutt/sidebar.neomuttrc +# source ~/.config/neomutt/colors.neomuttrc +# source ~/.config/neomutt/smime.neomuttrc +# source ~/.config/neomutt/pgp.neomuttrc + +# Compose +set editor = "nvim -c 'call woof#init#Init()'" +set edit_headers +set forward_format = "Fwd: %s" +set forward_attachments +set fast_reply +set include +set forward_quote +unset recall +set resume_draft_files +set abort_noattach_regex = "(attach|enclosed|anbei|anhängen|angehängt|anhang|anhänge|hängt an)" +set abort_noattach = ask-yes +set mime_type_query_command = "file -b --mime-type %s" +set query_command= "khard email --parsable '%s'" + +# Status bar set status_chars = "✔↻٪A" +set status_format = "— [ %r ] %f (%lB) %>— %m messages%?n? [ %n new ]?%?d? [ %d to delete ]?%?t? [ %t tagged ]? —" 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 +# sorting +set sort = threads +set sort_aux = reverse-last-date-received +# Pager view set pager_index_lines = 10 set pager_context = 3 set pager_stop @@ -36,23 +99,38 @@ alternative_order text/plain text/enriched text/html auto_view text/html # Attachments - set rfc2047_parameters set attach_save_dir = $my_download_folder -# Colors - +## Indicator color indicator brightwhite brightblack + +## Index color index_flags brightmagenta default '.*' color index_date cyan default + +## New mail color index brightblack default '~N' + +## Header colors color header brightblack default ".*" color header brightgreen default "^(Subject)" color header yellow default "^(From|To|CC|BCC)" color header blue default "^Date" + +## Status +# color status yellow default '\[ ↻ \]' +# color status green default '\[ ✔ \]' +# color status magenta default '\[ ٪ \]' +# color status black default '\[ [0-9]+ new \]' +# color status red default '\[ [0-9]+ to delete \]' + +## Mutt color message cyan default color error red default color tilde black default + +## Pager color normal default default color attachment brightblack default color search black yellow @@ -64,6 +142,8 @@ color quoted4 red default color quoted5 brightred default color signature cyan default color underline black default + +## Email 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)" diff --git a/home/mail/default.nix b/home/mail/default.nix index f6dba07..cb69326 100644 --- a/home/mail/default.nix +++ b/home/mail/default.nix @@ -1,81 +1,42 @@ { config, pkgs, lib, ... }: -let - - makeConfig = accountName: - '' - unset reverse_name - unset crypt_auto_pgp - unset crypt_auto_smime - set my_account='${ accountName }' - macro index,pager / "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 ]? —" +{ + programs.msmtp = { + enable = true; + configContent = '' + defaults + logfile ${config.xdg.stateHome}/msmtp/msmtp.log + port 587 ''; - - 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 - ''; + programs.mbsync.enable = true; -in + programs.neomutt = { + enable = true; + vimKeys = true; + extraConfig = builtins.readFile ./config.neomuttrc; + }; -{ - programs.mu.enable = true; + programs.notmuch.enable = true; + + xdg.configFile."neomutt/bindings.neomuttrc".source = ./bindings.neomuttrc; + xdg.configFile."neomutt/smime.neomuttrc".source = ./smime.neomuttrc; + xdg.configFile."neomutt/mailcap".source = ./neomutt_mailcap; accounts.email = { maildirBasePath = "${config.xdg.dataHome}/mail"; accounts = { - gu = { name, ... }: lib.attrsets.recursiveUpdate (makeAccount name) { + + gu = { 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"; + smtp.tls.useStartTls = true; userName = "tstraube"; + notmuch.enable = true; passwordCommand = "pass uni/hrz"; signature = { text = '' @@ -83,190 +44,206 @@ in Dept. of Human Geography Goethe University Frankfurt ''; + showSignature = "append"; }; + mbsync = { + enable = true; + create = "maildir"; + expunge = "both"; + }; + msmtp.enable = true; neomutt = { - extraConfig = makeConfig name + '' - color status blue default - alternates ^tstraube@(em|rz)?.uni-frankfurt.de$ + enable = true; + sendMailCommand = lib.getExe pkgs.msmtp; + extraConfig = '' + set mbox='+Archive' + set my_junk='+Spamverdacht' + set my_mbsync_acct='gu' + set crypt_auto_smime + unset crypt_auto_pgp + + set crypt_autosign + set crypt_replyencrypt + set crypt_replysign + set crypt_replysignencrypted + set crypt_verify_sig + # set smime_default_key = "f1355556.0" + set smime_sign_as = "f1355556.0" + set pgp_default_key = "" + # unset crypt_use_gpgme + + unalternates * + alternates ^straube@em.uni-frankfurt.de$ \ + ^tstraube@em.uni-frankfurt.de$ \ + ^tstraube@rz.uni-frankfurt.de$ \ + ^tstraube@uni-frankfurt.de$ + unset reverse_name + set my_signature = ${ + pkgs.writeText + "signature.txt" + config.accounts.email.accounts.gu.signature.text + } + color status blue default ''; }; }; - t9e = { name, ... }: lib.attrsets.recursiveUpdate (makeAccount name) { + t9e = { address = "till.straube@t9e.me"; realName = "Till Straube"; imap.host = "arielle.ktiu.net"; smtp.host = "arielle.ktiu.net"; + smtp.tls.useStartTls = true; + notmuch.enable = true; userName = "till.straube@t9e.me"; signature.text = '' Till Straube (he/him) PGP key: https://keys.openpgp.org/search?q=till.straube@t9e.me ''; + signature.showSignature = "append"; + gpg = { + key = "5FA6782F543D12ED07110780BA1B73F10BABF8E3"; + signByDefault = true; + }; neomutt = { - extraConfig = makeConfig name + '' - color status green default - alternates @t9e.me$ @ktiu.net$ ^(tillkowski|till.straube)@gmail.com$ - set reverse_name + enable = true; + sendMailCommand = lib.getExe pkgs.msmtp; + extraConfig = '' + set my_mbsync_acct='t9e' + set mbox='+Archive' + set my_junk='+Junk' + set crypt_auto_pgp + unset crypt_auto_smime + + unalternates * + alternates @t9e.me$ @ktiu.net$ + set reverse_name + + set my_signature = ${ + pkgs.writeText + "signature.txt" + config.accounts.email.accounts.t9e.signature.text + } + color status green default ''; }; - msmtp.extraConfig.port = "587"; - passwordCommand = "pass accounts/ktiu-imap"; + mbsync = { + enable = true; + create = "maildir"; + expunge = "both"; + }; + msmtp = { + enable = true; + extraConfig.from = "*@(ktiu.net|t9e.me)"; + }; + passwordCommand = "pass mail/arielle.ktiu.net"; }; - ksh = { name, ... }: lib.attrsets.recursiveUpdate (makeAccount name) { + ktiu = { + address = "till@ktiu.net"; + realName = "Till Straube"; + imap.host = "shorbut.ktiu.net"; + smtp.host = "shorbut.ktiu.net"; + smtp.tls.useStartTls = true; + notmuch.enable = true; + userName = "till"; + signature.text = '' + Till Straube (he/him) + PGP key: https://keys.openpgp.org/search?q=till@ktiu.net + ''; + signature.showSignature = "append"; + gpg = { + key = "5FA6782F543D12ED07110780BA1B73F10BABF8E3"; + signByDefault = true; + }; + neomutt = { + enable = true; + sendMailCommand = lib.getExe pkgs.msmtp; + extraConfig = '' + set my_mbsync_acct='ktiu' + + set mbox='+Archive' + set my_junk='+Junk' + + set crypt_auto_pgp + unset crypt_auto_smime + + unalternates * + alternates @ktiu.net$ + set reverse_name + set my_signature = ${ + pkgs.writeText + "signature.txt" + config.accounts.email.accounts.ktiu.signature.text + } + color status green default + ''; + }; + mbsync = { + enable = true; + create = "maildir"; + expunge = "both"; + }; + msmtp = { + enable = false; + # extraConfig.from = "*@ktiu.net"; + }; + passwordCommand = "secret-tool lookup server shorbut.ktiu.net account till"; + }; + + ksh = { address = "kein_schlussstrich_hessen@systemli.org"; realName = "Kein Schlussstrich Hessen"; imap.host = "mail.systemli.org"; smtp.host = "mail.systemli.org"; + smtp.tls.useStartTls = true; + notmuch.enable = true; userName = "kein_schlussstrich_hessen@systemli.org"; signature.text = '' Kein Schlussstrich Hessen PGP Key: https://keys.openpgp.org/search?q=kein_schlussstrich_hessen@systemli.org ''; + signature.showSignature = "append"; neomutt = { - extraConfig = makeConfig name + '' - color status red default + enable = true; + # sendMailCommand = "/home/till/.nix-profile/bin/msmtp"; + sendMailCommand = lib.getExe pkgs.msmtp; + extraConfig = '' + set my_mbsync_acct='ksh' + set mbox='+Erledigt' + set my_junk='+Junk' + set postponed='+Drafts' + set record='+Sent' + set trash='+Trash' set crypt_auto_pgp + unset crypt_auto_smime + + unalternates * + set reverse_name + set my_signature = ${ + pkgs.writeText + "signature.txt" + config.accounts.email.accounts.ksh.signature.text + } + color status cyan default ''; }; - passwordCommand = "pass ksh/systemli"; + mbsync = { + enable = true; + create = "maildir"; + expunge = "both"; + }; + msmtp = { + enable = true; + extraConfig.from = "kein_schlussstrich_hessen@systemli.org"; + }; + passwordCommand = "pass other/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 = ""; map = [ "index" ]; action = "display-message"; } - { key = ""; map = "index"; action = "entire-thread"; } - { key = "gf"; map = [ "index" "pager" ]; action = "change-folder"; } - { key = ""; 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 = "tag:dummy:source ${config.xdg.configHome}/neomutt/gug!"; } - { key = "gm"; map = [ "index" "pager" ]; action = "tag:dummy:source ${config.xdg.configHome}/neomutt/t9eg!"; } - { key = "gk"; map = [ "index" "pager" ]; action = "tag:dummy:source ${config.xdg.configHome}/neomutt/kshg!"; } - - { key = "Y"; map = [ "index" "pager" ]; action = ""; } - { key = "y"; map = [ "index" "pager" ]; action = "-inbox -unread -spam -trash"; } - { key = "J"; map = [ "index" "pager" ]; action = "+spam -inbox -unread -trash"; } - { key = "I"; map = [ "index" "pager" ]; action = "+inbox -old -spam -trash"; } - { key = "Y"; map = [ "index" "pager" ]; action = ""; } - { key = "dd"; map = [ "index" "pager" ]; action = "+trash -inbox -unread -spam"; } - - { key = "g!"; map = [ "index" "pager" ]; action = "Inbox"; } - { key = "g<"; map = [ "index" "pager" ]; action = "Sent"; } - { key = "g>"; map = [ "index" "pager" ]; action = "Archive"; } - { key = "gj"; map = [ "index" "pager" ]; action = "Spam"; } - { key = "gd"; map = [ "index" "pager" ]; action = "Drafts"; } - { key = "gt"; map = [ "index" "pager" ]; action = "Trash"; } - - { key = "go"; map = [ "index" "pager" ]; action = "notmuch new"; } - { key = "V"; map = ["index" "pager"]; action = "html"; } - { key = "mar"; map = [ "index" "pager" ]; action = "newn*"; } - { key = "A"; map = [ "index" "pager" ]; action = "khard add-email --vcard-version=4.0"; } - { key = "S"; map = [ "index" "pager" ]; action = "ripmime -i - -d ~/tmp && rm ~/tmp/textfile*"; } - { key = "gb"; map = [ "index" "pager" ]; action = "urlscan"; } - { key = "I"; map = [ "compose" ]; action = "`tmpfile=$(mktemp -u --suffix .png -t XXXXXXXXXXXX -p ~/tmp) && wl-paste -t image/png > \"$tmpfile\" && echo \"$tmpfile\"`"; } - { key = "p"; map = [ "compose" ]; action = ""; } - - { key = "c"; map = [ "index" "pager" ]; action = "set signature=$my_signature"; } - { key = "r"; map = [ "index" "pager" ]; action = "unset signature"; } - { key = "a"; map = [ "index" "pager" ]; action = "unset signature"; } - { key = "f"; map = [ "index" "pager" ]; action = "unset signature"; } - { key = "l"; map = [ "index" "pager" ]; action = "unset signature"; } - ]; - - extraConfig = builtins.readFile ./config.neomuttrc; - }; - - xdg.configFile."neomutt/bindings.neomuttrc".source = ./bindings.neomuttrc; - programs.neovim.plugins = with pkgs.vimPlugins; [ { plugin = vim-pathogen; diff --git a/home/mail/neomutt_mailcap b/home/mail/neomutt_mailcap new file mode 100644 index 0000000..1718345 --- /dev/null +++ b/home/mail/neomutt_mailcap @@ -0,0 +1,11 @@ +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; 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 diff --git a/home/mail/smime.neomuttrc b/home/mail/smime.neomuttrc new file mode 100644 index 0000000..60f57e5 --- /dev/null +++ b/home/mail/smime.neomuttrc @@ -0,0 +1,24 @@ +# Locations +# set smime_ca_location="~/.keys/neomutt/smime/ca" +# set smime_certificates="~/.keys/neomutt/smime/public" +# set smime_keys="~/.keys/neomutt/smime/private" + +# Commands (smime_keys) +set smime_pk7out_command="openssl smime -verify -in %f -noverify -pk7out" +set smime_get_cert_command="openssl pkcs7 -print_certs -in %f" +set smime_get_signer_cert_command="openssl smime -verify -in %f -noverify -signer %c -out /dev/null" +set smime_get_cert_email_command="openssl x509 -in %f -noout -email" +set smime_import_cert_command="smime_keys add_cert %f" + +# Outgoing +set smime_encrypt_with="aes256" +set smime_encrypt_command="openssl smime -encrypt -%a -outform DER -in %f %c" +set smime_sign_digest_alg="sha256" +set smime_sign_command="openssl smime -sign -md %d -signer %c -inkey %k -passin stdin -in %f -certfile %i -outform DER" + +# Incoming +set smime_decrypt_command="openssl smime -decrypt -passin stdin -inform DER -in %f -inkey %k -recip %c" +set smime_verify_command="openssl smime -verify -inform DER -in %s %C -content %f" +set smime_verify_opaque_command="\ +openssl smime -verify -inform DER -in %s %C || \ +openssl smime -verify -inform DER -in %s -noverify 2>/dev/null" diff --git a/home/media.nix b/home/media.nix index 5c5e14c..46e02e6 100644 --- a/home/media.nix +++ b/home/media.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ config, pkgs, inputs, lib, ... }: { home.packages = with pkgs; [ @@ -11,4 +11,6 @@ yt-dlp zathura ]; + + xdg.configFile."castget/castget.conf".source = ./castget/castget.conf; } diff --git a/home/profiles/minimal.nix b/home/minimal.nix similarity index 82% rename from home/profiles/minimal.nix rename to home/minimal.nix index e4e5828..eeb7f44 100644 --- a/home/profiles/minimal.nix +++ b/home/minimal.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ config, pkgs, inputs, lib, ... }: { programs.home-manager.enable = true; @@ -10,21 +10,22 @@ fastfetch fzf jq - nh nix-search progress rename silver-searcher tldr tmux - yq ]; imports = [ - ../fish.nix - ../vifm.nix - ../nvim - ../tmux.nix + ./fish.nix + ./tmux + ./password-store.nix + ./vifm + ./nvim + ./gpg.nix + ./ssh.nix ]; programs.nix-index = { diff --git a/home/nvim/config.vim b/home/nvim/config.vim index 94efc9a..2b3d0e5 100644 --- a/home/nvim/config.vim +++ b/home/nvim/config.vim @@ -23,9 +23,6 @@ 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 @@ -50,13 +47,9 @@ onoremap al :normal val xnoremap i% GoggV onoremap i% :normal vi% -" highlight Normal guibg=NONE - function CreateNote(title) - execute "VimwikiIndex" - execute "VimwikiGoto " . a:title -endfunction - -function Diary() - execute "VimwikiMakeDiaryNote" + execute "file ~/notes/" . strftime("%Y-%m-%d") . "_" . join(split(tolower(a:title)), "_") . ".md" + execute "set ft=markdown" + execute "normal! i" . a:title + execute "normal V\yaml_note\" endfunction diff --git a/home/nvim/default.nix b/home/nvim/default.nix index e982334..1cec2fb 100644 --- a/home/nvim/default.nix +++ b/home/nvim/default.nix @@ -1,4 +1,4 @@ -{ pkgs, lib, ... }: +{ pkgs, ... }: { home.packages = with pkgs; [ @@ -6,7 +6,6 @@ marksman nil typescript-language-server - vim-language-server ]; programs.neovim = { @@ -31,9 +30,8 @@ { plugin = fugitive; - type = "lua"; config = '' - vim.api.nvim_set_keymap("n", "g", ":Git", { noremap = true, silent = true }) + nnoremap g :Git ''; } @@ -45,9 +43,9 @@ vim.api.nvim_set_keymap('i', '', '(fzf-complete-word)', { silent = true }) vim.api.nvim_set_keymap('i', '', '(fzf-complete-line)', { silent = true }) - vim.api.nvim_set_keymap('n', '', '(fzf-maps-n)', { silent = true }) - vim.api.nvim_set_keymap('x', '', '(fzf-maps-x)', { silent = true }) - vim.api.nvim_set_keymap('o', '', '(fzf-maps-o)', { silent = true }) + vim.api.nvim_set_keymap('n', '', '(fzf-maps-n)', { silent = true }) + vim.api.nvim_set_keymap('x', '', '(fzf-maps-x)', { silent = true }) + vim.api.nvim_set_keymap('o', '', '(fzf-maps-o)', { silent = true }) vim.api.nvim_set_keymap('n', 'b', ':Buffers', { noremap = true, silent = true }) vim.api.nvim_set_keymap('n', 'o', ':Files', { noremap = true, silent = true }) @@ -73,7 +71,7 @@ nnoremap [og :Goyo 80 nnoremap ]og :Goyo! ''; - } + } { plugin = limelight-vim; config = '' @@ -109,30 +107,11 @@ vim.lsp.enable('r_language_server') vim.lsp.enable('texlab') vim.lsp.enable('ts_ls') - vim.lsp.enable('vimls') vim.api.nvim_del_keymap('i', '') ''; } - { - 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 = '' @@ -170,20 +149,16 @@ ''; } - { - plugin = vim-fish; - } - + vim-fish vim-nix { plugin = vim-pandoc; config = '' - let g:pandoc#modules#disabled = ["completion", "command", "menu"] + let g:pandoc#modules#disabled = ["completion", "command", "menu", "completion"] ''; } - vim-pandoc-syntax vim-repeat { @@ -203,7 +178,7 @@ vim-snippets vim-speeddating vim-surround - + { plugin = vim-unimpaired; config = '' diff --git a/home/nvim/nvim-cmp.lua b/home/nvim/nvim-cmp.lua index 7ac7e74..9d64ae5 100644 --- a/home/nvim/nvim-cmp.lua +++ b/home/nvim/nvim-cmp.lua @@ -8,15 +8,18 @@ cmp.setup({ end, }, - mapping = cmp.mapping.preset.insert( - { - [''] = cmp.mapping.scroll_docs(-4), - [''] = cmp.mapping.scroll_docs(4), - [''] = cmp.mapping.complete(), - [''] = cmp.mapping.abort(), - [''] = cmp.mapping.confirm({ select = false }), - } - ), + window = { + -- completion = cmp.config.window.bordered(), + -- documentation = cmp.config.window.bordered(), + }, + + mapping = cmp.mapping.preset.insert({ + [''] = cmp.mapping.scroll_docs(-4), + [''] = cmp.mapping.scroll_docs(4), + [''] = cmp.mapping.complete(), + [''] = cmp.mapping.abort(), + [''] = cmp.mapping.confirm({ select = true }), + }), sources = cmp.config.sources({ { name = 'cmp_pandoc' }, @@ -31,6 +34,17 @@ cmp.setup({ }) +-- To use git you need to install the plugin petertriho/cmp-git and uncomment lines below +-- Set configuration for specific filetype. +--[[ cmp.setup.filetype('gitcommit', { + sources = cmp.config.sources({ + { name = 'git' }, + }, { + { name = 'buffer' }, + }) +}) +require("cmp_git").setup() ]]-- + -- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore). cmp.setup.cmdline({ '/', '?' }, { mapping = cmp.mapping.preset.cmdline(), @@ -52,3 +66,8 @@ cmp.setup.cmdline(':', { -- Set up lspconfig. local capabilities = require('cmp_nvim_lsp').default_capabilities() +-- Replace with each lsp server you've enabled. +-- vim.lsp.config('', { +-- capabilities = capabilities +-- }) +-- vim.lsp.enable('') diff --git a/home/office-cli.nix b/home/office-cli.nix index cf86068..5baf102 100644 --- a/home/office-cli.nix +++ b/home/office-cli.nix @@ -9,6 +9,7 @@ home.packages = with pkgs; [ bat + castget ghostscript hunspell hunspellDicts.de_DE diff --git a/home/profiles/on-server.nix b/home/on-server.nix similarity index 100% rename from home/profiles/on-server.nix rename to home/on-server.nix diff --git a/home/password-store.nix b/home/password-store.nix index af8f9e3..8839f20 100644 --- a/home/password-store.nix +++ b/home/password-store.nix @@ -1,6 +1,8 @@ { config, pkgs, ... }: { + services.gnome-keyring.enable = false; + programs.password-store = { enable = true; settings = { @@ -12,12 +14,14 @@ pkgs.passff-host ]; - services.gnome-keyring.enable = false; - services.pass-secret-service = { enable = true; }; + home.packages = with pkgs; [ + pinentry-all + ]; + xdg.configFile."scdaemon" = { text = '' disable-ccid @@ -25,5 +29,4 @@ ''; target = "../.gnupg/scdaemon.conf"; }; - } diff --git a/home/plasma.nix b/home/plasma.nix deleted file mode 100644 index 426fa8e..0000000 --- a/home/plasma.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ ... }: - -{ - services.kdeconnect.enable = true; -} diff --git a/home/profiles/desktop-full.nix b/home/profiles/desktop-full.nix deleted file mode 100644 index c786f38..0000000 --- a/home/profiles/desktop-full.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ ... }: - -{ - imports = [ - ./desktop-slim.nix - - ../messaging.nix - ../r.nix - ../tex.nix - ../mail - ../office-gui.nix - ../office-cli.nix - ../aichat.nix - ]; -} diff --git a/users/till/ssh.nix b/home/ssh.nix similarity index 86% rename from users/till/ssh.nix rename to home/ssh.nix index 7dbbba7..7836029 100644 --- a/users/till/ssh.nix +++ b/home/ssh.nix @@ -41,11 +41,7 @@ in identityFile = certs.uni; }; - "git.ktiu.net" = { - identityFile = certs.personal; - }; - - "arielle (arielle|git).ktiu.net" = { + "arielle arielle.ktiu.net" = { hostname = "arielle.ktiu.net"; user = "till"; identityFile = certs.personal; @@ -69,11 +65,11 @@ in identityFile = certs.personal; }; - "mila" = { - hostname = "mila"; - user = "tstraube"; - identityFile = certs.uni; - }; + # "mila" = { + # hostname = "mila"; + # user = "till"; + # identityFile = certs.personal; + # }; }; }; diff --git a/home/tmux.nix b/home/tmux/default.nix similarity index 71% rename from home/tmux.nix rename to home/tmux/default.nix index 5c54bc3..7ce808d 100644 --- a/home/tmux.nix +++ b/home/tmux/default.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ config, pkgs, ... }: { programs.tmux = { @@ -22,19 +22,13 @@ 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 - ''} + bind f source-file ~/.config/tmux/vifm.conf + bind R source-file ~/.config/tmux/rloft.conf + bind J source-file ~/.config/tmux/jekyll.conf # Unbind unbind p @@ -42,6 +36,7 @@ unbind % # Eye candy + # set-option -g status-position top set-option -g status-right "" set-option -g status-left "" set-option -g status-justify "centre" @@ -52,10 +47,9 @@ # 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" ''; }; + xdg.configFile."tmux/vifm.conf".source = ./vifm.conf; + xdg.configFile."tmux/rloft.conf".source = ./rloft.conf; + xdg.configFile."tmux/jekyll.conf".source = ./jekyll.conf; } diff --git a/home/tmux/jekyll.conf b/home/tmux/jekyll.conf new file mode 100644 index 0000000..8ecb9ee --- /dev/null +++ b/home/tmux/jekyll.conf @@ -0,0 +1,6 @@ +split-window -c '#{pane_current_path}' -h nix-shell +send-keys "jekyll serve" Enter +resize-pane -x 40% +split-pane -c '#{pane_current_path}' "git status; fish" +select-pane -L +rename-window "jekyll" diff --git a/home/tmux/rloft.conf b/home/tmux/rloft.conf new file mode 100644 index 0000000..400c102 --- /dev/null +++ b/home/tmux/rloft.conf @@ -0,0 +1,2 @@ +split-window -c '#{pane_current_path}' -h R -q --no-save --no-restore +select-pane -l diff --git a/home/tmux/vifm.conf b/home/tmux/vifm.conf new file mode 100644 index 0000000..45fd508 --- /dev/null +++ b/home/tmux/vifm.conf @@ -0,0 +1 @@ +new-window -c '#{pane_current_path}' vifm diff --git a/home/vifm.nix b/home/vifm.nix deleted file mode 100644 index d68ebbd..0000000 --- a/home/vifm.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ 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 - ''; -} diff --git a/home/vifm/default.nix b/home/vifm/default.nix new file mode 100644 index 0000000..4845d34 --- /dev/null +++ b/home/vifm/default.nix @@ -0,0 +1,13 @@ +{ config, pkgs, ... }: + +{ + programs.vifm = { + enable = true; + extraConfig = " + colorscheme light + set vicmd=nvim + filetype * xdg-open + "; + }; + xdg.configFile."vifm/colors/light.vifm".source = ./light.vifm; +} diff --git a/home/vifm/light.vifm b/home/vifm/light.vifm new file mode 100644 index 0000000..f770398 --- /dev/null +++ b/home/vifm/light.vifm @@ -0,0 +1,20 @@ +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 WildMenu cterm=underline,reverse ctermfg=white ctermbg=black +highlight CmdLine cterm=bold ctermfg=magenta ctermbg=default +"highlight ErrorMsg cterm=none ctermfg=red ctermbg=black +highlight Border cterm=none ctermfg=default ctermbg=default +"highlight JobLine cterm=bold,reverse ctermfg=black ctermbg=white diff --git a/hosts/arielle/default.nix b/hosts/arielle/default.nix index 0503bda..1c6bee4 100644 --- a/hosts/arielle/default.nix +++ b/hosts/arielle/default.nix @@ -5,7 +5,7 @@ networking.domain = "ktiu.net"; imports = [ - ./hardware-configuration.nix + ./hardware ../system ../system/web-server ../system/mail-server diff --git a/hosts/arielle/hardware-configuration.nix b/hosts/arielle/hardware.nix similarity index 100% rename from hosts/arielle/hardware-configuration.nix rename to hosts/arielle/hardware.nix diff --git a/hosts/nova/default.nix b/hosts/nova/default.nix index 482b1bf..969a3e5 100644 --- a/hosts/nova/default.nix +++ b/hosts/nova/default.nix @@ -9,9 +9,9 @@ ../../users/guest/system.nix ../../system ../../system/desktop + ../../system/desktop/gnome.nix + # ../../system/desktop/cast.nix ../../system/desktop/ergodox-udev.nix - # ../../system/desktop/gnome.nix - ../../system/desktop/cosmic.nix ../../system/desktop/steam.nix ../../system/desktop/yubikey-pam.nix ]; diff --git a/system/desktop/cosmic.nix b/system/desktop/cosmic.nix deleted file mode 100644 index a90680b..0000000 --- a/system/desktop/cosmic.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ lib, ... }: - -{ - services.desktopManager.cosmic.enable = true; - services.displayManager.cosmic-greeter.enable = true; - - services.system76-scheduler.enable = true; - - services.gnome.gnome-keyring.enable = lib.mkForce false; - - programs.firefox.preferences = { - "widget.gtk.libadwaita-colors.enabled" = false; - }; -} diff --git a/system/desktop/default.nix b/system/desktop/default.nix index b4c988b..26f54a5 100644 --- a/system/desktop/default.nix +++ b/system/desktop/default.nix @@ -51,9 +51,4 @@ programs.virt-manager.enable = true; programs.dconf.enable = true; - programs.gnupg.agent = { - enable = true; - pinentryPackage = pkgs.pinentry-all; - # pinentry.program = "pinentry"; - }; } diff --git a/system/desktop/gnome.nix b/system/desktop/gnome.nix index b31365b..e1e463a 100644 --- a/system/desktop/gnome.nix +++ b/system/desktop/gnome.nix @@ -4,10 +4,10 @@ { services.desktopManager.gnome.enable = true; - # services.displayManager = { - # gdm.enable = true; - # defaultSession = "gnome"; - # }; + services.displayManager = { + gdm.enable = true; + defaultSession = "gnome"; + }; environment.gnome.excludePackages = with pkgs; [ gnome-tour diff --git a/system/desktop/hyprland.nix b/system/desktop/hyprland.nix deleted file mode 100644 index ab3624d..0000000 --- a/system/desktop/hyprland.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ pkgs, ... }: - -{ - - programs.hyprland = { - enable = true; - withUWSM = true; - # xwayland.enable = true; - }; - - # programs.regreet = { - # enable = true; - # # For this example you'd need to have a version of Adwaita and the font Cantarell installed - # theme.name = "Adwaita"; - # font = { - # name = "Cantarell"; - # size = 16; - # }; - # cursorTheme.name = "Adwaita"; - # }; - - environment.systemPackages = with pkgs; [ - ashell - kitty - mako - tofi - ]; - -} diff --git a/system/desktop/plasma.nix b/system/desktop/plasma.nix deleted file mode 100644 index d3f86a6..0000000 --- a/system/desktop/plasma.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ ... }: - -{ - services.desktopManager.plasma6.enable = true; - - programs.kdeconnect.enable = true; - - networking.firewall = rec { - allowedTCPPortRanges = [ { from = 1714; to = 1764; } ]; - allowedUDPPortRanges = allowedTCPPortRanges; - }; - - services.displayManager.sddm = { - enable = true; - wayland.enable = true; - settings.General.DisplayServer = "wayland"; - }; -} diff --git a/system/desktop/yubikey-pam.nix b/system/desktop/yubikey-pam.nix index 3544d2d..8ef8248 100644 --- a/system/desktop/yubikey-pam.nix +++ b/system/desktop/yubikey-pam.nix @@ -4,9 +4,8 @@ services.pcscd.enable = true; environment.systemPackages = with pkgs; [ - keymapp yubikey-personalization - yubikey-manager + keymapp ]; services.udev = { diff --git a/system/mail-server/roundcube.nix b/system/mail-server/roundcube.nix index 5c48fc1..a8e704d 100644 --- a/system/mail-server/roundcube.nix +++ b/system/mail-server/roundcube.nix @@ -1,15 +1,9 @@ -{ config, ... }: - -let - - webmailHostName = "webmail.${config.networking.domain}"; - -in +{ config, pkgs, ... }: { services.roundcube = { enable = true; - hostName = webmailHostName; + hostName = "webmail.ktiu.net"; extraConfig = '' $config['smtp_host'] = 'tls://%h'; $config['smtp_conn_options'] = [ @@ -20,17 +14,4 @@ in ]; ''; }; - - # not sure why this is currently working w/o the following - # - # services.nginx.virtualHosts."${webmailHostName}" = { - # onlySSL = true; - # forceSSL = lib.mkForce false; - # enableACME = lib.mkForce false; - # useACMEHost = config.networking.domain; - # }; - # security.acme.certs."${config.networking.domain}".extraDomainNames = [ - # webmailHostName - # ]; - } diff --git a/system/web-server/dex.nix b/system/web-server/dex.nix index d9ad4cc..1708e36 100644 --- a/system/web-server/dex.nix +++ b/system/web-server/dex.nix @@ -19,7 +19,7 @@ in { { id = "outline"; name = "Outline Client"; - redirectURIs = [ "https://${config.services.outline.hostname}/auth/oidc.callback" ]; + redirectURIs = [ "https://${outline.hostname}/auth/oidc.callback" ]; secretFile = "/var/custom-access/outline-oidc-secret.txt"; } ]; diff --git a/system/web-server/letsencrypt.nix b/system/web-server/letsencrypt.nix index 9b462f9..7e99212 100644 --- a/system/web-server/letsencrypt.nix +++ b/system/web-server/letsencrypt.nix @@ -5,7 +5,7 @@ acceptTerms = true; defaults.email = "till@ktiu.net"; certs."${config.networking.domain}" = { - # domain = config.networking.domain; + domain = config.networking.domain; webroot = "/var/lib/acme/.challenges"; group = config.services.nginx.group; extraDomainNames = [ config.networking.fqdn ]; diff --git a/users/guest/system.nix b/users/guest/system.nix index 610bce2..ddfbf5e 100644 --- a/users/guest/system.nix +++ b/users/guest/system.nix @@ -7,7 +7,7 @@ extraGroups = [ "networkmanager" ]; shell = pkgs.fish; openssh.authorizedKeys.keyFiles = [ - ../till/pubkeys/till${"@"}nova.pub + ../till/ssh/till${"@"}nova.pub ]; }; } diff --git a/users/till/home.nix b/users/till/home.nix index ab32419..b14b24c 100644 --- a/users/till/home.nix +++ b/users/till/home.nix @@ -6,9 +6,4 @@ name = "Till"; email = "till@ktiu.net"; }; - - imports = [ - ./ssh.nix - ]; - } diff --git a/users/till/pubkeys/till@nova.pub b/users/till/ssh/till@nova.pub similarity index 100% rename from users/till/pubkeys/till@nova.pub rename to users/till/ssh/till@nova.pub diff --git a/users/till/system.nix b/users/till/system.nix index e4c413e..fd25636 100644 --- a/users/till/system.nix +++ b/users/till/system.nix @@ -10,7 +10,7 @@ ]; shell = pkgs.fish; openssh.authorizedKeys.keyFiles = [ - ./pubkeys/till${"@"}nova.pub + ./ssh/till${"@"}nova.pub ]; }; }