feat: add pimalaya profile
This commit is contained in:
parent
6913bb4ee3
commit
d2a4ec7f03
9 changed files with 638 additions and 29 deletions
30
modules/programs/himalaya.nix
Normal file
30
modules/programs/himalaya.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.my.programs.himalaya;
|
||||
toml = pkgs.formats.toml { };
|
||||
in
|
||||
{
|
||||
options.my.programs.himalaya.enable = mkEnableOption "himalaya";
|
||||
options.my.programs.himalaya.package = mkPackageOption pkgs "himalaya" { };
|
||||
options.my.programs.himalaya.settings = mkOption {
|
||||
inherit (toml) type;
|
||||
default = { };
|
||||
apply = toml.generate "config.toml";
|
||||
};
|
||||
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.moritz.xdg.configFile."himalaya/config.toml".source = cfg.settings;
|
||||
home-manager.users.moritz.home.packages = [ cfg.package ];
|
||||
age.secrets.email = {
|
||||
file = ../../secrets/email.age;
|
||||
owner = "1000";
|
||||
};
|
||||
};
|
||||
}
|
||||
23
modules/programs/nvim/new_plugins/himalaya-vim.nix
Normal file
23
modules/programs/nvim/new_plugins/himalaya-vim.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{ config, lib, pkgs, inputs, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf readFile;
|
||||
in
|
||||
{
|
||||
home-manager.users.moritz.programs.nixvim = lib.mkIf config.my.programs.himalaya.enable {
|
||||
extraPlugins = with pkgs.vimPlugins; [
|
||||
# himalaya-vim
|
||||
inputs.himalaya-vim.packages.${pkgs.system}.default
|
||||
];
|
||||
extraConfigLuaPost = ''
|
||||
vim.g.himalaya_folder_picker = "telescope";
|
||||
'';
|
||||
autoCmd = [
|
||||
{
|
||||
command = "set modifiable";
|
||||
event = [ "FileType" ];
|
||||
pattern = [ "himalaya-email-listing" ];
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue