modular common programs

This commit is contained in:
Ivan Dimitrov 2023-11-14 19:57:53 +02:00
parent 4a70e04625
commit 911b6e8f3d
3 changed files with 53 additions and 42 deletions

View File

@ -41,6 +41,7 @@
programs = { programs = {
nv.enable = true; nv.enable = true;
shell.enable = true; shell.enable = true;
common.enable = true;
}; };
xdg.configFile = { xdg.configFile = {

View File

@ -1,6 +1,15 @@
{ pkgs, ... }: { { pkgs, lib, config, ... }:
let
cfg = config.programs.common;
in
{
imports = [ ./neovim ./neomutt ./sway ./tmux.nix ./zsh.nix ./lf ]; imports = [ ./neovim ./neomutt ./sway ./tmux.nix ./zsh.nix ./lf ];
options.programs.common = {
enable = lib.mkEnableOption "common";
};
config = lib.mkIf cfg.enable {
programs = { programs = {
thunderbird = { thunderbird = {
enable = true; enable = true;
@ -46,4 +55,5 @@
reloadTime = 1; reloadTime = 1;
}; };
}; };
};
} }

View File

@ -1,6 +1,6 @@
{ pkgs, lib, config, ... }: { pkgs, lib, config, ... }:
let let
cfg = config.programs.nv; cfg = config.programs.shell;
in in
{ {