fix(mako): syntax error in generated config file
This commit is contained in:
parent
a7447fbafe
commit
0cd88af42b
8 changed files with 313 additions and 21 deletions
41
flake.lock
generated
41
flake.lock
generated
|
@ -56,6 +56,26 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nix-private": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1753832018,
|
||||||
|
"narHash": "sha256-5Bzgfzy6PNppiZC9TmunBVyxZYh4pbctHyizxyNgiq8=",
|
||||||
|
"ref": "main",
|
||||||
|
"rev": "a87fde2a8776983419bf8828dcde50835e094798",
|
||||||
|
"shallow": true,
|
||||||
|
"type": "git",
|
||||||
|
"url": "ssh://git@git.epha.se:24422/ephase/nix-private.git"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"ref": "main",
|
||||||
|
"shallow": true,
|
||||||
|
"type": "git",
|
||||||
|
"url": "ssh://git@git.epha.se:24422/ephase/nix-private.git"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixgl": {
|
"nixgl": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
|
@ -78,6 +98,20 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1753722563,
|
||||||
|
"narHash": "sha256-FK8iq76wlacriq3u0kFCehsRYTAqjA9nfprpiSWRWIc=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "648f70160c03151bc2121d179291337ad6bc564b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"id": "nixpkgs",
|
||||||
|
"type": "indirect"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1748693115,
|
"lastModified": 1748693115,
|
||||||
"narHash": "sha256-StSrWhklmDuXT93yc3GrTlb0cKSS0agTAxMGjLKAsY8=",
|
"narHash": "sha256-StSrWhklmDuXT93yc3GrTlb0cKSS0agTAxMGjLKAsY8=",
|
||||||
|
@ -92,7 +126,7 @@
|
||||||
"type": "indirect"
|
"type": "indirect"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1748693115,
|
"lastModified": 1748693115,
|
||||||
"narHash": "sha256-StSrWhklmDuXT93yc3GrTlb0cKSS0agTAxMGjLKAsY8=",
|
"narHash": "sha256-StSrWhklmDuXT93yc3GrTlb0cKSS0agTAxMGjLKAsY8=",
|
||||||
|
@ -111,7 +145,7 @@
|
||||||
"nur": {
|
"nur": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-parts": "flake-parts",
|
"flake-parts": "flake-parts",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs_3",
|
||||||
"treefmt-nix": "treefmt-nix"
|
"treefmt-nix": "treefmt-nix"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
|
@ -131,8 +165,9 @@
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
|
"nix-private": "nix-private",
|
||||||
"nixgl": "nixgl",
|
"nixgl": "nixgl",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs_2",
|
||||||
"nur": "nur",
|
"nur": "nur",
|
||||||
"sops-nix": "sops-nix"
|
"sops-nix": "sops-nix"
|
||||||
}
|
}
|
||||||
|
|
23
flake.nix
23
flake.nix
|
@ -15,20 +15,23 @@
|
||||||
url = "github:Mic92/sops-nix";
|
url = "github:Mic92/sops-nix";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
nix-private = {
|
||||||
|
url = "git+ssh://git@git.epha.se:24422/ephase/nix-private.git?shallow=1&ref=main";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
outputs = { self, nixpkgs, home-manager, nur, nixgl, sops-nix, ... }@inputs:
|
outputs = { self, nixpkgs, home-manager, nur, nixgl, sops-nix, ... }@inputs:
|
||||||
let
|
let
|
||||||
stateVersion = "23.11";
|
stateVersion = "23.11";
|
||||||
|
|
||||||
allSystems = [
|
allSystems = [
|
||||||
"x86_64-linux" # 64bit AMD/Intel x86
|
"x86_64-linux" # 64bit AMD/Intel x86
|
||||||
"aarch64-linux" # 64bit ARM Linux
|
"aarch64-linux" # 64bit ARM Linux
|
||||||
];
|
];
|
||||||
|
|
||||||
forAllSystems = fn:
|
forAllSystems = fn:
|
||||||
nixpkgs.lib.genAttrs allSystems
|
nixpkgs.lib.genAttrs allSystems
|
||||||
(system: fn { pkgs = import nixpkgs { inherit system; }; });
|
(system: fn { pkgs = import nixpkgs { inherit system; }; });
|
||||||
|
|
||||||
createNixosSystem = { system, hostname, username ? "ephase" }: nixpkgs.lib.nixosSystem {
|
createNixosSystem = { system, hostname, username ? "ephase" }: nixpkgs.lib.nixosSystem {
|
||||||
system = system;
|
system = system;
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
|
@ -40,7 +43,7 @@
|
||||||
./nixos/default.nix
|
./nixos/default.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
createHomeConfiguration = { system ? "x86_64-linux", hostname, username ? "ephase" }:
|
createHomeConfiguration = { system ? "x86_64-linux", hostname, username ? "ephase" }:
|
||||||
home-manager.lib.homeManagerConfiguration {
|
home-manager.lib.homeManagerConfiguration {
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
|
@ -79,13 +82,13 @@
|
||||||
luci = createNixosSystem { system = "x86_64-linux"; hostname = "luci"; };
|
luci = createNixosSystem { system = "x86_64-linux"; hostname = "luci"; };
|
||||||
};
|
};
|
||||||
homeConfigurations = {
|
homeConfigurations = {
|
||||||
"rick" = createHomeConfiguration { system = "aarch64-linux"; hostname = "rick";};
|
"rick" = createHomeConfiguration { system = "aarch64-linux"; hostname = "rick";};
|
||||||
"luci" = createHomeConfiguration { system = "x86_64-linux"; hostname = "luci";};
|
"luci" = createHomeConfiguration { system = "x86_64-linux"; hostname = "luci";};
|
||||||
"morty" = createHomeConfiguration { system = "x86_64-linux"; hostname = "morty";};
|
"morty" = createHomeConfiguration { system = "x86_64-linux"; hostname = "morty";};
|
||||||
"mrmeeseeks" = createHomeConfiguration { system = "x86_64-linux"; hostname = "mrmeeseeks";};
|
"mrmeeseeks" = createHomeConfiguration { system = "x86_64-linux"; hostname = "mrmeeseeks";};
|
||||||
"work" = createHomeConfiguration {
|
"work" = createHomeConfiguration {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
hostname = "work";
|
hostname = "work";
|
||||||
username = "yorick-barbanneau";
|
username = "yorick-barbanneau";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,12 @@
|
||||||
{ ... }: {
|
{ inputs, ... }: {
|
||||||
config.modules = {
|
config.modules = {
|
||||||
|
email = {
|
||||||
|
enable = true;
|
||||||
|
accountConfigs = {
|
||||||
|
ubordeaux = inputs.nix-private.mail.ubordeaux;
|
||||||
|
};
|
||||||
|
primary = "ubordeaux";
|
||||||
|
};
|
||||||
application = {
|
application = {
|
||||||
gnupg = {
|
gnupg = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
153
modules/home-manager/accounts/email/default.nix
Normal file
153
modules/home-manager/accounts/email/default.nix
Normal file
|
@ -0,0 +1,153 @@
|
||||||
|
{ lib, config, pkgs, ... }:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.modules.email;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.modules.email = {
|
||||||
|
enable = mkEnableOption "Enable email accounts configuration";
|
||||||
|
|
||||||
|
accountConfigs = mkOption {
|
||||||
|
type = types.attrsOf types.attrs;
|
||||||
|
default = false;
|
||||||
|
description = "List of account variables used to create accounts";
|
||||||
|
};
|
||||||
|
|
||||||
|
primary = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = false;
|
||||||
|
description = "name of primary account";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
accounts.email = let
|
||||||
|
defaultSetting = {
|
||||||
|
mbsync = {
|
||||||
|
enable = true;
|
||||||
|
create = "maildir";
|
||||||
|
expunge = "both";
|
||||||
|
};
|
||||||
|
aerc = {
|
||||||
|
enable = true;
|
||||||
|
extraAccounts ={
|
||||||
|
source = "notmuch://~/mail";
|
||||||
|
maildir-store = "~/mail";
|
||||||
|
default = "Inbox";
|
||||||
|
postpone = "Drafts";
|
||||||
|
copy-to = "Sent";
|
||||||
|
use-envelope-from = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
notmuch = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
accountsList = lib.mapAttrs ( name: value: lib.recursiveUpdate defaultSetting value.config ) cfg.accountConfigs;
|
||||||
|
in {
|
||||||
|
maildirBasePath = "mail";
|
||||||
|
accounts = lib.recursiveUpdate accountsList { "${cfg.primary}".primary = true; };
|
||||||
|
};
|
||||||
|
|
||||||
|
# programs.notmuch = {
|
||||||
|
# enable = true;
|
||||||
|
# new.tags = [ "new" ];
|
||||||
|
# hooks.postNew = ''
|
||||||
|
# ${pkgs.afew}/bin/afew -t -n
|
||||||
|
# ${pkgs.afew}/bin/afew -w -n
|
||||||
|
# '';
|
||||||
|
# };
|
||||||
|
|
||||||
|
programs.afew = {
|
||||||
|
enable = true;
|
||||||
|
extraConfig = ''
|
||||||
|
[FolderNameFilter]
|
||||||
|
folder_explicit_list = archives
|
||||||
|
folder_transforms = archives:archive
|
||||||
|
maildir_separator = /
|
||||||
|
[MailMover]
|
||||||
|
[SpamFilter]
|
||||||
|
[KillThreadsFilter]
|
||||||
|
[ArchiveSentMailsFilter]
|
||||||
|
sent_tag = sent
|
||||||
|
[InboxFilter]
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
programs.aerc = {
|
||||||
|
enable = true;
|
||||||
|
extraConfig = {
|
||||||
|
general = {
|
||||||
|
unsafe-accounts-conf = true;
|
||||||
|
};
|
||||||
|
ui = {
|
||||||
|
column-subject = ''
|
||||||
|
{{if .ThreadPrefix}}{{.Style (printf "%s " .ThreadPrefix) "thread"}}{{- end }}{{.Subject}}
|
||||||
|
'';
|
||||||
|
column-flags = ''
|
||||||
|
{{.Flags | join " "}}
|
||||||
|
'';
|
||||||
|
index-columns = ''
|
||||||
|
flags:5,name<20%,subject,date>=
|
||||||
|
'';
|
||||||
|
thread-prefix-tip = "╼ ";
|
||||||
|
thread-prefix-indent = "";
|
||||||
|
thread-prefix-stem = "│";
|
||||||
|
thread-prefix-limb = "─";
|
||||||
|
thread-prefix-folded = "+";
|
||||||
|
thread-prefix-unfolded = "";
|
||||||
|
thread-prefix-first-child = "┬";
|
||||||
|
thread-prefix-has-siblings = "├";
|
||||||
|
thread-prefix-orphan = "┬╼ ";
|
||||||
|
thread-prefix-dummy = "┬";
|
||||||
|
thread-prefix-lone = " ";
|
||||||
|
thread-prefix-last-sibling = "╰";
|
||||||
|
completion-popovers = true;
|
||||||
|
icon-attachment = "";
|
||||||
|
icon-replied = "";
|
||||||
|
icon-forwarded = "";
|
||||||
|
icon-new = "";
|
||||||
|
icon-old = "";
|
||||||
|
icon-unencrypted = "";
|
||||||
|
icon-encrypted = "";
|
||||||
|
icon-signed = "";
|
||||||
|
icon-signed-encrypted = "";
|
||||||
|
icon-invalid = "";
|
||||||
|
icon-unknown = "";
|
||||||
|
threading-enabled = true;
|
||||||
|
};
|
||||||
|
statusline = {
|
||||||
|
status-columns=''
|
||||||
|
left<*,right>*
|
||||||
|
'';
|
||||||
|
column-left = ''
|
||||||
|
{{.Style (printf " %s " (toUpper .Account)) "statusline_account" }}\
|
||||||
|
{{.Style (printf " %s | %s " .Folder (humanReadable .Size)) "statusline_folder"}}\
|
||||||
|
{{ if .ContentInfo }}{{.Style (printf " %s " .ContentInfo) "statusline_contentinfo"}}{{- end }}
|
||||||
|
'';
|
||||||
|
column-center = ''
|
||||||
|
{{.Style .PendingKeys "statusline_center"}}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
filters = {
|
||||||
|
"text/plain" = " wrap -w 100 | colorize";
|
||||||
|
"text/html" = "! html";
|
||||||
|
"text/calendar" = "calendar";
|
||||||
|
"message/delivery-status" = "colorize";
|
||||||
|
"message/rfc822" = "colorize";
|
||||||
|
".headers" = "colorize";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
stylesets = {
|
||||||
|
default = (builtins.readFile ./files/default.theme);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
programs.mbsync = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
services.mbsync = {
|
||||||
|
enable = true;
|
||||||
|
postExec = "${pkgs.notmuch}/bin/notmuch new";
|
||||||
|
package = config.programs.mbsync.package;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
91
modules/home-manager/accounts/email/files/default.theme
Normal file
91
modules/home-manager/accounts/email/files/default.theme
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
*.default=true
|
||||||
|
*.normal=true
|
||||||
|
border.fg=16
|
||||||
|
|
||||||
|
title.fg=5
|
||||||
|
title.bg=0
|
||||||
|
|
||||||
|
|
||||||
|
msglist_*.selected.bold=true
|
||||||
|
msglist_default.selected.bg=19
|
||||||
|
msglist_default.selected.fg=7
|
||||||
|
|
||||||
|
msglist_flagged.italic=true
|
||||||
|
|
||||||
|
msglist_marked.fg=0
|
||||||
|
msglist_marked.bg=4
|
||||||
|
msglist_marked.selected.fg=4
|
||||||
|
msglist_marked.selected.bg=
|
||||||
|
msglist_marked.italic=true
|
||||||
|
|
||||||
|
msglist_result.fg=0
|
||||||
|
msglist_result.bg=3
|
||||||
|
msglist_result.italic=true
|
||||||
|
msglist_result.selected.fg=3
|
||||||
|
msglist_result.selected.bg=
|
||||||
|
|
||||||
|
msglist_pill.bg=8
|
||||||
|
|
||||||
|
dirlist_*.selected.bold=true
|
||||||
|
dirlist_*.selected.bg=19
|
||||||
|
|
||||||
|
part_switcher.fg=7
|
||||||
|
part_switcher.bg=19
|
||||||
|
part_switcher.selected.bg=18
|
||||||
|
|
||||||
|
part_filename.bg=18
|
||||||
|
part_filename.selected.bg=8
|
||||||
|
|
||||||
|
part_mimetype.bg=18
|
||||||
|
part_mimetype.selected.bg=18
|
||||||
|
part_mimetype.selected.dim=true
|
||||||
|
|
||||||
|
statusline_error.fg=0
|
||||||
|
statusline_error.bg=1
|
||||||
|
statusline_error.bold=true
|
||||||
|
|
||||||
|
statusline_success.fg=0
|
||||||
|
statusline_success.bg=2
|
||||||
|
statusline_success.bold=true
|
||||||
|
|
||||||
|
completion_default.bg=18
|
||||||
|
completion_default.fg=20
|
||||||
|
|
||||||
|
completion_description.bg=18
|
||||||
|
completion_description.fg=20
|
||||||
|
|
||||||
|
completion_default.selected.fg=7
|
||||||
|
completion_default.selected.bg=8
|
||||||
|
|
||||||
|
completion_description.selected.fg=7
|
||||||
|
completion_description.selected.bg=8
|
||||||
|
|
||||||
|
selector_*.bg=18
|
||||||
|
|
||||||
|
tab.fg=15
|
||||||
|
tab.bg=19
|
||||||
|
tab.selected.fg=15
|
||||||
|
tab.selected.bg=0
|
||||||
|
|
||||||
|
[viewer]
|
||||||
|
url.fg=4
|
||||||
|
url.underline=true
|
||||||
|
header.fg=1
|
||||||
|
header.bold=true
|
||||||
|
signature.dim=true
|
||||||
|
diff_meta.bold=true
|
||||||
|
diff_chunk.fg=#89b4fa
|
||||||
|
diff_chunk_func.fg=#89b4fa
|
||||||
|
diff_chunk_func.bold=true
|
||||||
|
diff_add.fg=#a6e3a1
|
||||||
|
diff_del.fg=#f38ba8
|
||||||
|
quote_*.fg=8
|
||||||
|
quote_1.fg=17
|
||||||
|
|
||||||
|
[user]
|
||||||
|
thread.fg=1
|
||||||
|
statusline_account.bg=4
|
||||||
|
statusline_account.fg=0
|
||||||
|
statusline_account.bold=true
|
||||||
|
statusline_folder.bg=18
|
||||||
|
statusline_contentinfo.bg=19
|
2
modules/home-manager/accounts/email/files/ubordeaux.map
Normal file
2
modules/home-manager/accounts/email/files/ubordeaux.map
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
_Inbox=folder:ubordeaux/Inbox
|
||||||
|
_Sent=folder:ubordeaux/Sent
|
|
@ -25,5 +25,6 @@
|
||||||
./web/qutebrowser/default.nix
|
./web/qutebrowser/default.nix
|
||||||
./web/webcord
|
./web/webcord
|
||||||
./accounts/dav
|
./accounts/dav
|
||||||
|
./accounts/email
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,16 +15,16 @@ with lib;
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
font = "Fira Code Nerd Font 10";
|
font = "Fira Code Nerd Font 10";
|
||||||
backgroundColor = "#353535FF";
|
background-color = "#353535";
|
||||||
borderColor = "#1CD180";
|
border-color = "#1CD180";
|
||||||
progressColor = "over #5566AAFF";
|
progress-color = "over #5566AA";
|
||||||
textColor = "#FDFDFD";
|
text-color = "#FDFDFD";
|
||||||
width = 300;
|
width = 300;
|
||||||
height = 100;
|
height = 100;
|
||||||
borderRadius = 0;
|
border-radius = 0;
|
||||||
borderSize = 2;
|
border-size = 2;
|
||||||
icons = true;
|
icons = true;
|
||||||
maxIconSize = 64;
|
max-icon-size = 64;
|
||||||
layer = "overlay";
|
layer = "overlay";
|
||||||
anchor = "top-right";
|
anchor = "top-right";
|
||||||
format = ''
|
format = ''
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue