From 92fec3de1328d3e72f208ac41853887ed6ae7745 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Av=C3=A9?= Date: Fri, 9 Aug 2024 15:13:13 +0200 Subject: [PATCH] Fri Aug 9 03:13:13 PM CEST 2024 --- home/email/default.nix | 13 ++++- home/utils/common.nix | 10 +++- hosts/Mallorea/flake.lock | 105 ++++++++++++++++++++++++++++++++++++++ hosts/Mallorea/flake.nix | 33 ++++++++++++ 4 files changed, 158 insertions(+), 3 deletions(-) create mode 100644 hosts/Mallorea/flake.lock create mode 100644 hosts/Mallorea/flake.nix diff --git a/home/email/default.nix b/home/email/default.nix index 3b4dbb8..7d86ab8 100644 --- a/home/email/default.nix +++ b/home/email/default.nix @@ -151,6 +151,16 @@ "" = ":next-tab"; }; }; + templates = { + quoted_reply = '' + {{(index .OriginalFrom 0).Name}}, {{dateFormat (.OriginalDate | toLocal) "Jan 02, 2006 at 15:04"}}: + {{ if eq .OriginalMIMEType "text/html" -}} + {{- exec `${pkgs.w3m}/bin/w3m -dump -o display_link_number=1 -T text/html` .OriginalText | quote -}} + {{- else -}} + {{- .OriginalText | quote -}} + {{- end}} + ''; + }; extraConfig = { general = { term = "xterm-256color"; @@ -180,8 +190,7 @@ "text/calendar" = "${pkgs.gnome-calendar}/bin/gnome-calendar"; "message/delivery-status" = "cat"; "message/rfc822" = "cat"; - "text/html" = - "${pkgs.w3m}/bin/w3m -dump -o display_link_number=1 -T text/html"; + "text/html" = "${pkgs.w3m}/bin/w3m -dump -o display_link_number=1 -T text/html"; "application/x-sh" = "${pkgs.bat}/bin/bat -fP -l sh"; }; }; diff --git a/home/utils/common.nix b/home/utils/common.nix index 1060855..366cdc1 100644 --- a/home/utils/common.nix +++ b/home/utils/common.nix @@ -1,7 +1,15 @@ { inputs, config, pkgs, ... }: { - imports = [ ../zsh ../git ../nvim ../email ../lf ../tmux ../yazi ]; + imports = [ + (import ../zsh { inherit inputs config pkgs; }) + ../git + ../nvim + ../email + ../lf + ../tmux + ../yazi + ]; home.stateVersion = "24.11"; targets.genericLinux.enable = true; diff --git a/hosts/Mallorea/flake.lock b/hosts/Mallorea/flake.lock new file mode 100644 index 0000000..6de0100 --- /dev/null +++ b/hosts/Mallorea/flake.lock @@ -0,0 +1,105 @@ +{ + "nodes": { + "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "fzgo", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1719994518, + "narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "fzgo": { + "inputs": { + "flake-parts": "flake-parts", + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1722536372, + "narHash": "sha256-kcaCZFYKWlGyyL1y5MQ/3LVNw+5GfW2kSYDixdrDJl0=", + "ref": "refs/heads/master", + "rev": "430ff540f5cedb42cbd9267094d45f275cd480d4", + "revCount": 13, + "type": "git", + "url": "https://git.thomasave.be/thomasave/fzgo.git" + }, + "original": { + "type": "git", + "url": "https://git.thomasave.be/thomasave/fzgo.git" + } + }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1723015306, + "narHash": "sha256-jQnFEtH20/OsDPpx71ntZzGdRlpXhUENSQCGTjn//NA=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "b3d5ea65d88d67d4ec578ed11d4d2d51e3de525e", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1722421184, + "narHash": "sha256-/DJBI6trCeVnasdjUo9pbnodCLZcFqnVZiLUfqLH4jA=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "9f918d616c5321ad374ae6cb5ea89c9e04bf3e58", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1722813957, + "narHash": "sha256-IAoYyYnED7P8zrBFMnmp7ydaJfwTnwcnqxUElC1I26Y=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "cb9a96f23c491c081b38eab96d22fa958043c9fa", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "fzgo": "fzgo", + "home-manager": "home-manager", + "nixpkgs": "nixpkgs_2" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/hosts/Mallorea/flake.nix b/hosts/Mallorea/flake.nix new file mode 100644 index 0000000..3643774 --- /dev/null +++ b/hosts/Mallorea/flake.nix @@ -0,0 +1,33 @@ +{ + description = "Home Manager configuration of server"; + + inputs = { + # Specify the source of Home Manager and Nixpkgs. + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + fzgo.url = "git+https://git.thomasave.be/thomasave/fzgo.git"; + }; + + outputs = { nixpkgs, home-manager, ... }@inputs: + let + system = "x86_64-linux"; + pkgs = nixpkgs.legacyPackages.${system}; + in { + homeConfigurations."server" = home-manager.lib.homeManagerConfiguration { + inherit pkgs; + + # Specify your home configuration modules here, for example, + # the path to your home.nix. + modules = [ ./home.nix ]; + + # Optionally use extraSpecialArgs + # to pass through arguments to home.nix + extraSpecialArgs = { + inherit inputs; + }; # allows access to flake inputs in hm modules + }; + }; +}