moar modules
This commit is contained in:
parent
a1175ba492
commit
011009d22f
17 changed files with 556 additions and 240 deletions
26
lib/modules/terminal.nix
Normal file
26
lib/modules/terminal.nix
Normal 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 ];
|
||||
}];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue