moar modules

This commit is contained in:
Tristan 2023-05-07 09:17:27 +01:00
parent a1175ba492
commit 011009d22f
17 changed files with 556 additions and 240 deletions

26
lib/modules/terminal.nix Normal file
View file

@ -0,0 +1,26 @@
{ user }: { lib, pkgs, config, ... }:
with lib;
let
cfg = config.programs.terminal;
in
{
options.programs = {
terminal = {
enable = mkEnableOption "editor";
package = mkPackageOption pkgs "foot" {
example = "pkgs.alacritty";
};
};
};
config = mkIf cfg.enable {
home-manager.users.${user}.imports = [{
programs.foot = mkIf cfg.package == pkgs.foot {
enable = true;
server.enable = true;
};
home.packages = [ cfg.package ];
}];
};
}