summaryrefslogtreecommitdiff
path: root/home
diff options
context:
space:
mode:
authorstuebinm2022-01-17 00:19:59 +0100
committerstuebinm2022-01-20 13:16:43 +0100
commit71a9f3858e42856ef81ad92553a7732811186733 (patch)
treec2fa2ba37bda94491a36fd2e0dffd37d443f7ccb /home
parentc48f90064724ce1d802038524f60cce7baf53e69 (diff)
attempting home-manager config with flakes
Diffstat (limited to '')
-rw-r--r--home/home.nix265
-rw-r--r--home/newsboat-lib.nix21
-rw-r--r--home/newsboat-public.nix147
-rw-r--r--home/packages.nix69
-rw-r--r--home/unstable.nix14
5 files changed, 516 insertions, 0 deletions
diff --git a/home/home.nix b/home/home.nix
new file mode 100644
index 0000000..f2a0f7e
--- /dev/null
+++ b/home/home.nix
@@ -0,0 +1,265 @@
+{ config, pkgs, inputs, ... }:
+
+{
+ # Let Home Manager install and manage itself.
+ programs.home-manager.enable = true;
+
+ imports = [
+ ./packages.nix
+ ./unstable.nix
+ ];
+
+ home.keyboard.options = [ "caps:escape" ];
+
+ programs.msmtp.enable = true;
+ programs.mbsync.enable = true;
+ programs.mu.enable = true;
+
+ accounts.email = {
+ accounts.hacc = {
+ address = "stuebinm@hacc.space";
+ imap.host = "mail.hacc.space";
+ mbsync = {
+ enable = true;
+ create = "maildir";
+ };
+ msmtp.enable = true;
+ mu.enable = true;
+ primary = true;
+ realName = "stuebinm";
+ smtp.host = "mail.hacc.space";
+ userName = "stuebinm@hacc.space";
+ passwordCommand = "cat ~/mailpasswd";
+ };
+ };
+
+ programs.bash = {
+ enable = true;
+ historyControl = [ "ignoredups" "ignorespace" ];
+ historyFileSize = 10000;
+
+ # set shell prompt & tty for the gnu pinentry (otherwise gnupg will crash)
+ initExtra = ''
+ export GPG_TTY=`tty`
+ # this shouldn't be necessary, but apparently nix is broken ...
+ NIX_PATH=$HOME/.nix-defexpr/channels''${NIX_PATH:+:}$NIX_PATH
+ PS1='\[\033[1;36m\] >>> [\j|\u@\w]\$: \[\033[00m\]'
+ '';
+
+ shellAliases = {
+ "lrz-vpn" = "sudo openconnect https://asa-cluster.lrz.de -g AnyConnect";
+ ll = "ls -slF";
+ news = "newsboat";
+ pj = "pijul";
+ };
+ };
+
+ programs.starship = {
+ enable = true;
+ enableBashIntegration = true;
+ enableFishIntegration = true;
+ settings = {
+ directory.truncation_length = 10;
+ };
+ };
+
+ programs.nushell = {
+ enable = true;
+ settings = {
+ startup = [
+ "mkdir ~/.cache/starship"
+ "starship init nu | save ~/.cache/starship/init.nu"
+ "source ~/.cache/starship/init.nu"
+ ];
+ prompt = "starship_prompt";
+ };
+ };
+
+ programs.fish = {
+ enable = true;
+ shellAliases = {
+ "lrz-vpn" = "sudo openconnect https://asa-cluster.lrz.de";
+ news = "newsboat";
+ pj = "pijul";
+ nix-shell = "nix-shell --command fish";
+ le = "exa";
+ ll = "exa -lh --grid --icons";
+ llt = "exa -lh --tree --icons";
+ lt = "exa --tree --icons";
+ };
+ functions = {
+ fish_greeting = {
+ body = "";
+ };
+ };
+ };
+
+ programs.newsboat = {
+ enable = true;
+ urls = (import ./newsboat-public.nix) ++ (import inputs.feeds);
+ browser = pkgs.lynx.outPath + "/bin/lynx";
+ reloadThreads = 100;
+ queries = {
+ unread = ''unread="yes"'';
+ security = ''tags # "security"'';
+ ao3 = ''tags # "ao3"'';
+ blogs = ''unread="yes" and tags # "blog"'';
+ video = ''tags # "video"'';
+ podcasts = ''tags # "podcast"'';
+ news = ''tags # "news"'';
+ };
+ extraConfig = ''
+ color background white default
+ color listnormal white default
+ color listnormal_unread magenta default bold
+ color listfocus black white bold
+ color listfocus_unread magenta white bold
+ color info green color0
+ color article white default
+
+ ssl-verifypeer no
+
+ macro v set browser "mpv %u >/dev/null 2>&1 &" ; open-in-browser ; set browser "${config.programs.newsboat.browser} %u"
+ macro f set browser "${pkgs.xdg_utils}/bin/xdg-open %u >/dev/null 2>&1 &" ; open-in-browser ; set browser "${config.programs.newsboat.browser} %u"
+
+ bind-key j down
+ bind-key k up
+ '';
+ };
+
+
+ programs.bat = {
+ enable = true;
+ config.wrap = "never";
+ };
+
+
+ programs.obs-studio = {
+ enable = true;
+ plugins = let
+ move-transition = import obs/move-transition.nix;
+ obs-websocket = import obs/obs-websocket.nix;
+ in
+ with pkgs; [
+ ];
+ };
+
+ programs.git = {
+ enable = true;
+ package = pkgs.gitAndTools.gitFull;
+ userEmail = "stuebinm@disroot.org";
+ userName = "stuebinm";
+
+ signing = {
+ # signByDefault = true;
+ key = "0x8FBE8AAD32FA12B7";
+ };
+
+ extraConfig = {
+ log.showSignature = true;
+ init.defaultBranch = "main";
+ };
+
+ delta = {
+ enable = true;
+ options = {
+ decorations = {
+ commit-decoration-style = "bold yellow";
+ file-decoration-style = "bold blue";
+ file-style = "bold yellow";
+ };
+ features = "decorations line-numbers navigate";
+ whitespace-error-style = "22 reverse";
+ };
+ };
+ };
+
+ programs.gpg = {
+ enable = true;
+ settings = {
+ auto-key-locate = "keyserver";
+ with-fingerprint = "";
+ };
+ };
+ services.gpg-agent = {
+ enable = true;
+ pinentryFlavor = "gtk2";
+ maxCacheTtl = 1800;
+ };
+
+
+ programs.htop = {
+ enable = true;
+ settings = {
+ fields = "0 48 17 18 38 46 47 49 1";
+ sort_key = 46;
+ sort_direction = -1;
+ hide_kernel_threads = 1;
+ hide_userland_threads = 0;
+ shadow_other_users = 1;
+ show_program_path = 0;
+ highlight_base_name = 1;
+ find_comm_in_cmdline = 1;
+ header_margin = 1;
+ show_cpu_usage = 1;
+ color_scheme = 5;
+ enable_mouse = 1;
+ delay = 15;
+ header_layout = "two_67_33";
+ column_meters_0 = "AllCPUs Memory Swap";
+ column_meter_modes_0 = "1 1 1";
+ column_meters_1 = "Tasks LoadAverage Uptime NetworkIO";
+ column_meter_modes_1 = "2 2 2 2";
+ };
+ };
+
+ programs.ssh = {
+ forwardAgent = true;
+ enable = true;
+ matchBlocks = let
+ keydir = config.home.homeDirectory + "/.ssh";
+ hetznerlogin = match: {user = "root"; identityFile = keydir + "/hetzner"; forwardAgent = true;} // match;
+ vpslogin = hostname: hetznerlogin {inherit hostname;};
+ lmulogin = hostname: {identityFile = keydir + "/key_lmu"; user = "lmu-user"; } // { inherit hostname;};
+ in {
+ "parsons" = hetznerlogin {
+ hostname = "parsons.hacc.space";
+ port = 62954;
+ user = "stuebinm";
+ identityFile = keydir + "/id_rsa";
+ };
+ "discuss" = hetznerlogin {
+ user = "root";
+ hostname = "23.88.58.86";
+ port = 62954;
+ identityFile = keydir + "/id_rsa";
+ };
+ "flora" = vpslogin "nix.stuebinm.eu";
+ "chaski" = vpslogin "chaski.stuebinm.eu";
+ "cgit" = vpslogin "flora.stuebinm.eu" // {user = "git";};
+ "mate" = {
+ hostname = "192.168.69.174";
+ user = "root";
+ identityFile = keydir + "/hetzner";
+ };
+ "lmucast-test" = lmulogin "lmzveun-h5base.srv.mwn.de";
+ "lmucast-prod" = lmulogin "lmzveun-pro-h5base.srv.mwn.de";
+ "lmu-salsa" = {
+ hostname = "lmzveun-salsa.srv.mwn.de";
+ user = "ra72koc";
+ identityFile = keydir + "/key_lmu";
+ };
+ };
+ };
+
+ programs.mpv = {
+ enable = true;
+ bindings = {
+ "up" = "add speed 0.1";
+ "down" = "add speed -0.1";
+ "n" = "add chapter 1";
+ "p" = "add chapter -1";
+ };
+ };
+
+}
diff --git a/home/newsboat-lib.nix b/home/newsboat-lib.nix
new file mode 100644
index 0000000..1344a9b
--- /dev/null
+++ b/home/newsboat-lib.nix
@@ -0,0 +1,21 @@
+
+rec {
+ tags = tags: url: {
+ tags = tags;
+ inherit url;
+ };
+ btag = url: t: tags [ t "blog" ] url;
+ btags = url: ts: tags (ts ++ [ "blog" ]) url;
+
+ ntag = url: t: tags [ t "news" ] url;
+ jtag = url: t: tags [ t "journal" ] url;
+
+ vtag = url: t: tags [ t "video" ] url;
+ ytag = channel: tag: vtag ("https://www.youtube.com/feeds/videos.xml?channel_id=${channel}") tag;
+ blender = channel: vtag "https://video.blender.org/feeds/videos.xml?videoChannelId=${toString channel}" "blender";
+
+ podcast = url: tags [ "podcast" ] url;
+ music = url: tags [ "music" ] url;
+
+ fr = "français";
+}
diff --git a/home/newsboat-public.nix b/home/newsboat-public.nix
new file mode 100644
index 0000000..cca7cf5
--- /dev/null
+++ b/home/newsboat-public.nix
@@ -0,0 +1,147 @@
+
+with import ./newsboat-lib.nix;
+[
+ # news
+ (ntag "https://thinkmods.store/blogs/news.atom" "tech")
+ (ntag "http://feeds.feedburner.com/Blendernation" "blender")
+ (ntag "https://puri.sm/feed/" "tech")
+ (ntag "https://events.ccc.de" "chaos")
+ (ntag "https://this-week-in-rust.org/rss.xml" "prog")
+ (ntag "https://weekly.nixos.org/feeds/all.rss.xml" "prog")
+ (ntag "https://haskellweekly.news/newsletter.atom" "prog")
+ (ntag "https://zerforschung.org/index.xml" "chaos")
+ (ntag "https://jacobinitalia.it/feed" "it")
+ (ntag "https://ctxt.es/es/?tpl=87" "es")
+ (jtag "https://madeinchinajournal.com/feed/" "pol")
+ (jtag "https://decorrespondent.nl/feed/v1/publications" "pol")
+ (jtag "https://solar.lowtechmagazine.com/feeds/all-en.atom.xml" "tech")
+ (btag "https://www.omgubuntu.co.uk/feed" "tech")
+
+ # blogs
+ (btag "https://scilogs.spektrum.de/klimalounge/feed/" "climate")
+ (btag "http://scienceblogs.de/astrodicticum-simplex/feed/" "science")
+ (btag "https://linus-neumann.de/feed/" "chaos")
+ (btag "https://acoup.blog/feed/" "history")
+ (btag "https://www.exurbe.com/feed" "history")
+ (btag "https://zompist.wordpress.com/feed/" "ling")
+ (btag "https://pluralistic.net/feed/" "chaos")
+ (btag "https://www.arkadymartine.net/blog?format=rss" "books")
+ (btags "https://antiquipop.hypotheses.org/feed" [ "history" fr ])
+ (btag "https://peterfalkingham.com/feed/" "3d")
+ (btag "https://www.kuketz-blog.de/feed/" "sec")
+ (btag "https://caramel.hypotheses.org/feed" fr)
+ (btag "https://www.pine64.org/blog/feed/" "chaos")
+ (btag "https://crewsproject.wordpress.com/category/news-and-events/feed/" "ling")
+ (btag "https://gretchenmcculloch.com/news/feed/" "ling")
+ (btag "https://mutualintelligibility.substack.com/feed" "ling")
+ (btag "https://www.neilgaiman.com/feed/journal/" "books")
+ (btag "https://fernostwaerts.substack.com/feed" "pol")
+ (btag "https://dhmuc.hypotheses.org/feed" "dh")
+ (btag "https://log.munichmakerlab.de/rss" "chaos")
+ (btag "https://code.blender.org/feed/" "3d")
+ (btags "https://isohedral.ca/blog/feed/" [ "math" "3d" ])
+ (btag "http://exple.tive.org/blarg/feed/" "chaos")
+ (btag "https://www.antipope.org/charlie/blog-static/atom.xml" "books")
+ (btag "https://pages.vassar.edu/pharos/feed/" "history")
+ (btag "https://fasterthanli.me/index.xml" "chaos")
+ (btag "https://dannybate.com/feed/" "ling")
+ (btag "https://blog.filippo.io/rss/" "comp")
+ (btag "https://serokell.io/blog.rss.xml" "copm")
+ (btag "https://jaspervdj.be/rss.xml" "comp")
+ (btag "https://ambrevar.xyz/atom.xml" "chaos")
+ (btag "https://esoteric.codes/rss" "chaos")
+ (btag "https://grimgrains.com/links/rss.xml" "chaos")
+ (btag "https://blog.benjojo.co.uk/rss.xml" "chaos")
+ (btag "https://wiki.xxiivv.com/links/rss.xml" "chaos")
+ (btag "https://www.davidrevoy.com/feed/rss" "art")
+ (btag "https://xkcd.com/atom.xml" "xkcd")
+ (btag "https://what-if.xkcd.com/feed.atom" "xkcd")
+ (btag "https://reckoning.press/feed/" "stories")
+ (btag "http://strangehorizons.com/feed/" "stories")
+ (btag "https://grahamc.com/feed/" "comp")
+ (btag "https://elephly.net/feed.xml" "comp")
+ (btag "https://www.haskellforall.com/feeds/posts/default" "comp")
+ (btag "http://conal.net/blog/feed" "comp")
+ (btag "https://michael.stapelberg.ch/posts/tags/distri/feed.xml" "comp")
+ (btag "https://mattermost.com/blog/category/releases/rss" "security")
+ (btag "https://ionathan.ch/feed.xml" "comp")
+ (btag "https://wingolog.org/feed/atom" "comp")
+ (btag "https://os.phil-opp.com/rss.xml" "comp")
+ (btag "https://joeyh.name/blog/index.rss" "comp")
+ (btag "https://www.dawn-lang.org/feed.xml" "comp")
+ (btag "https://christine.website/blog.rss" "comp")
+ (btag "https://blog.veitheller.de/feed.rss" "comp")
+ (btag "https://alhassy.github.io/rss.xml" "comp")
+ (btag "https://hpc.guix.info/blog/feed.xml" "comp")
+ (btag "https://tratt.net/laurie/blog/entries.rss" "comp")
+ (btag "https://dataswamp.org/~solene/rss.xml" "comp")
+ (btag "https://signal.eu.org/blog/rss" "comp")
+ (btag "http://arctrain.de/feed/rss" "sci")
+ (btag "https://sandymaguire.me/atom" "comp")
+ (btag "https://reasonablypolymorphic.com/atom" "comp")
+ (btag "https://vanemden.wordpress.com/feed/" "comp")
+ (btag "https://spacekookie.de/rss.xml" "comp")
+ (btag "https://risingentropy.com/rss" "math")
+ (btag "https://www.extrema.is/articles/tag/index:haskell-books.rss" "comp")
+ (btag "https://wickedchicken.github.io/index.xml" "comp")
+ (btag "https://chrispenner.ca/atom.xml" "comp")
+ (btag "https://hannes.robur.coop/atom" "comp")
+ (btag "https://ryanglscott.github.io/feed.xml" "cat")
+ (btag "https://journal.infinitenegativeutility.com/feed/" "art")
+ (btag "https://bkastl.de/feed" "comp")
+ (btag "https://dysphoric.dev/feed" "comp")
+
+
+ # videos
+ (vtag "https://media.ccc.de/updates.rdf" "chaos") # Media.CCC.de
+ (ytag "UC9rxWtgVUFls4LocQhXoNJA" "tech") # Software Circus
+ (ytag "UCXuqSBlHAE6Xw-yeJA0Tunw" "tech") # Linus Tech Tips
+ (ytag "UCBa659QWEk1AI4Tg--mrJ2A" "stuff") # Tom Scott
+ (ytag "UCtGG8ucQgEJPeUPhJZ4M4jA" "stuff") # Rare Earth
+ (ytag "UCwRH985XgMYXQ6NxXDo8npw" "stuff") # Kurzgesagt de
+ (ytag "UCsXVk37bltHxD1rDPwtNM8Q" "stuff") # Kurzgesagt en
+ (ytag "UC9GwQ_SGeq7Nrn4NQfwVoRA" "climate") # Students for Future
+ (ytag "UCN29LJGZ8FY30ysxdTnDsaw" "stuff") # Die Filmanalyse
+ (ytag "UCv1WDP5EiipMQ__C4Cg6aow" "pol") # Tilo Jung
+ (ytag "UCX6b17PVsYBQ0ip5gyeme-Q" "stuff") # Crash Course
+ (ytag "UCsaGKqPZnGp_7N80hcHySGQ" "history") # Tasting History
+ (ytag "UCncTjqw75krp9j_wRRh5Gvw" "writing") # World Building Notes
+ (ytag "UCPlJ-KlPelfnwq0GHSeSpGQ" "talks") # It's all about Math
+ (ytag "UCmrWzKsW9IGU2l6a_MGJ3dw" "ling") # LangTime Studio
+ (ytag "UCXl0Zbk8_rvjyLwAR-Xh9pQ" "maths") # Insights into Mathematics (Wildberger)
+ (ytag "UCPjHlmSGP-rMg5PR-PyaJug" "chaos") # Henk Rijckaert
+ (ytag "UC3XTzVzaHQEd30rQbuvCtTQ" "latenight") # Last Week Tonight
+ (ytag "UCSju5G2aFaWMqn-_0YBtq5A" "maths") # Standupmaths
+ (ytag "UC2PA-AKmVpU6NKCGtZq_rKQ" "left") # Philosophy Tube
+ (ytag "UC4zzTEL5tuIgGMvzjk1Ozbg" "maths") # Henry Segerman
+ (ytag "UCyHDQ5C6z1NDmJ4g6SerW8g" "sci") # maiLab
+ (ytag "UClt01z1wHHT7c5lKcU8pxRQ" "left") # hbomberguy
+ (ytag "UCVfMwipzxB2GUqRuJpxr7Ng" "climate") # fff muc
+ (ytag "UCG1h-Wqjtwz7uUANw6gazRw" "books") # Lindsay Ellis
+ (ytag "UCiQo406SKypmtAQXIHdZ6mA" "stuff") # Birchpunk
+ (ytag "UCbbQalJ4OaC0oQ0AqRaOJ9g" "stuff") # Jay Foreman
+ (ytag "UC1H1NWNTG2Xi3pt85ykVSHA" "prog") # Jordan Harrod (AI)
+ (ytag "UC2zfPMH_srjxUN5EYrfIhCw" "comp") # Zurich friends of Haskell
+ (ytag "UCUQo7nzH1sXVpzL92VesANw" "stuff") # DIY Perks
+ (blender 2737) # blender developers
+ (blender 10) # reels
+ (blender 9) # open movies
+ (blender 4) # main blender channel
+
+ # podcasts
+ (podcast "https://craphound.com/feed/")
+ (podcast "https://omny.fm/shows/ologies-with-alie-ward/playlists/podcast.rss")
+ (podcast "https://feeds.soundcloud.com/users/soundcloud:users:237055046/sounds.rss")
+ (podcast "https://fernostwaerts.de/feed/mp3/")
+ (podcast "https://allesgesagt.podigee.io/feed/mp3")
+ (podcast "https://logbuch-netzpolitik.de/feed")
+ (podcast "https://feeds.feedburner.com/SrslyWrong")
+ (podcast "https://efforg.libsyn.com/rss")
+ (podcast "https://feed.podbean.com/lingfieldnotes/feed.xml")
+ (podcast "https://dasklima.podigee.io/feed/mp3")
+ (podcast "https://www.haecksen.org/podcast/rss")
+ (podcast "https://www.ndr.de/nachrichten/info/podcast4684.xml")
+
+ (music "https://feeds.soundcloud.com/users/soundcloud%3Ausers%3A39508706/sounds.rss")
+
+]
diff --git a/home/packages.nix b/home/packages.nix
new file mode 100644
index 0000000..55036d8
--- /dev/null
+++ b/home/packages.nix
@@ -0,0 +1,69 @@
+{ config, lib, pkgs, inputs, ... }:
+
+let
+ naersk = pkgs.callPackage inputs.naersk {};
+ extras = {
+ sfz = naersk.buildPackage inputs.sfz;
+ };
+in
+{
+ home.packages = with pkgs; [
+ (emacsWithPackages (epkgs: [ epkgs.exwm epkgs.pdf-tools epkgs.vterm ]))
+ emacs-all-the-icons-fonts
+
+ # flake-enabled version of nix
+ (pkgs.writeScriptBin "nif" ''
+ #!/usr/bin/env bash
+ exec ${pkgs.nixFlakes}/bin/nix --experimental-features "nix-command flakes" "$@"
+ '')
+ # never version of unison for playing around
+ (unison-ucm.overrideAttrs (old: rec {
+ milestone_id = "M2g";
+ version = "1.0.${milestone_id}-alpha";
+ src = fetchurl {
+ url = "https://github.com/unisonweb/unison/releases/download/release/${milestone_id}/ucm-linux.tar.gz";
+ sha256 = "004jx7q657mkcrvilk4lfkp8xcpl2bjflpn9m2p7jzlrlk97v9nj";
+ };
+ }))
+ # internet apps & clients
+ firefox thunderbird keepassxc chromium signal-desktop mumble lynx
+ openconnect matterhorn
+ # graphics & audio
+ audacity blender darktable vlc kdenlive moc ffmpeg-full
+ gimp-with-plugins inkscape krita meshlab pavucontrol moc
+ gst_all_1.gstreamer
+ # LaTeX & documents
+ texlive.combined.scheme-full xournal pandoc
+ # extra documentation, data, resources that aren't programs
+ manpages nerdfonts
+ # general cli utils
+ tree dnsutils inetutils pijul bat age libsecret gping bottom dogdns
+ cifs-utils jekyll fzf ripgrep fd bandwhich exa dive
+ ripgrep python39Packages.isort shellcheck graphviz
+ poppler unzip acpi extras.sfz
+ youtube-dl
+ # git
+ gitAndTools.gitAnnex git-bug git-appraise
+ # graphical utils
+ kitty baobab
+ # things for emacs
+ sqlite brightnessctl scrot playerctl tlp
+ # haskell & co
+ ghc cabal-install stack haskell.packages.ghc8107.haskell-language-server
+ haskellPackages.hoogle haskellPackages.stylish-haskell
+ # other functional things
+ racket dhall lean dune_2 ocamlPackages.utop ocamlPackages.ocp-indent
+ ocamlPackages.merlin ocaml
+ # html, js & co
+ jq html-tidy nodePackages.stylelint nodePackages.js-beautify zola
+ # purescript
+ spago purescript # nodePackages.purescript-language-server nodejs
+ # rust
+ rls cargo rustc rust-analyzer rustfmt
+ # others
+ gcc nixfmt niv cachix julia_16-bin python39
+ # isabelle
+ # (import "${inputs.playground.outPath}/isabelle-nix-fhsenv")
+ # (import /home/stuebinm/projects/isabelle-utils {}).isabat
+ ];
+}
diff --git a/home/unstable.nix b/home/unstable.nix
new file mode 100644
index 0000000..78ce4f6
--- /dev/null
+++ b/home/unstable.nix
@@ -0,0 +1,14 @@
+{config, pkgs, inputs, system, ...}:
+
+with import inputs.nixpkgs-unstable {inherit system; };
+{
+ home.packages = [
+ dino
+ nyxt
+ zulip-term
+ carp
+ foliate
+ elixir_1_12
+ elixir_ls
+ ];
+}